Skip to content
Snippets Groups Projects
Commit 7bb5691e authored by jurgenhaas's avatar jurgenhaas
Browse files

Improve letsencrypt renewal

parent cd514817
Branches
No related tags found
No related merge requests found
......@@ -6,6 +6,3 @@
accept_hostkey: yes
repo: 'https://github.com/letsencrypt/letsencrypt'
dest: '/opt/letsencrypt'
- name: "Initialize LetsEncrypt"
shell: /opt/letsencrypt/letsencrypt-auto --help
......@@ -12,6 +12,9 @@
- include: install.yml
when: letsencrypt_available is defined and letsencrypt_available.stdout != '/opt/letsencrypt/letsencrypt-auto'
- name: "Run LetsEncrypt once, will be faster next time"
shell: /opt/letsencrypt/letsencrypt-auto --help
- include: renew.yml
when: letsencrypt_available is defined and letsencrypt_available.stdout == '/opt/letsencrypt/letsencrypt-auto'
tags: 'renew'
......
......@@ -5,7 +5,7 @@
service:
name='{{ item }}'
state='stopped'
with_items: '{{ letsencrypt_pause_services }}'
with_items: '{{ letsencrypt_pause_services|default([]) }}'
- name: "Renew Existing Certs"
shell: /opt/letsencrypt/letsencrypt-auto renew
......@@ -15,4 +15,4 @@
service:
name='{{ item }}'
state='started'
with_items: '{{ letsencrypt_pause_services }}'
with_items: '{{ letsencrypt_pause_services|default([]) }}'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment