Re: [ansible-project] Calling the same role from multiple playbooks

2020-01-07 Thread Claudio M. Lombardo
Ok so here is what I tried. 4 playbooks. - 00.yml just calls 3 other playbooks: - import_playbook: '/opt/ansible/playbook/test/01.yml' - import_playbook: '/opt/ansible/playbook/test/02.yml' - import_playbook: '/opt/ansible/playbook/test/03.yml' *01.yml:* --- - hosts: localhost become: yes

RE: [ansible-project] Calling the same role from multiple playbooks

2020-01-06 Thread Claudio Lombardo
Do you have a practical example? I am new here 😊 From: ansible-project@googlegroups.com On Behalf Of Stephen Maher Sent: Monday, January 6, 2020 1:15 PM To: ansible-project@googlegroups.com Subject: Re: [ansible-project] Calling the same role from multiple playbooks Hi, Have you

Re: [ansible-project] Calling the same role from multiple playbooks

2020-01-06 Thread Stephen Maher
Hi, Have you looked at ansible merge vars plugin?? We use this extensively with roles and it works well. https://pypi.org/project/ansible-merge-vars/ Cheers Steve > On 2 Jan 2020, at 22:08, Claudio M. Lombardo wrote: > > Hello All. > I am trying to solve the following issue. > > - I have

Re: [ansible-project] Calling the same role from multiple playbooks

2020-01-06 Thread Vladimir Botka
On Mon, 6 Jan 2020 08:22:38 -0800 (PST) "Claudio M. Lombardo" wrote: > I am stuck. I would like to keep the information in both playbooks and have > a final sssd.conf that contains all the ldap groups declared. Let's try to minimise the problem. For example, 1) playbook A applies variable LDA

Re: [ansible-project] Calling the same role from multiple playbooks

2020-01-06 Thread Claudio M. Lombardo
My apologies if I was not clear. Here is a better description (I hope!). Let's say there are 2 playbooks. Playbook 1 does a bunch of stuff, including calling a role that sets the SSSD.conf with default settings, including the ldap_access_filter settings. Then, playbook one "calls" playbook 2

Re: [ansible-project] Calling the same role from multiple playbooks

2020-01-03 Thread Kai Stian Olstad
On 03.01.2020 20:53, Audiolomb wrote: I do not see on how either one of those solutions would work. The assemble module concatenates files. My configuration needs to be merged, not concatenated... Well, you wrote "merge" but you did not specify how you would like it to be "merged". "Merge" an

Re: [ansible-project] Calling the same role from multiple playbooks

2020-01-03 Thread Audiolomb
I do not see on how either one of those solutions would work. The assemble module concatenates files. My configuration needs to be merged, not concatenated... On Friday, January 3, 2020 at 12:33:08 AM UTC-8, Kai Stian Olstad wrote: > > On 02.01.2020 23:08, Claudio M. Lombardo wrote: > > - I als

Re: [ansible-project] Calling the same role from multiple playbooks

2020-01-03 Thread Audiolomb
I do not see on how either one of those solutions would work. The assemble module concatenates files. My configuration needs to be merged, not concatenated... On Friday, January 3, 2020 at 12:34:09 AM UTC-8, Mehul Ved wrote: > > Have you had a look at > https://docs.ansible.com/ansible/latest/

Re: [ansible-project] Calling the same role from multiple playbooks

2020-01-03 Thread Mehul Ved
Have you had a look at https://docs.ansible.com/ansible/latest/user_guide/playbooks_advanced_syntax.html#yaml-anchors-and-aliases-sharing-variable-values ? On Fri, 3 Jan, 2020, 3:38 AM Claudio M. Lombardo, wrote: > Hello All. > I am trying to solve the following issue. > > - I have a SSSD role w

Re: [ansible-project] Calling the same role from multiple playbooks

2020-01-03 Thread Kai Stian Olstad
On 02.01.2020 23:08, Claudio M. Lombardo wrote: - I also have playbooks organized hierarchically: 00-base.yml calls only playbooks (01-, 02-yyy, 03-zzz, etc.) 01- is called first, and sets up common stuff for all my machines (like basic firewall rules, subscription to satellite, etc.

[ansible-project] Calling the same role from multiple playbooks

2020-01-02 Thread Claudio M. Lombardo
Hello All. I am trying to solve the following issue. - I have a SSSD role which configures my target machine via a .j2 template which contains a bunch of stuff, including the ldap_access_filter parameter. - I also have playbooks organized hierarchically: 00-base.yml calls only playbooks (01-xxx