Interesting... I'm using version 2.4.0.0 (fresh enough as you see) and
that's what I have with serial strategy:
andrey@aagenosov:~/projects/devops/ansible_notes$ ansible-playbook -i
'127.0.0.1,10.0.0.1' use_unavailable_nodes.yml --ask-pass -u andrey
SSH password:
PLAY [all]
***********************************************************************************************************************************************************************
TASK [Gathering Facts]
***********************************************************************************************************************************************************
ok: [127.0.0.1]
TASK [debug]
*********************************************************************************************************************************************************************
ok: [127.0.0.1] => {
"msg": "127.0.0.1"
}
PLAY [all]
***********************************************************************************************************************************************************************
TASK [Gathering Facts]
***********************************************************************************************************************************************************
*fatal: [10.0.0.1]: UNREACHABLE! => {"changed": false, "msg":
"Authentication failure.", "unreachable": true}*
PLAY RECAP
***********************************************************************************************************************************************************************
10.0.0.1 : ok=0 changed=0 unreachable=1
failed=0
127.0.0.1 : ok=2 changed=0 unreachable=0 failed=0
So Ansible didn't reach the last task in the main playbook - the entire
play was aborted.
вторник, 20 марта 2018 г., 20:54:20 UTC+3 пользователь Marcos Alano написал:
>
> I ran a playbook on batches and one host failed but just that batch
> stopped.
>
> On Tue, Mar 20, 2018 at 12:55 PM, Andrey Agenosov
> <[email protected] <javascript:>> wrote:
> > 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?
> >
> > --
> > 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] <javascript:>.
> > To post to this group, send email to [email protected]
> <javascript:>.
> > 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
> [email protected] <javascript:>
>
--
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/3d665120-c1ab-41e7-af6c-fc777e566819%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.