We create a disabled group in our inventory file, that we add hosts to
when we want to blacklist them for some reason. For example:
[foobar]
example1
example2
example3
[disabled]
example2
Then in our playbooks we do the following:
- hosts: foobar:!disabled
tasks:
...
This would be example1 and example3 would run, but example2 would not.
- Paul