Update lego to only install, no initial certs since it varies by purpose
This commit is contained in:
@@ -1,19 +1 @@
|
||||
- name: Download and untar lego
|
||||
unarchive:
|
||||
src: https://github.com/go-acme/lego/releases/download/v{{ lego_version }}/lego_v{{ lego_version }}_linux_amd64.tar.gz
|
||||
dest: /usr/local/bin
|
||||
remote_src: yes
|
||||
|
||||
- name: Check if certs exist
|
||||
stat:
|
||||
path: /root/.lego/certificates/{{ inventory_hostname | default(cert_domain) }}.crt
|
||||
register: cert_check
|
||||
|
||||
- name: Generate an initial cert if not present
|
||||
include_tasks:
|
||||
file: initial_cert.yaml
|
||||
when: not cert_check.stat.exists
|
||||
|
||||
- name: Copy certificates
|
||||
include_tasks:
|
||||
file: copy_certs.yaml
|
||||
- import_tasks: install.yaml
|
||||
|
||||
Reference in New Issue
Block a user