thefinn93 / ansible-letsencrypt

An ansible role to generate TLS certificates and get them signed by Let's Encrypt
GNU General Public License v3.0
442 stars 122 forks source link

Role breaks the run when should be skipped by condition #45

Closed aleksandr-vin closed 7 years ago

aleksandr-vin commented 8 years ago

This playbook will fail even if it should skip the whole run:

- hosts: all
  roles:
  - role: letsencrypt
    when: false

Checked on 38fa972.

This is the output:

ansible-playbook -i hosts --diff -b xxx.yml --limit monitor-01.test

PLAY [all] *********************************************************************

TASK [setup] *******************************************************************
ok: [monitor-01.test]

TASK [letsencrypt : apt] *******************************************************
skipping: [monitor-01.test]

TASK [letsencrypt : include_vars] **********************************************
skipping: [monitor-01.test] => (item=/private/etc/ansible/roles/letsencrypt/vars/../vars/default.yml)

TASK [letsencrypt : Install depends] *******************************************
fatal: [monitor-01.test]: FAILED! => {"failed": true, "msg": "'letsencrypt_depends' is undefined"}
    to retry, use: --limit @/tmp/xxx.retry

PLAY RECAP *********************************************************************
monitor-01.test            : ok=1    changed=0    unreachable=0    failed=1