Re: [ansible-project] Failed host list from 'rescue' task

2023-03-17 Thread Aharonu
Thanks Todd. I will give a try option 1. *(1) remove the various template/copy tasks from the various places in your playbook and replace them with a single task at the end that creates the single file, or* (2) store the output of the various tasks to separate files and use `assemble` (or a shell

Re: [ansible-project] Failed host list from 'rescue' task

2023-03-17 Thread Todd Lewis
Right, but as you've discovered `copy` and `template` won't update part of a file. So your two choices are: (1) remove the various template/copy tasks from the various places in your playbook and replace them with a single task at the end that creates the single file, or (2) store the output of

Re: [ansible-project] How to use roles/../tests directory

2023-03-17 Thread 'Rowe, Walter P. (Fed)' via Ansible Project
https://stackoverflow.com/questions/70898834/which-tools-use-the-tests-directory-in-an-ansible-role-by-default Walter -- Walter Rowe, Division Chief Infrastructure Services, OISM Mobile: 202.355.4123 On Mar 17, 2023, at 10:28 AM, Ngoc Quan Pham wrote: Hi everyone, As you know, the standard st

[ansible-project] How to use roles/../tests directory

2023-03-17 Thread Ngoc Quan Pham
Hi everyone, As you know, the standard structure of a Ansible role has the directories /default, /handlers, /meta, /tasks, /templates, /vars and /tests. I have basic question of the directory /tests in Ansible roles, but I can’t find the answers. Can you let me know what is the purpose this /tests

Re: [ansible-project] Failed host list from 'rescue' task

2023-03-17 Thread Aharonu
Greetings for the day! Looks like ansible.builtin.assemble for two different files from directory to another required file. Sorry to raise my query again but..wanted to be clear. My requirement is, *As i mentioned in previous mail*: playbook should be having only one csv file but two different

Re: [ansible-project] Disabling arguments_spec logs

2023-03-17 Thread Nicolas Bouchard
The screenshot I've added is just a very small part of my playbook execution logs. We have a collection with more than 30 roles, most of them having argument_specs to validate and document arguments values. For each argument(option) in the specs, a log is written. In our playbook we reference

Re: [ansible-project] Failed host list from 'rescue' task

2023-03-17 Thread Todd Lewis
Consider https://docs.ansible.com/ansible/latest/collections/ansible/builtin/assemble_module.html It combines multiple files into one. On Friday, March 17, 2023 at 1:40:05 AM UTC-4 Aharonu wrote: > > I am digging into ansible.builtin.copy and ansible.builtin.template *content > *but not get o

[ansible-project] Become sudo hangs on first sudo on OSX

2023-03-17 Thread 张北
Hi, ansible community! I have encountered an issue where if sudo -i has not been executed in the current command line session before, the become:true portion in Ansible will get stuck. ``` - hosts: localhost connection: local gather_facts: true tasks: - name: "verify become is not