Yes, the play could just have one task in it.

A serial task in the middle of several non-serial ones would look like this
in a single playbook file.

- hosts: webservers
  tasks:
    -
    -
    -

- hosts: webservers
  serial: 1
  tasks:
   -

- hosts: webservers




On Sun, Apr 6, 2014 at 11:10 AM, Paul Durivage <[email protected]>wrote:

> Correct, a task does not allow the keyword serial to be defined on it.
>  There's no need to define an entirely new playbook, but you will have to
> declare a new play.
>
>
> On Fri, Apr 4, 2014 at 12:39 PM, Khaled Janania 
> <[email protected]>wrote:
>
>> The documentation doesn't really answer the question though.  Does that
>> mean there's no way to define one task as serial?  In other words, serial
>> only applies for all tasks?
>>
>> On Thursday, January 23, 2014 8:06:38 PM UTC-5, Michael DeHaan wrote:
>>>
>>> That's a pretty old post.
>>>
>>> You should read up on the "serial:" keyword in Ansible.
>>>
>>> http://docs.ansible.com/playbooks_delegation.html#id6
>>>
>>> serial: 1
>>>
>>>
>>> On Thu, Jan 23, 2014 at 6:53 PM, Mike Sop <[email protected]> wrote:
>>>
>>>> Came across another ticket describing a change to make a "playbook"
>>>> serial (I'm guessing that means all tasks in the playbook):
>>>> https://groups.google.com/forum/#!searchin/
>>>> ansible-project/task$20serial/ansible-project/ZrSuwsqv1m8/-o-bJTQuJnUJ
>>>>
>>>> would like to have more granular control and just specify particular
>>>> task(s) as serial, is that possible?  Perhaps the intended way of doing
>>>> this is to create a new playbook for those particular tasks?  Seems like
>>>> overkill but am willing to give it a shot (beats having to run ALL my tasks
>>>> with forks 1 or serial 1)
>>>>
>>>> --
>>>> 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].
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>
>>>
>>> --
>>> Michael DeHaan <[email protected]>
>>> CTO, AnsibleWorks, Inc.
>>> http://www.ansibleworks.com/
>>>
>>>   --
>> 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/9cb5a77d-5d06-4b90-bb4a-94f480cac288%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/9cb5a77d-5d06-4b90-bb4a-94f480cac288%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/CAK6JQEFjMyytfHWENpESJFh30eO9zJzKw0R9SxeoeYeBMWhsVQ%40mail.gmail.com<https://groups.google.com/d/msgid/ansible-project/CAK6JQEFjMyytfHWENpESJFh30eO9zJzKw0R9SxeoeYeBMWhsVQ%40mail.gmail.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/CAEVJ8QPao311J3WJPhPndxhVcm%2ByAQjyJhLQ_eeDheshq68hZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to