Using serial strategy for playbook imported in a toplevel playbook causes entire play termination if some host is unreachable

19 views
Skip to first unread message

Andrey Agenosov

unread,
Mar 20, 2018, 11:55:53 AM3/20/18
to Ansible Project
Hello all.
Here is a simplified example:
- import_playbook: test_unavailable_node_different_strategy.yml

- hosts: 127.0.0.1
  connection
: local

# The question is would we end up here in case of imported playbook (above) touches unavailable host
  tasks
:
   
- debug: msg="Playbook finished"Введите код...


And the code for imported playbook:
- hosts: all
 
# Comment the line below and everything would be fine
  serial
: 1

  tasks
:
   
- debug: msg="{{ inventory_hostname }}"Введите код...

So when I'm launching something like this
ansible-playbook -i '127.0.0.1,10.0.0.1' use_unavailable_nodes.yml --ask-pass -u andreyВведите код...
when the 10.0.0.1 host is unreachable, the entire play aborts before reaching the task to be performed locally (see main playbook).

If you comment 'serial: 1' then the local action in the main playbook also would be performed.
Why there is such behaviour? Is this a bug or I'm missing something?

Marcos Alano

unread,
Mar 20, 2018, 1:54:20 PM3/20/18
to ansible...@googlegroups.com
I ran a playbook on batches and one host failed but just that batch stopped.
> --
> 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 ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/3c31fa30-7b75-4fbc-9e3b-ece572980f06%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Marcos H. Alano
Linux System Administrator
marcos...@gmail.com
Reply all
Reply to author
Forward
Message has been deleted
0 new messages