update lego and secrets
This commit is contained in:
1
ansible/roles/lego/defaults/main.yaml
Normal file
1
ansible/roles/lego/defaults/main.yaml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
lego_method: dns
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
- name: Gather package facts
|
|
||||||
ansible.builtin.package_facts:
|
|
||||||
manager: auto
|
|
||||||
|
|
||||||
- name: Generate initial cert (http)
|
- name: Generate initial cert (http)
|
||||||
command:
|
command:
|
||||||
cmd: /usr/local/bin/lego -a --email="{{ letsencrypt_email }}" --domains="{{ inventory_hostname | default(cert_domain) }}" --key-type {{ cert_key_type | default('rsa4096') }} --http run
|
cmd: /usr/local/bin/lego -a --email="{{ letsencrypt_email }}" --domains="{{ inventory_hostname | default(cert_domain) }}" --key-type {{ cert_key_type | default('rsa4096') }} --http run
|
||||||
chdir: /root
|
chdir: /root
|
||||||
creates: "/root/.lego/certificates/{{ inventory_hostname | default(cert_domain) }}.crt"
|
creates: "/root/.lego/certificates/{{ inventory_hostname | default(cert_domain) }}.crt"
|
||||||
|
when: lego_method == 'http'
|
||||||
|
|
||||||
- name: Generate initial cert (dns)
|
- name: Generate initial cert (dns)
|
||||||
command:
|
command:
|
||||||
@@ -17,3 +14,4 @@
|
|||||||
LINODE_POLLING_INTERVAL: 120
|
LINODE_POLLING_INTERVAL: 120
|
||||||
LINODE_PROPAGATION_TIMEOUT: 600
|
LINODE_PROPAGATION_TIMEOUT: 600
|
||||||
LINODE_TOKEN: {{ linode_dns_token }}
|
LINODE_TOKEN: {{ linode_dns_token }}
|
||||||
|
when: lego_method == 'dns'
|
||||||
|
|||||||
Reference in New Issue
Block a user