I have following code wherein I have 3 roles as below. I do not want to execute "def" role for hosts which has group_name "er". So when servers also belong to "er" group, skip def role.
hosts: qw
vars:
roles:
abc
def
fgh
I have following code wherein I have 3 roles as below. I do not want to execute "def" role for hosts which has group_name "er". So when servers also belong to "er" group, skip def role.
hosts: qw
vars:
roles:
abc
def
fgh
Copyright © 2021 Jogjafile Inc.
You can use Conditionals with roles
Something like that would likely work for your usecase.