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.
|
|
|
---
|
|
|
|
|
|
|
|
- meta: flush_handlers
|
|
|
|
|
|
|
|
- name: "Issue certificate for {{ domain }}"
|
|
|
|
command: >-
|
|
|
|
./acme.sh --issue
|
|
|
|
--domain "{{ domain }}"
|
|
|
|
--webroot "{{ nginx_validation_directory }}"
|
|
|
|
args:
|
|
|
|
chdir: "~/.acme.sh"
|
|
|
|
register: acme_issue_result
|
|
|
|
failed_when: acme_issue_result.rc != 0 and "Domains not changed" not in acme_issue_result.stdout
|
|
|
|
|
|
|
|
- name: "Install certificate for {{ domain }}"
|
|
|
|
command: >-
|
|
|
|
./acme.sh --install-cert
|
|
|
|
--domain "{{ domain }}"
|
|
|
|
--key-file "{{ acme_key_location }}"
|
|
|
|
--fullchain-file "{{ acme_certificate_location }}"
|
|
|
|
--reloadcmd "service nginx force-reload"
|
|
|
|
args:
|
|
|
|
chdir: "~/.acme.sh"
|
|
|
|
creates: "{{ acme_key_location }}"
|
|
|
|
register: acme_install_result
|
|
|
|
failed_when: acme_install_result.rc != 0 and "Reload error for" not in acme_install_result.stderr
|