Fix install order on dna-gw hosts
This commit is contained in:
parent
821e783702
commit
f3d9e52f7e
1 changed files with 38 additions and 52 deletions
|
@ -14,7 +14,6 @@
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- base
|
- base
|
||||||
- ifstated
|
|
||||||
- dhcpd
|
- dhcpd
|
||||||
- nginx
|
- nginx
|
||||||
- role: nginx_site
|
- role: nginx_site
|
||||||
|
@ -23,23 +22,6 @@
|
||||||
- websockify
|
- websockify
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Use configured dns servers and domain name
|
|
||||||
ansible.builtin.copy:
|
|
||||||
dest: /etc/dhcpleased.conf
|
|
||||||
content: |
|
|
||||||
interface vio1 {
|
|
||||||
ignore dns
|
|
||||||
}
|
|
||||||
mode: "0644"
|
|
||||||
owner: root
|
|
||||||
group: "{{ ansible_wheel }}"
|
|
||||||
|
|
||||||
- name: Disable resolvd
|
|
||||||
ansible.builtin.service:
|
|
||||||
name: resolvd
|
|
||||||
state: stopped
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- name: Enable ip forwarding
|
- name: Enable ip forwarding
|
||||||
ansible.posix.sysctl:
|
ansible.posix.sysctl:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
|
@ -52,6 +34,44 @@
|
||||||
- name: Run handlers to get interfaces configured
|
- name: Run handlers to get interfaces configured
|
||||||
ansible.builtin.meta: flush_handlers
|
ansible.builtin.meta: flush_handlers
|
||||||
|
|
||||||
|
- name: Import ifstated role
|
||||||
|
ansible.builtin.import_role:
|
||||||
|
name: ifstated
|
||||||
|
|
||||||
|
- name: Copy DNS private key
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: "{{ tls_private }}/dns.home.foo.sh.key"
|
||||||
|
src: "{{ item }}"
|
||||||
|
mode: "0600"
|
||||||
|
owner: root
|
||||||
|
group: "{{ ansible_wheel }}"
|
||||||
|
with_first_found:
|
||||||
|
- /srv/letsencrypt/live/dns.home.foo.sh/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.home.foo.sh.crt"
|
||||||
|
src: "{{ item }}"
|
||||||
|
mode: "0644"
|
||||||
|
owner: root
|
||||||
|
group: "{{ ansible_wheel }}"
|
||||||
|
with_first_found:
|
||||||
|
- /srv/letsencrypt/live/dns.home.foo.sh/fullchain.pem
|
||||||
|
- "/srv/ca/certs/hosts/{{ inventory_hostname }}.crt"
|
||||||
|
tags: certificates
|
||||||
|
notify: Restart unbound
|
||||||
|
|
||||||
|
- name: Import unbound role
|
||||||
|
ansible.builtin.import_role:
|
||||||
|
name: unbound
|
||||||
|
|
||||||
|
- name: Import unbound_exporter role
|
||||||
|
ansible.builtin.import_role:
|
||||||
|
name: unbound_exporter
|
||||||
|
|
||||||
- name: Create tftp boot directories
|
- name: Create tftp boot directories
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /srv/tftpboot/etc
|
path: /srv/tftpboot/etc
|
||||||
|
@ -120,37 +140,3 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
notify: Restart nginx
|
notify: Restart nginx
|
||||||
|
|
||||||
- name: Copy DNS private key
|
|
||||||
ansible.builtin.copy:
|
|
||||||
dest: "{{ tls_private }}/dns.home.foo.sh.key"
|
|
||||||
src: "{{ item }}"
|
|
||||||
mode: "0600"
|
|
||||||
owner: root
|
|
||||||
group: "{{ ansible_wheel }}"
|
|
||||||
with_first_found:
|
|
||||||
- /srv/letsencrypt/live/dns.home.foo.sh/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.home.foo.sh.crt"
|
|
||||||
src: "{{ item }}"
|
|
||||||
mode: "0644"
|
|
||||||
owner: root
|
|
||||||
group: "{{ ansible_wheel }}"
|
|
||||||
with_first_found:
|
|
||||||
- /srv/letsencrypt/live/dns.home.foo.sh/fullchain.pem
|
|
||||||
- "/srv/ca/certs/hosts/{{ inventory_hostname }}.crt"
|
|
||||||
tags: certificates
|
|
||||||
notify: Restart unbound
|
|
||||||
|
|
||||||
- name: Import unbound role
|
|
||||||
ansible.builtin.import_role:
|
|
||||||
name: unbound
|
|
||||||
|
|
||||||
- name: Import unbound_exporter role
|
|
||||||
ansible.builtin.import_role:
|
|
||||||
name: unbound_exporter
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue