hi
I need to skip a role in my playbook if a server doesn’t exist inside hosts file
hosts file:
[webserver]
server1.domain
server2.domain
[machine01]
server1.domain
[machine02]
server2.domain
play:
- name: Scaling out the cluster
hosts: webserver
tags: scaleout
roles: - scalingout
role:
tasks file for scalingoutcluster
- name: Checking if there exist a cluster. If not, skip this tasks