Re: [ansible-project] Ansible IDE with syntax help

2021-10-07 Thread Gildas Cotomale
Le mercredi 6 octobre 2021 à 19:25:17 UTC+2, pat@networktocode.com a écrit : > During Ansiblefest 2021, multiple presenters said they were now using > Microsoft Virtual Studio Code (VSCODE available at no cost on Win10, Mac, & > Linux) with the no-cost RedHat Ansible extension. Of course th

[ansible-project] Re: Exclude Server From Task

2021-10-07 Thread Gildas Cotomale
Why not remove it from your extra var ? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion

Re: [ansible-project] Unable to used the PBRUN command in Ansible

2021-10-07 Thread Gildas Cotomale
Hello, First, are you using the same account with the playbook and when you test interactively ? And are you sure you are using the same "become_user" ? Second, when your playbook run a task/module, it is using a clean minimal environment ? Are you able to issue the same command in non interac

[ansible-project] Re: Removing DNS records using community.general.ipa_dnsrecord

2021-10-07 Thread Gildas Cotomale
Hi Harry, If the task is green, it means the change is successfuly issued and there was no error back and the check responded fine. How do you check by your side ? You have to connect to the "ipaserver" and do the check locally as "admin" If yu're diging another server, you may be reading cach

[ansible-project] Bash Module - sourcing files in module_utils

2021-10-07 Thread Jason Masipiquena
I have a bash module in plugins/modules ``` # my_module.sh function do_something1() { ... } source ../module_utils/my_other_source.sh do_something1 do_something2 ``` source file in plugins/module_utils ``` # my_other_source.sh function do_something2() { ... } ``` It's not able to sourc

[ansible-project] Re: Help figuring linter fail with conflicting action statements: hosts, tasks

2021-10-07 Thread Anders Goncalves da Silva
The error seems to stem from the fact that I had it in a folders called tasks instead of a folder called playbook: https://github.com/ansible-community/ansible-lint/issues/1471 Now the linter is working fine. On Thursday, October 7, 2021 at 4:00:19 PM UTC-7 Anders Goncalves da Silva wrote: >

[ansible-project] Re: Help figuring linter fail with conflicting action statements: hosts, tasks

2021-10-07 Thread Anders Goncalves da Silva
I should add that this problem also happens with the following example playbook: https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html#playbook-execution But, only for the first play in the playbook. On Thursday, October 7, 2021 at 3:56:44 PM UTC-7 Anders Goncalves da Silva w

[ansible-project] Help figuring linter fail with conflicting action statements: hosts, tasks

2021-10-07 Thread Anders Goncalves da Silva
Hello. I haven't been able to find a satisfactory solution to the problem I am having. The linter throws the following error: [parser-error] conflicting action statements: hosts, tasks I am running ansible-lint 5.2.0 using ansible 2.11.5. This is the playbook (https://docs.microsoft.com/en-us

[ansible-project] Identifier for host managed by ansible

2021-10-07 Thread Simon Gao
Hi, Is there known or common way to add an identifier on the hosts managed by ansible? Like indentifying os distribution in /etc/redhat-release or /etc/os-release etc, we would like to add some identifying mark on the hosts managed by ansible. For SaltStack, we can easily tell by checking sal

[ansible-project] Random ssh error when fork above 2 even 1 - Unreachable hosts

2021-10-07 Thread Anıl Dursun
Hello, I'm having random ssh fails with default fork=5. I realized it could be solved with fork=1 (not even 2 to be sure). I'm running playbooks that create dirs, copy a shell script (can take some time to complete) execute it (i don't remember why I do it with shell module and not with scri

Re: [ansible-project] Trying to gather facts to write to local file on ansible server

2021-10-07 Thread Brian Coca
Don't really need a play, just: ansible -m gather_facts --tree /dir/with/json/file/per/host/ all -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, s

Re: [ansible-project] how to switch off pw expiration?

2021-10-07 Thread dulhaver via Ansible Project
> On 10/05/2021 3:55 PM Dick Visser wrote: > > what does your entire playbook look like? And the inventory? > > I see this in the snippet: > > Failed to connect to the host via ssh sorry, I can't exactly reconstruct what the problem was. It works now with: > - tasks: > - name: switch of