2019-07-27 17:11:01 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Install acmetool
|
|
|
|
package:
|
|
|
|
name: 'acmetool'
|
|
|
|
state: present
|
|
|
|
tags:
|
|
|
|
- installation
|
2020-11-03 20:29:52 +01:00
|
|
|
- acmetool
|
|
|
|
|
|
|
|
|
|
|
|
# Todo: Reconsider best practice
|
|
|
|
#- name: Remove acmetool snippet for nginx from package installation
|
|
|
|
# file:
|
|
|
|
# path: '/etc/nginx/snippets/acmetool.conf'
|
|
|
|
# state: absent
|
|
|
|
# tags:
|
|
|
|
# - installation
|
|
|
|
# - configuration
|
|
|
|
# - acmetool
|
2019-07-27 17:11:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
- name: Create directory for acmetool response file
|
|
|
|
file:
|
|
|
|
name: '/var/lib/acme/conf'
|
|
|
|
state: directory
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 'u=rwx,g=rx,o=rx'
|
|
|
|
tags:
|
|
|
|
- installation
|
2020-11-03 20:29:52 +01:00
|
|
|
- acmetool
|
2019-07-27 17:11:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
- name: Copy acmetool response file
|
|
|
|
template:
|
|
|
|
src: 'files/response-file.yml.j2'
|
|
|
|
dest: '/var/lib/acme/conf/responses'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 'u=rw,g=r,o=r'
|
|
|
|
tags:
|
|
|
|
- configuration
|
2020-11-03 20:29:52 +01:00
|
|
|
- acmetool
|
|
|
|
# Todo: with_first_found?
|
2019-07-27 17:11:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
- name: Perform acmetool quickstart
|
|
|
|
command: acmetool quickstart --expert
|
|
|
|
args:
|
|
|
|
creates: '/var/lib/acme/conf/target'
|
|
|
|
tags:
|
|
|
|
- configuration
|
|
|
|
- operation
|
2020-11-03 20:29:52 +01:00
|
|
|
- acmetool
|
2019-07-27 17:11:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
- name: Copy hook to enable acmetool to restart services
|
|
|
|
copy:
|
|
|
|
src: 'files/restart'
|
2020-11-03 20:29:52 +01:00
|
|
|
dest: '/etc/acme/hooks/'
|
2019-07-27 17:11:01 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 'u=rx,g=rx,o=rx'
|
|
|
|
tags:
|
|
|
|
- configuration
|
2020-11-03 20:29:52 +01:00
|
|
|
- acmetool
|
2019-07-27 17:44:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
- name: Reload systemd and enable acmetool timer unit
|
|
|
|
systemd:
|
|
|
|
name: 'acmetool.timer'
|
|
|
|
daemon_reload: yes
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
2020-11-03 20:29:52 +01:00
|
|
|
tags:
|
|
|
|
- operation
|
|
|
|
- acmetool
|