extend existing certificate list instead of overwriting it. Ansible realy needs a deep merge...

This commit is contained in:
nd 2020-04-26 11:57:17 +02:00
parent d2ddb8a666
commit 1ddb7fa78d
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
4 changed files with 10 additions and 5 deletions

View file

@ -1,4 +1,14 @@
---
- set_fact:
nginx_certs: "{{ nginx.vhosts|nginx_vhosts_to_certificates }}"
inventory_certs: "{{ certificates.certs|d({}) }}"
- include_role:
name: certificates
vars:
certificates:
certs: "{{ {}|combine(nginx_certs, inventory_certs, recursive=True) }}"
- name: install nginx
apt: pkg=nginx
notify: