Hello
I have a bunch of custom services linked to a service aka jbossas
eg.
chkconfig --list | grep jboss
jboss.jvm1 0:off 1:off 2:off 3:off 4:off 5:off 6:off
jboss.jvm2 0:off 1:off 2:off 3:off 4:off 5:off 6:off
Is there a way with Ansilbe to check for the existence of a service ie. jboss.jvm[1-8] if conditional do X
I have tried with nested_loops but this looks seems extremely ineffeciant to connect and check for each of the possible 48 services for each node in ansible.
ideally a state=present in the service module would be great to use in a scnearios where you need to query a bunch of nodes to find a particular service and aka, patch or change a config based on its presence
Example
Playbook