Re: [ansible-project] Need to understand how I can write a ansible role so that it compares input / output value.

2021-12-30 Thread Marian Saldhana
Thanks Todd, appreciate your guidance. On Thursday, December 30, 2021 at 8:59:08 PM UTC+5:30 uto...@gmail.com wrote: > Assuming “hostname” means a fully qualified domain name, then the > following may help you. > > hosts: all > gather_facts: True > become: false > tasks: > - name:

[ansible-project] Re: Check for existing installed software

2021-12-30 Thread Niek
Probably check: https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html Op donderdag 30 december 2021 om 19:24:36 UTC+1 schreef Niek: > Not a ansible hero here, but i think you can do something with the when: > command in your playbook. > > So somewhere in de the task

[ansible-project] Re: Check for existing installed software

2021-12-30 Thread Niek
Not a ansible hero here, but i think you can do something with the when: command in your playbook. So somewhere in de the task where you check the version you will do a register: dotnet_version And in the taks where you execute it: when: "'4.8' in {{ dotnet_version }}" Op woensdag 29

Re: [ansible-project] Need to understand how I can write a ansible role so that it compares input / output value.

2021-12-30 Thread Todd Lewis
Assuming “hostname” means a fully qualified domain name, then the following may help you. |--- - hosts: all gather_facts: True become: false tasks: - name: show file contents debug: msg: "{{ lookup('file', 'customer-expects.txt') }}" - name: Correct kernel? set_fact: # These dashes matter.

Re: [ansible-project] how can i get around this error?

2021-12-30 Thread Luca 'remix_tj' Lorenzetto
Hello, check docs of this module. On top of the page there are some clarifications on steps you need to do: https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_powershell_module.html On Thu, Dec 30, 2021 at 1:09 PM Kerem Kalayci wrote: > Hi Luca, > > > Thank you for your

Re: [ansible-project] how can i get around this error?

2021-12-30 Thread Kerem Kalayci
Hi Luca, Thank you for your interest and reply. When I tried in the order you sent, I got an error like below. I think I'm having a problem with the module version. What is your opinion? https://stackoverflow.com/questions/47159193/why-does-ansible-show-error-no-action-detected-in-task-error

Re: [ansible-project] Re: create multiple vlan port groups on 5 esxi servers

2021-12-30 Thread Rodrigues -
Yeah sure can. Check this out, the last example has what you're looking for https://docs.ansible.com/ansible/latest/collections/community/vmware/vmware_portgroup_module.html On Wed 29 Dec 2021, 17:29 Tony Wong, wrote: > hi > > Is it possible to override default failover NIC policy? > > I

Re: [ansible-project] how can i get around this error?

2021-12-30 Thread Luca 'remix_tj' Lorenzetto
Hello Kerem, you're using a bad indentation. win_powershell: has to be aligned with the n of name: (the previous row) and script as to be aligned with the n of win_powershell. So your playbook will result written this way: - gather_facts: False name: asdf hosts: localhost tasks: -

Re: [ansible-project] how can i get around this error?

2021-12-30 Thread Kerem Kalayci
*Thanks for reply, I am already using the link you sent, but the error persists.* - gather_facts: False name: asdf hosts: localhost tasks: - name: Run basic PowerShell script win_powershell: script: | C:\Users\emperior\Desktop\run_command.ps1 ERROR! 'win_powershell'

Re: [ansible-project] how can i get around this error?

2021-12-30 Thread dulhaver via Ansible Project
on first sight I would try to change the indentation of the task like: tasks: - name: Run basic PowerShell script win_powershell: | your script here not 100% sure about the postition-indentation of the script line though. That said ... it's always a good idea to look at the

Re: [ansible-project] how can i get around this error?

2021-12-30 Thread Stefan Hornburg (Racke)
On 30/12/2021 09:16, Kerem Kalayci wrote: Hi everyone, i'm newbie at ansible yml. I am trying to run a command like below. But I am getting an error as below. where am i doing wrong? - gather_facts: False   name: LINGO'da komut   hosts: xxx   remote_user: xxx   tasks:     - name: Run

[ansible-project] how can i get around this error?

2021-12-30 Thread Kerem Kalayci
Hi everyone, i'm newbie at ansible yml. I am trying to run a command like below. But I am getting an error as below. where am i doing wrong? - gather_facts: False name: LINGO'da komut hosts: xxx remote_user: xxx tasks: - name: Run basic PowerShell script win_powershell: