Correction for DNSDist(DoH DoT) service
This commit is contained in:
@@ -38,20 +38,20 @@
|
||||
path: /etc/dnsdist/dnsdist.conf
|
||||
regexp: '__SSL_CRT__'
|
||||
replace: '/etc/ssl/{{ domain}}.crt'
|
||||
when: installCertbot == false
|
||||
when: installCertbot == False
|
||||
|
||||
- name: Add SSL keys to dnsdist.conf
|
||||
ansible.builtin.replace:
|
||||
path: /etc/dnsdist/dnsdist.conf
|
||||
regexp: '__SSL_KEY__'
|
||||
replace: '/etc/ssl/{{ domain}}.key'
|
||||
when: installCertbot == false
|
||||
when: installCertbot == False
|
||||
|
||||
- name: permission to ssl cert
|
||||
shell: |
|
||||
setfacl -R -m u:_dnsdist:rx /etc/ssl/"{{ domain }}".key
|
||||
setfacl -R -m u:_dnsdist:rx /etc/ssl/"{{ domain }}".crt
|
||||
when: installCertbot == false
|
||||
when: installCertbot == False
|
||||
|
||||
|
||||
|
||||
@@ -59,23 +59,30 @@
|
||||
ansible.builtin.replace:
|
||||
path: /etc/dnsdist/dnsdist.conf
|
||||
regexp: '__SSL_CRT__'
|
||||
replace: '/etc/letsencrypt/{{ domain}}/fullchain.pem'
|
||||
when: installCertbot == true
|
||||
replace: '/etc/letsencrypt/live/{{ domain}}/fullchain.pem'
|
||||
when: installCertbot == True
|
||||
|
||||
- name: Add SSL keys to dnsdist.conf
|
||||
ansible.builtin.replace:
|
||||
path: /etc/dnsdist/dnsdist.conf
|
||||
regexp: '__SSL_KEY__'
|
||||
replace: '/etc/letsencrypt/{{ domain}}/privkey.pem'
|
||||
when: installCertbot == true
|
||||
replace: '/etc/letsencrypt/live/{{ domain}}/privkey.pem'
|
||||
when: installCertbot == True
|
||||
|
||||
- name: Set permission letsencrypt SSL keys
|
||||
shell: setfacl -R -m u:_dnsdist:rx /etc/letsencrypt/
|
||||
when: installCertbot == true
|
||||
when: installCertbot == True
|
||||
|
||||
|
||||
- name: Disable and stop systemd-resolved
|
||||
shell: |
|
||||
systemctl disable systemd-resolved
|
||||
systemctl stop systemd-resolved || echo "systemd-resolved is already stopped"
|
||||
|
||||
- name: Start dnsdist service
|
||||
shell: "systemctl start dnsdist"
|
||||
|
||||
|
||||
|
||||
- name: Enable systemd service
|
||||
shell: "systemctl enable dnsdist"
|
||||
Reference in New Issue
Block a user