infrastructure/playbooks/tasks/chat/x509.yml

33 lines
874 B
YAML

---
- name: Disable movim website
ansible.builtin.file:
path: "{{ nginx.paths.sites_enabled }}/{{ movim.domain }}"
state: absent
- name: Disable auto redirect to TLS
ansible.builtin.file:
path: "{{ nginx.paths.sites_enabled }}/redirect_to_https"
state: absent
- name: Enable default website
ansible.builtin.file:
dest: "{{ nginx.paths.sites_enabled }}/default"
src: "{{ nginx.paths.sites_available }}/default"
state: link
- name: Install X509 certificates
ansible.builtin.command:
argv:
- certbot
- certonly
- --agree-tos
- -m psotmaster@trans13nrv.eu.org
- --nginx
- -d
- "{{ movim.domain }}"
creates: "/etc/letsencrypt/live/{{ movim.domain }}/privkey.pem"
- name: Disable default website
ansible.builtin.file:
path: "{{ nginx.paths.sites_enabled }}/default"
state: absent