I want to setup an ansible pull configuration that can be used across different systems and use cases. With the Host set to localhost and bypassing the use of an inventory file is it possible to make ansible selectively run plays based on detected attributes of the system? Like maybe the hostname or even a text file with predefined “roles” in it?
I just cannot seem to find any information on selectively running plays based on some local criteria with ansible pull.
Ok, I feel silly. I got so tunnel-visioned on trying to figure out how to setup “roles” based on locally detected facts configured at install I diddnt pay attention to the obvious.
I don’t think that option I posted was very obvious, it took me a while to find it myself a while back when I first set it up. I believe I asked in the Ansible form, if I remember correctly.