Hi,
Instead of passing to specific hostgroup, can i pass the regex to “hosts: ” for the play hosts ?.
eg:-
- name: pre-step of the setup process
hosts: cluster_.*
gather_facts: false
strategy: free
any_errors_fatal: true
tasks: - include : roles/setup_node/tasks/pre-setup.yml
Basically i have dynamic hosts group name prefix with “cluster_”. The above method of regex way is not working ?. any tricks or best practices to get the dynamic inventory.
another requirement:-
[cluster_x1]
host1
host2
[cluster_x2]
host3
host4
In the above host inventory file, if host2 fails on play, i would like to not to consider other tasks in the play for both host1, host2 for cluster cluster_x1. Is that possible ?.
Thanks
venkat