Skip to content
Snippets Groups Projects
Commit 56b46082 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-roles/haproxy#8 Sync proxy pool when certs got renewed

parent c0e9ed1a
No related branches found
No related tags found
No related merge requests found
...@@ -25,32 +25,10 @@ ...@@ -25,32 +25,10 @@
- name: "Renew Existing Cert" - name: "Renew Existing Cert"
include: '../../letsencrypt/tasks/renew.yml' include: '../../letsencrypt/tasks/renew.yml'
- name: "Build HaCerts" - name: "Build HaProxy Certs"
include: 'buildcerts.yml' include: 'buildcerts.yml'
- name: "Set directory permissions to current user"
file:
path: '/etc/letsencrypt'
owner: '{{ ansible_env.SUDO_USER }}'
recurse: yes
tags: 'Certs'
when: proxy_active
tags: 'Certs' tags: 'Certs'
when: 'proxy_active and "letsencrypt" not in excluded_roles' when: 'proxy_active and "letsencrypt" not in excluded_roles'
- block: - include_tasks: 'proxypool.yml'
- name: "Pull Certs from active Proxy"
include: 'pullcerts.yml'
tags: 'Certs'
when: 'not proxy_active and "letsencrypt" not in excluded_roles'
- name: "Set directory permissions to root"
file:
path: '/etc/letsencrypt'
owner: 'root'
recurse: yes
tags: 'Certs'
when: 'proxy_active and "letsencrypt" not in excluded_roles'
---
# file: roles/haproxy/tasks/proxypool.yml
- name: "Set directory permissions to current user"
file:
path: '/etc/letsencrypt'
owner: '{{ ansible_env.SUDO_USER }}'
recurse: yes
tags: 'Certs'
when: 'proxy_active is defined and proxy_active and "letsencrypt" not in excluded_roles'
- name: "Pull Certs from active Proxy"
include: 'pullcerts.yml'
tags: 'Certs'
when: 'proxy_active is defined and not proxy_active and "letsencrypt" not in excluded_roles'
- name: "Set directory permissions to root"
file:
path: '/etc/letsencrypt'
owner: 'root'
recurse: yes
tags: 'Certs'
when: 'proxy_active is defined and proxy_active and "letsencrypt" not in excluded_roles'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment