On 6 December 2013 20:40, Andrew Martin <[email protected]> wrote:

> Thanks for the information. In order to exclude a hostname called
> "mailserver", would I simply add a hosts line like this to the top of the
> postfix role's tasks/main.yml?
>   - hosts:!mailserver
>   - name: task1
>   ...
>   - name: task2
>   ...
> Will this override the list of hosts that I provide to the playbooks that
> include this role?
>

No. the hosts: keyword is to be set at play level, not at task level:

- name: mailserver play
>   hosts:
>  postfixservers:
> !mailserver
>   tasks:
>   - ...
>   roles:
>   - ...

-- 
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.

Reply via email to