Re: [ansible-project] nested roles

2022-06-21 Thread John Petro
That's really where I come down. I'd rather see all dependancies in the playbook, to avoid potential problems down the road. On Tue, Jun 21, 2022, 6:13 PM Brian Coca wrote: > Yes, but that is not a commonly held view, why 'dependencies' exist, > so I suggest using import/include_role instead ..

Re: [ansible-project] nested roles

2022-06-21 Thread Brian Coca
Yes, but that is not a commonly held view, why 'dependencies' exist, so I suggest using import/include_role instead ... if i cannot convince people of avoiding role 'trees'. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project"

Re: [ansible-project] nested roles

2022-06-21 Thread John Petro
@Brian Coca, So what you are suggesting, when you say you "prefer to keep things simple and obvious" is that you suggest keeping the import statements in the playbook that calls the role, not really inside the role itself, is that what I am understanding you to mean by that? --John On Tue, Jun

Re: [ansible-project] nested roles

2022-06-21 Thread Brian Coca
I prefer to keep things simple and obvious, I would keep role imports to the play, not everyone agrees and many use complex role hierarchies. If it is a choice between setting 'dependencies' (which imports a role from a role) and import_role, I always advise to use the latter. reasons against depe

Re: [ansible-project] nested roles

2022-06-21 Thread Paul Manno
Hi Brian, Wow... I could have swore I read that you should never import a role from another role: That is to say that in a role's tasks/main.yml to do import_role for some other role. This made sense to me since a role, I thought, was supposed to only do one thing and do it well. Importing on

Re: [ansible-project] nested roles

2022-06-21 Thread Brian Coca
@Paul Mano the features @flowersong mentions are for installing, not running the role. There has never been advice to use dependencies over importing a role. I have personally always advised the opposite, I created import_role/include_role because the dependency mechanism is very counterintuitive.

Re: [ansible-project] nested roles

2022-06-19 Thread John Petro
com > on behalf of flowerysong > *Sent:* Saturday, June 18, 2022 11:45:26 PM > *To:* Ansible Project > *Subject:* Re: [ansible-project] nested roles > > I highly disagree with this, and would be interested in a pointer to the > documentation that you say claims "i

Re: [ansible-project] nested roles

2022-06-19 Thread Paul Manno
Mobile 5G Device Get Outlook for Android<https://aka.ms/AAb9ysg> From: ansible-project@googlegroups.com on behalf of flowerysong Sent: Saturday, June 18, 2022 11:45:26 PM To: Ansible Project Subject: Re: [ansible-project] nested roles I highly disagr

Re: [ansible-project] nested roles

2022-06-18 Thread flowerysong
Sent from my T-Mobile 5G Device > Get Outlook for Android <https://aka.ms/AAb9ysg> > > -- > *From:* ansible...@googlegroups.com on > behalf of John Petro > *Sent:* Friday, June 17, 2022, 3:26 PM > *To:* ansible...@googlegroups.com > *Subject:*

Re: [ansible-project] nested roles

2022-06-18 Thread Paul Manno
ka.ms/AAb9ysg> From: ansible-project@googlegroups.com on behalf of John Petro Sent: Friday, June 17, 2022, 3:26 PM To: ansible-project@googlegroups.com Subject: [ansible-project] nested roles I have a question regarding nested roles. Back Story: I am doing some

[ansible-project] nested roles

2022-06-17 Thread John Petro
I have a question regarding nested roles. Back Story: I am doing some code reviews for some ansible code a coworker has done. I noticed that they are importing other roles into the role they are working on. Question: I feel like this is not a good idea, that dependencies should be taken care o