2019-07-27 17:11:01 +02:00
|
|
|
---
|
2021-03-20 18:28:29 +01:00
|
|
|
- name: Perform optional versionscheck
|
|
|
|
ansible.builtin.include_tasks: versioncheck.yml
|
2021-03-20 17:59:44 +01:00
|
|
|
when: submodules_versioncheck|bool
|
2019-07-27 17:11:01 +02:00
|
|
|
|
|
|
|
- name: Install acmetool
|
2021-05-10 23:30:54 +02:00
|
|
|
become: true
|
2021-02-24 00:31:07 +01:00
|
|
|
ansible.builtin.package:
|
2019-07-27 17:11:01 +02:00
|
|
|
name: 'acmetool'
|
|
|
|
state: present
|
|
|
|
tags:
|
|
|
|
- installation
|
2020-11-03 20:29:52 +01:00
|
|
|
- acmetool
|
|
|
|
|
2019-07-27 17:11:01 +02:00
|
|
|
- name: Create directory for acmetool response file
|
2021-05-10 23:30:54 +02:00
|
|
|
become: true
|
2021-02-24 00:31:07 +01:00
|
|
|
ansible.builtin.file:
|
2019-07-27 17:11:01 +02:00
|
|
|
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
|
2021-05-10 23:30:54 +02:00
|
|
|
become: true
|
2021-02-24 00:31:07 +01:00
|
|
|
ansible.builtin.template:
|
2019-07-27 17:11:01 +02:00
|
|
|
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
|
2021-03-20 17:59:44 +01:00
|
|
|
# Todo: with_first_found?
|
2021-02-24 00:31:07 +01:00
|
|
|
# consider usage of loop:
|
2019-07-27 17:11:01 +02:00
|
|
|
|
|
|
|
- name: Perform acmetool quickstart
|
2021-05-10 23:30:54 +02:00
|
|
|
become: true
|
2021-02-24 00:31:07 +01:00
|
|
|
ansible.builtin.command: acmetool quickstart --expert
|
2019-07-27 17:11:01 +02:00
|
|
|
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
|
2021-05-10 23:30:54 +02:00
|
|
|
become: true
|
2021-02-24 00:31:07 +01:00
|
|
|
ansible.builtin.copy:
|
2019-07-27 17:11:01 +02:00
|
|
|
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
|
2021-05-10 23:30:54 +02:00
|
|
|
become: true
|
2021-02-24 00:31:07 +01:00
|
|
|
ansible.builtin.systemd:
|
2019-07-27 17:44:40 +02:00
|
|
|
name: 'acmetool.timer'
|
2021-03-20 18:28:29 +01:00
|
|
|
daemon_reload: true
|
|
|
|
enabled: true
|
2019-07-27 17:44:40 +02:00
|
|
|
state: started
|
2020-11-03 20:29:52 +01:00
|
|
|
tags:
|
|
|
|
- operation
|
|
|
|
- acmetool
|