Add intdomain variable to simplify configs
This commit is contained in:
parent
05b4c3a9f4
commit
e55dd35605
4 changed files with 9 additions and 8 deletions
|
@ -42,26 +42,26 @@
|
|||
|
||||
- name: Copy DNS private key
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ tls_private }}/dns.{{ inventory_hostname.split('.')[1] }}.foo.sh.key"
|
||||
dest: "{{ tls_private }}/dns.{{ intdomain }}.key"
|
||||
src: "{{ item }}"
|
||||
mode: "0600"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
with_first_found:
|
||||
- "/srv/letsencrypt/live/dns.{{ inventory_hostname.split('.')[1] }}.foo.sh/privkey.pem"
|
||||
- "/srv/letsencrypt/live/dns.{{ intdomain }}/privkey.pem"
|
||||
- "/srv/ca/private/{{ inventory_hostname }}.key"
|
||||
tags: certificates
|
||||
notify: Restart unbound
|
||||
|
||||
- name: Copy DNS certificate and ca cert
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ tls_certs }}/dns.{{ inventory_hostname.split('.')[1] }}.foo.sh.crt"
|
||||
dest: "{{ tls_certs }}/dns.{{ intdomain }}.crt"
|
||||
src: "{{ item }}"
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
with_first_found:
|
||||
- "/srv/letsencrypt/live/dns.{{ inventory_hostname.split('.')[1] }}.foo.sh/fullchain.pem"
|
||||
- "/srv/letsencrypt/live/dns.{{ intdomain }}/fullchain.pem"
|
||||
- "/srv/ca/certs/hosts/{{ inventory_hostname }}.crt"
|
||||
tags: certificates
|
||||
notify: Restart unbound
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue