30 lines
817 B
YAML
30 lines
817 B
YAML
|
---
|
||
|
- name: "Add domain to cerificate list"
|
||
|
lineinfile:
|
||
|
path: /etc/dehydrated/domains.txt
|
||
|
insertafter: "^# nextcloud"
|
||
|
line: "{{ nextcloud_domain }}"
|
||
|
# when: dehydrated_installiert
|
||
|
delegate_to: "{{ nextcloud_gateway }}"
|
||
|
|
||
|
- name: "Obtain certificate"
|
||
|
command: dehydrated --cron -g
|
||
|
delegate_to: "{{ nextcloud_gateway }}"
|
||
|
|
||
|
- name: "Copy webserver site configuration"
|
||
|
template:
|
||
|
src: nginx_site.j2
|
||
|
dest: "/etc/nginx/sites-available/{{ nextcloud_domain }}"
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0644
|
||
|
delegate_to: "{{ nextcloud_gateway }}"
|
||
|
|
||
|
- name: "Enable site configuration"
|
||
|
file:
|
||
|
src: "/etc/nginx/sites-available/{{ nextcloud_domain }}"
|
||
|
dest: "/etc/nginx/sites-enabled/{{ nextcloud_domain }}"
|
||
|
state: link
|
||
|
notify: reload nginx
|
||
|
delegate_to: "{{ nextcloud_gateway }}"
|