This commit is contained in:
2025-12-23 19:18:39 -07:00
commit 5282bdcf6d
20 changed files with 430 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
- 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