You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
---
|
|
|
|
- name: Download acme.sh
|
|
become_user: "{{ acme_system_user }}"
|
|
git:
|
|
repo: "{{ acme_source_repository }}"
|
|
version: "{{ acme_source_version }}"
|
|
dest: "{{ acme_source_directory }}"
|
|
update: no
|
|
|
|
- name: Configure acme.sh
|
|
become_user: "{{ acme_system_user }}"
|
|
command: >-
|
|
./acme.sh --install
|
|
--home {{ acme_installation_directory | quote }}
|
|
--config-home {{ acme_configuration_directory | quote }}
|
|
--cert-home {{ acme_internal_certificates_directory | quote }}
|
|
--accountemail {{ acme_account_mail | quote }}
|
|
args:
|
|
chdir: "{{ acme_source_directory }}"
|
|
creates: "{{ acme_installation_directory }}"
|
|
|
|
- name: Upgrade acme.sh
|
|
become_user: "{{ acme_system_user }}"
|
|
command:
|
|
./acme.sh --upgrade
|
|
--home {{ acme_installation_directory | quote }}
|
|
--config-home {{ acme_configuration_directory | quote }}
|
|
args:
|
|
chdir: "{{ acme_installation_directory }}"
|
|
register: acme_upgrade_results
|
|
changed_when: acme_upgrade_results.rc == 0 and "Upgrade success" in acme_upgrade_results.stdout
|
|
|
|
- name: Create directory for certificates
|
|
file:
|
|
path: "{{ acme_certificates_directory }}"
|
|
state: directory
|
|
owner: "{{ acme_system_user }}"
|
|
group: "{{ acme_system_user }}"
|
|
mode: "u=rwx,g=,o="
|