Is it possible to prevent a playbook, role, or even specific task from > being run on a certain list of hostnames (or group)? I have a generic > playbook for configuring postfix for sending emails, however I don't want > this playbook to ever be run against a mail server (which has a different > postfix configuration). The idea behind blacklisting it in the playbook > itself is so that if someone accidentally runs "ansible-playbook all > postfix.yml" it won't override the configuration on the mail servers. Can > this be done? >
Yes, see http://www.ansibleworks.com/docs/intro_patterns.html : You can exclude groups as well, for instance, all machines must be in the group webservers but not in the group phoenix: webservers:!phoenix -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
