Answer the question
In order to leave comments, you need to log in
Is it possible to specify tags in a playbook instead of using the tags argument?
A long time ago I wrote my role ansible. Recently it was necessary to perform only part of the settings for this role. Specified tags in the right places, executed the playbook with --tags=some_tag.
And today I forgot to specify this argument! Accordingly, everything was done, instead of what was needed.
Is it possible to write a role call in the playbook immediately with the necessary tags?
Answer the question
In order to leave comments, you need to log in
It is forbidden.
But you can add a `never` tag and then the tasks will not be executed if there is no explicitly requested tag.
https://docs.ansible.com/ansible/latest/user_guide...
However, I would write a makefile/script and run it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question