make sure variables are defined before parsing value
This commit is contained in:
@@ -12,6 +12,10 @@
|
|||||||
- mysql is defined
|
- mysql is defined
|
||||||
- mysql == true
|
- mysql == true
|
||||||
- import_tasks: install_postgres.yml
|
- import_tasks: install_postgres.yml
|
||||||
when: postgres == true
|
when:
|
||||||
|
- postgres is defined
|
||||||
|
- postgres == true
|
||||||
- import_tasks: install_redis.yml
|
- import_tasks: install_redis.yml
|
||||||
when: redis == true
|
when:
|
||||||
|
- redis is defined
|
||||||
|
- redis == true
|
||||||
@@ -6,7 +6,10 @@
|
|||||||
- block:
|
- block:
|
||||||
- include_tasks: install_unbound.yml
|
- include_tasks: install_unbound.yml
|
||||||
- include_tasks: configure_unbound_snmpd.yml
|
- include_tasks: configure_unbound_snmpd.yml
|
||||||
when: unbound == true and powerdns_recursor != true
|
when:
|
||||||
|
- unbound is defined
|
||||||
|
- unbound == true
|
||||||
|
- powerdns is not defined or powerdns_recursor != true
|
||||||
|
|
||||||
- name: nameserver | unbound | disable systemd-resolved
|
- name: nameserver | unbound | disable systemd-resolved
|
||||||
include_tasks: disable-systemd-resolved.yml
|
include_tasks: disable-systemd-resolved.yml
|
||||||
@@ -15,12 +18,18 @@
|
|||||||
- block:
|
- block:
|
||||||
- include_tasks: install_bind.yml
|
- include_tasks: install_bind.yml
|
||||||
- include_tasks: configure_bind_snmpd.yml
|
- include_tasks: configure_bind_snmpd.yml
|
||||||
when: bind == true and powerdns_auth != true
|
when:
|
||||||
|
- bind is defined
|
||||||
|
- bind == true
|
||||||
|
- powerdns_auth is not defined or powerdns_auth != true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_tasks: install_powerdns_recursor.yml
|
- include_tasks: install_powerdns_recursor.yml
|
||||||
- include_tasks: configure_powerdns_recursor_snmpd.yml
|
- include_tasks: configure_powerdns_recursor_snmpd.yml
|
||||||
when: powerdns_recursor == true and unbound != true
|
when:
|
||||||
|
- powerdns_recursor is defined
|
||||||
|
- powerdns_recursor == true
|
||||||
|
- unbound is not defined or unbound != true
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: task_failed=true
|
- set_fact: task_failed=true
|
||||||
Reference in New Issue
Block a user