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
|
||||
copy:
|
||||
dest: /opt/thinlinc/etc/tlwebaccess/server.key
|
||||
src: "/srv/ca/private/{{ inventory_hostname }}.key"
|
||||
src: "{{ item }}"
|
||||
mode: 0600
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
with_first_found:
|
||||
- "/srv/letsencrypt/live/{{ inventory_hostname }}/privkey.pem"
|
||||
- "/srv/ca/certs/{{ inventory_hostname }}.key"
|
||||
tags: certificates
|
||||
notify: restart tlwebaccess
|
||||
|
||||
- name: copy certificate
|
||||
copy:
|
||||
dest: /opt/thinlinc/etc/tlwebaccess/server.crt
|
||||
src: "/srv/ca/certs/{{ inventory_hostname }}.crt"
|
||||
src: "{{ item }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
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
|
||||
notify: restart tlwebaccess
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue