Select Git revision
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
main.yml 1.98 KiB
---
# file: acmetool/tasks/main.yml
- name: ensure acmetool is installed
apt: name=acmetool state=present
tags:
- acmetool
- packages
- name: ensure we have our response file
template:
src: response-file.yml.j2
dest: /var/lib/acme/quickstart-reponses.yml
owner: root
group: root
mode: '0644'
tags:
- acmetool
- config
- name: check if acmetool is configured
command: acmetool status
register: acmetool_status
changed_when: false
tags:
- acmetool
- config
- name: initially configure acmetool
# yamllint disable-line rule:line-length
command: acmetool quickstart --expert --batch --response-file /var/lib/acme/quickstart-reponses.yml
when: not acmetool_status.stdout is search(acmetool_endpoint)
tags:
- acmetool
- config
- name: ensure acmetool reloads the right service
template:
src: reload-config.j2
dest: /etc/default/acme-reload
owner: root
group: root
mode: '0644'
tags:
- acmetool
- config
- name: ensure we can modify the systemd unit
file:
path: /etc/systemd/system/acmetool.service.d
state: directory
owner: root
group: root
mode: '0755'
notify:
- reload systemd service files
tags:
- acmetool
- services
- name: ensure systemd waits for the right service
copy:
src: service-after.conf
dest: /etc/systemd/system/acmetool.service.d/nginx-proxy.conf
owner: root
group: root
mode: '0644'
notify:
- reload systemd service files
tags: