run_once does that for a task, yes.
Long-form, may be useful, as well;
# all of em
- hosts: webservers
tasks:
- blarg
- blarg
# just on the head node
- hosts: webservers[0]
tasks:
- blarg
- blarg
# now some others
- hosts: dbservers
tasks:
- blarg
On Fri, Aug 8, 2014 at 10:33 AM, Guy Matz <[email protected]> wrote:
> Super-sweet! For anyone who is wondering, the "full" documentation is in
> here: http://docs.ansible.com/playbooks_delegation.html
>
> Thanks!!!!!
>
>
> On Friday, August 8, 2014 10:15:16 AM UTC-4, Michael Peters wrote:
>
>> Ansible 1.7 added the new "run_once" keyword so that a given action
>> will only run once for that host list.
>>
>> On Fri, Aug 8, 2014 at 10:08 AM, Guy Matz <[email protected]> wrote:
>> > Hi! I have a few django servers . . . I would like to run a syncdb in
>> my
>> > playbook, but only need/want one of the django servers in the group to
>> run
>> > that play . . . do I need to designate a machine to run that or is
>> there an
>> > easier way?
>> >
>> > Thanks!!
>> >
>> > --
>> > 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].
>> > To post to this group, send email to [email protected].
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msgid/ansible-project/
>> 0253c2bf-768c-42ce-aa46-e5d0618cd09c%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/efd58a61-94b3-41f5-8c12-843e8f4db16b%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/efd58a61-94b3-41f5-8c12-843e8f4db16b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
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].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyAX7%3DZwGjNL8MZOsnOBDJZqv-%3DvbZQ6%3DpHu%3DWASpAeVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.