Reorganize acme vars

This commit is contained in:
Salt 2020-08-02 19:32:07 -05:00
parent 0164fa4660
commit 12fb975a2a

View File

@ -34,8 +34,8 @@
email_address: "rehashedsalt@cock.li"
- name: Create challenge for CSR
acme_certificate:
acme_directory: "{{ acme_directory }}"
acme_version: 2
acme.directory: "{{ acme.directory }}"
acme.version: 2
terms_agreed: yes
account_email: "rehashedsalt@cock.li"
account_key: "/etc/pki/cert/private/account.key"
@ -61,19 +61,19 @@
state: reloaded
- name: Create well-known directory
file:
path: "{{ acme_webroot }}/.well-known/acme-challenge"
path: "{{ acme.webroot }}/.well-known/acme-challenge"
mode: "0755"
recurse: yes
state: directory
- name: Copy challenge files
copy:
dest: "{{ acme_webroot }}/{{ com_challenge['challenge_data'][website_url]['http-01']['resource'] }}"
dest: "{{ acme.webroot }}/{{ com_challenge['challenge_data'][website_url]['http-01']['resource'] }}"
content: "{{ com_challenge['challenge_data'][website_url]['http-01']['resource_value'] }}"
when: com_challenge['challenge_data']|length > 0
- name: Create certificate
acme_certificate:
acme_directory: "{{ acme_directory }}"
acme_version: 2
acme.directory: "{{ acme.directory }}"
acme.version: 2
account_key: /etc/pki/cert/private/account.key
csr: "/etc/pki/cert/csr/{{ website_url }}.csr"
dest: "/etc/pki/cert/crt/{{ website_url }}.crt"
@ -94,7 +94,7 @@
block:
- name: Remove webroot
file:
path: "{{ acme_webroot }}/.well-known/acme-challenge"
path: "{{ acme.webroot }}/.well-known/acme-challenge"
state: absent
- name: Remove temporary config
file: