On Wed, Nov 20, 2019 at 07:46:20PM -0800, chavali shruti wrote: > Suppose I want to blacklist a host of a group, in the inventory file, so as > not to allow the running of any other tasks on it. How can i do it? > I do want it in my hosts list and later, after i run a playbook on it.. i > want to blacklist it, so that others cannot run on it. > 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 -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/20191121124827.GB200354%40localhost.localdomain.