Ansible multi-play playbook silently ignore plays -


hope can work out why playbook isn't completing expected.

environment

  • osx el capitan
  • ansible 2.1.0.0

configuration

nothing exciting:

[defaults] roles_path=./roles host_key_checking = false ssh_args= -t -t allow_world_readable_tmpfiles = true 

playbook

i have reasonably involved setup number of plays in 1 playbook.

the playbook run against different target systems; production site , dev rig. (please don't suggest combine them... it's iot system , complex enough is.)

here's redacted playbook:

- hosts:   roles:     - ...  - hosts: xmpp_server   roles:     - ...  - hosts: audit_server   roles:     - ...  - hosts: elk_server   roles:     - ...  - hosts:   roles:     - ... 

now, please bear in mind have iot setup various redundancies, replication , distribution going on, although there other ways of skinning cat, above decomposition multiple plays really neat setup , i'd keep it.

also important: have no audit_server or elk_server hosts on dev rig. groups empty i'm working on orthogonal issue , don't need them consuming limited dev resources. have in production, not in dev.

expected behaviour

on production site expect plays trigger , run.

on dev rig expect first play (all) , xmpp_server play run, audit_server , elk_server plays skip , last (all) play run after that.

actual behaviour

the production site works expected. plays run.

the dev rig completes xmpp_server play dev-pia member of xmpp_server group. , silently stops. no error, no information, nothing. straight play recap. here's output:

...  task [xmppserver : include] **************************************************** included: /users/al/studio/projects/smc/ansible/roles/xmppserver/tasks/./openfire.yml dev-pia  task [xmppserver : openfire deb file] ************************************** ok: [dev-pia]  task [xmppserver : install openfire deb file] ********************************** ok: [dev-pia]  task [xmppserver : check if schema has been uploaded previously] *************** ok: [dev-pia]  task [xmppserver : install openfire schema postgres db] ********************* skipping: [dev-pia]     retry, use: --limit @fel.retry  play recap ********************************************************************* dev-vagrant1               : ok=0    changed=0    unreachable=1    failed=0 dev-pia                    : ok=106  changed=3    unreachable=0    failed=0 dev-pib                    : ok=77   changed=3    unreachable=0    failed=0 dev-pic                    : ok=77   changed=3    unreachable=0    failed=0 ... 

so, ran -vvvvv , got nothing more useful:

...

task [xmppserver : install openfire schema postgres db] ********************* task path: /users/al/studio/projects/smc/ansible/roles/xmppserver/tasks/openfire.yml:14 skipping: [dev-pia] => {"changed": false, "skip_reason": "conditional check failed", "skipped": true}     retry, use: --limit @fel.retry  play recap ********************************************************************* dev-vagrant1               : ok=0    changed=0    unreachable=1    failed=0 dev-pia                    : ok=106  changed=2    unreachable=0    failed=0 dev-pib                    : ok=77   changed=3    unreachable=0    failed=0 dev-pic                    : ok=77   changed=3    unreachable=0    failed=0 ... 

help needed

so, question is: why playbook stop there? what's going on?!

it doesn't explicitly there no more hosts left audit_server play; that's best guess. stops if hit eof.

i'm stumped.

edit: nb: retry file contains reference vagrant machine, off. if existence of problem ansible's logic flawed. i'll check in case anyway

edit: omfg missing vagrant box, has nothing goddamn thing. that's shocking , i'll raise issue ansible. but... i'll leave here in case ever has same problem , googles it.

edit: clarity, vagrant machine not in host lists of plays, except special 'all' case.

ansible aborts execution if every host in play unhealthy.
if dev-vagrant1 member of audit_server group, expected behavior (as see dev-vagrant1 marked unreachable).

nevertheless there should line play [audit_server] ******** before to retry, use...


Comments