I'd like to able to run an ansible task only if the host of the current playbook does not belong to a certain group. In semi pseudo code:
- name: my command
command: echo stuff
when: "if {{ ansible_hostname }} not in {{ ansible_current_groups }}"
How should I do this?
` then why would someone put a `if my current host not in my current groups execute command` which will never execute in their tasks?
– YosSaL Dec 11 '22 at 10:09