34 lines
693 B
YAML
34 lines
693 B
YAML
---
|
|
- name: Install certbot
|
|
become: true
|
|
apt:
|
|
name: certbot
|
|
state: present
|
|
update_cache: yes
|
|
|
|
- name: Create acme directory
|
|
become: true
|
|
file:
|
|
path: /var/www/acme
|
|
state: directory
|
|
mode: 0755
|
|
|
|
- name: Copy acme apache conf
|
|
become: true
|
|
copy:
|
|
src: acme.conf
|
|
dest: /etc/apache2/conf-available/acme.conf
|
|
|
|
- name: Activate acme apache conf
|
|
become: true
|
|
command: a2enconf acme
|
|
register: result
|
|
changed_when: "'already enabled' not in result.stdout"
|
|
notify: Reload apache2 service
|
|
|
|
- name: Allow certbot renewal
|
|
become: true
|
|
copy:
|
|
src: http-certbot.conf
|
|
dest: /etc/nftables/input.d/http-certbot.conf
|
|
notify: Reload nftables service
|