1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_acmetool.git synced 2024-08-16 12:29:49 +02:00
ansible_role_acmetool/tasks/main.yml

73 lines
1.5 KiB
YAML
Raw Normal View History

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
- 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
- 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
- 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
- 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'
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
- 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
tags:
- operation
- acmetool