thinlinc-server: Use Let's Encrypt certs if available
This commit is contained in:
parent
ca3270d89b
commit
00088239fa
1 changed files with 8 additions and 2 deletions
|
@ -62,21 +62,27 @@
|
||||||
- name: copy private key
|
- name: copy private key
|
||||||
copy:
|
copy:
|
||||||
dest: /opt/thinlinc/etc/tlwebaccess/server.key
|
dest: /opt/thinlinc/etc/tlwebaccess/server.key
|
||||||
src: "/srv/ca/private/{{ inventory_hostname }}.key"
|
src: "{{ item }}"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
|
with_first_found:
|
||||||
|
- "/srv/letsencrypt/live/{{ inventory_hostname }}/privkey.pem"
|
||||||
|
- "/srv/ca/certs/{{ inventory_hostname }}.key"
|
||||||
tags: certificates
|
tags: certificates
|
||||||
notify: restart tlwebaccess
|
notify: restart tlwebaccess
|
||||||
|
|
||||||
- name: copy certificate
|
- name: copy certificate
|
||||||
copy:
|
copy:
|
||||||
dest: /opt/thinlinc/etc/tlwebaccess/server.crt
|
dest: /opt/thinlinc/etc/tlwebaccess/server.crt
|
||||||
src: "/srv/ca/certs/{{ inventory_hostname }}.crt"
|
src: "{{ item }}"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
validate: /usr/bin/openssl x509 -in %s -noout
|
validate: /usr/bin/openssl x509 -in %s -noout
|
||||||
|
with_first_found:
|
||||||
|
- "/srv/letsencrypt/live/{{ inventory_hostname }}/fullchain.pem"
|
||||||
|
- "/srv/ca/private/{{ inventory_hostname }}.crt"
|
||||||
tags: certificates
|
tags: certificates
|
||||||
notify: restart tlwebaccess
|
notify: restart tlwebaccess
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue