More compatible playbook with new dna-gw hosts
This commit is contained in:
parent
59c5f7b533
commit
f197409c5d
1 changed files with 8 additions and 5 deletions
|
@ -15,9 +15,11 @@
|
||||||
roles:
|
roles:
|
||||||
- base
|
- base
|
||||||
- dhcpd
|
- dhcpd
|
||||||
- nginx
|
- role: nginx
|
||||||
|
when: "'gw.home.foo.sh' in ssh_hostnames"
|
||||||
- role: nginx_site
|
- role: nginx_site
|
||||||
nginx_site_name: gw.home.foo.sh
|
nginx_site_name: gw.home.foo.sh
|
||||||
|
when: "'gw.home.foo.sh' in ssh_hostnames"
|
||||||
- tftp
|
- tftp
|
||||||
- websockify
|
- websockify
|
||||||
|
|
||||||
|
@ -40,26 +42,26 @@
|
||||||
|
|
||||||
- name: Copy DNS private key
|
- name: Copy DNS private key
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "{{ tls_private }}/dns.home.foo.sh.key"
|
dest: "{{ tls_private }}/dns.{{ inventory_hostname.split('.')[1] }}.foo.sh.key"
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- /srv/letsencrypt/live/dns.home.foo.sh/privkey.pem
|
- "/srv/letsencrypt/live/dns.{{ inventory_hostname.split('.')[1] }}.foo.sh/privkey.pem"
|
||||||
- "/srv/ca/private/{{ inventory_hostname }}.key"
|
- "/srv/ca/private/{{ inventory_hostname }}.key"
|
||||||
tags: certificates
|
tags: certificates
|
||||||
notify: Restart unbound
|
notify: Restart unbound
|
||||||
|
|
||||||
- name: Copy DNS certificate and ca cert
|
- name: Copy DNS certificate and ca cert
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "{{ tls_certs }}/dns.home.foo.sh.crt"
|
dest: "{{ tls_certs }}/dns.{{ inventory_hostname.split('.')[1] }}.foo.sh.crt"
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- /srv/letsencrypt/live/dns.home.foo.sh/fullchain.pem
|
- "/srv/letsencrypt/live/dns.{{ inventory_hostname.split('.')[1] }}.foo.sh/fullchain.pem"
|
||||||
- "/srv/ca/certs/hosts/{{ inventory_hostname }}.crt"
|
- "/srv/ca/certs/hosts/{{ inventory_hostname }}.crt"
|
||||||
tags: certificates
|
tags: certificates
|
||||||
notify: Restart unbound
|
notify: Restart unbound
|
||||||
|
@ -71,3 +73,4 @@
|
||||||
- name: Import unbound_exporter role
|
- name: Import unbound_exporter role
|
||||||
ansible.builtin.import_role:
|
ansible.builtin.import_role:
|
||||||
name: unbound_exporter
|
name: unbound_exporter
|
||||||
|
when: "'gw.home.foo.sh' in ssh_hostnames"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue