diff options
-rw-r--r-- | roles/dns/tasks/main.yml | 9 | ||||
-rw-r--r-- | roles/mail/tasks/main.yml | 9 | ||||
-rw-r--r-- | roles/web/tasks/main.yml | 14 |
3 files changed, 21 insertions, 11 deletions
diff --git a/roles/dns/tasks/main.yml b/roles/dns/tasks/main.yml index 83cf50d..44b3d74 100644 --- a/roles/dns/tasks/main.yml +++ b/roles/dns/tasks/main.yml @@ -70,9 +70,12 @@ - debug: var=zonefiles -- name: NSD - generate zone files - include_tasks: nsd-zone.yml zonefile={{ item }} - with_items: "{{ zonefiles }}" +- block: + - name: NSD - generate zone files + include_tasks: nsd-zone.yml + vars: + zonefile: "{{ item }}" + with_items: "{{ zonefiles }}" tags: zones # NOTE: requires variable `zonefiles` diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml index 81afd0a..652bb72 100644 --- a/roles/mail/tasks/main.yml +++ b/roles/mail/tasks/main.yml @@ -49,9 +49,12 @@ state: directory tags: opendkim -- name: opendkim - generate domain keys - include_tasks: dkim-genkey.yml domain={{ item }} - with_items: "{{ mail.domains }}" +- block: + - name: opendkim - generate domain keys + include_tasks: dkim-genkey.yml + vars: + domain: "{{ item }}" + with_items: "{{ mail.domains }}" tags: opendkim - name: opendkim - generate tables diff --git a/roles/web/tasks/main.yml b/roles/web/tasks/main.yml index d25fdc8..e2e402b 100644 --- a/roles/web/tasks/main.yml +++ b/roles/web/tasks/main.yml @@ -111,9 +111,12 @@ tags: acme # Credit: https://shasawas.wordpress.com/2016/05/23/how-to-loop-over-a-set-of-tasks-in-ansible/ -- name: acme - generate and copy domain private keys - include_tasks: acme-domainkey.yml domain={{ item.name }} - with_items: "{{ domains }}" +- block: + - name: acme - generate and copy domain private keys + include_tasks: acme-domainkey.yml + vars: + domain: "{{ item.name }}" + with_items: "{{ domains }}" tags: - acme - acme-renew @@ -157,6 +160,7 @@ weekly_acme_client_renewscript="/usr/local/etc/acme/acme-client.sh" weekly_acme_client_deployscript="/usr/local/etc/acme/deploy.sh" -- name: nginx - re-generate sites - include_tasks: nginx-gensites.yml +- block: + - name: nginx - re-generate sites + include_tasks: nginx-gensites.yml tags: sites |