Here is a littel edit: I struggle to find the correct place where I would add the tag for the role. I do not want to tag the role in webservers.yml since this would not be a global definition. But I failed to find the correct place in roles/javajdk - is there any? Other option: assuming i have many roles included in werbservers.yml - is there an other option to run only one of the roles ?
Am Dienstag, 21. November 2017 08:53:12 UTC+1 schrieb [email protected]: > > Hello > > I have been reading squilions of articles but I am still unsure if the > usage of tags is a good practice. It seems to me that adding tags to tasks > quickly leads to a cumbersome situation. How ever a tag on a role might be > ok? > > I think of having a main yaml like sites.yml which includes all needed > playbooks e.g. webservers.yml and dbservers.yml > The playbooks e.g. webservers.yml define the hosts to act on and the > roles to run. > The roles should self standing and independent, I think of tagging the > role with its own name. eg. javajdk gets tag: javajdk > > so I can run > ansible-playbook -i inventory/staging webservers > to do a complet setup or > so I can run ansible-playbook -i inventory/staging webservers -t > javajdk > to only setup javajdk on the webservers > > . > ├── inventories > │ ├── production > │ └── staging > ├── roles > │ ├── tomcat > │ └── javajdk > ├── site.yml > ├── dbservers.yml > └── webservers.yml > > > What do you think? Did I got it correct? Is there a better approach ? > > Thanks a lot :-) > Michael > > -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fa6babe5-d328-49c0-ba80-6ee7d8a6c36c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
