mirror of
https://github.com/DO1JLR/ansible_role_nginx.git
synced 2024-08-16 16:19:48 +02:00
24 lines
675 B
YAML
24 lines
675 B
YAML
---
|
|
- name: Copy shell script to enable tls sites
|
|
become: true
|
|
copy:
|
|
src: 'files/acmetool/enable_tls.sh'
|
|
dest: '/etc/acme/hooks/enable_tls.sh'
|
|
owner: root
|
|
group: root
|
|
mode: 'u=rx,g=r,o='
|
|
|
|
- name: Get certificate for default server
|
|
become: true
|
|
command: acmetool want '{{ inventory_hostname }}'
|
|
args:
|
|
creates: '/var/lib/acme/live/{{ inventory_hostname }}'
|
|
|
|
- name: Get certificates for all configured sites
|
|
become: true
|
|
command: acmetool want '{{ ([site.name] + (site.altnames | default([]) )) | join(" ") }}'
|
|
args:
|
|
creates: '/var/lib/acme/live/{{ site.name }}/'
|
|
with_items: '{{ nginx_sites }}'
|
|
loop_control:
|
|
loop_var: site
|