Skip to content
Snippets Groups Projects
Commit 23f250c9 authored by jurgenhaas's avatar jurgenhaas
Browse files

Change iptables only if really required

parent f17f06fd
Branches
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
protocol: tcp protocol: tcp
jump: ACCEPT jump: ACCEPT
state: present state: present
when: groups.proxyserver is defined and inventory_hostname in groups.proxyserver
- name: Install New Cert via webroot - name: Install New Cert via webroot
shell: certbot certonly --expand --non-interactive --config /etc/letsencrypt/{{ cert.domain }}.ini --cert-name {{ cert.domain }} --webroot-path /var/www/html --webroot shell: certbot certonly --expand --non-interactive --config /etc/letsencrypt/{{ cert.domain }}.ini --cert-name {{ cert.domain }} --webroot-path /var/www/html --webroot
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
protocol: tcp protocol: tcp
jump: ACCEPT jump: ACCEPT
state: absent state: absent
when: groups.proxyserver is defined and inventory_hostname in groups.proxyserver
- include_tasks: cert_deploy.yml - include_tasks: cert_deploy.yml
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
protocol: tcp protocol: tcp
jump: ACCEPT jump: ACCEPT
state: present state: present
when: groups.proxyserver is defined and inventory_hostname in groups.proxyserver
- name: Renew Existing Certs via webroot - name: Renew Existing Certs via webroot
shell: certbot renew --non-interactive --webroot-path /var/www/html --webroot shell: certbot renew --non-interactive --webroot-path /var/www/html --webroot
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
protocol: tcp protocol: tcp
jump: ACCEPT jump: ACCEPT
state: absent state: absent
when: groups.proxyserver is defined and inventory_hostname in groups.proxyserver
- include_tasks: cert_deploy.yml - include_tasks: cert_deploy.yml
with_items: '{{ letsencrypt_certificates|default([]) }}' with_items: '{{ letsencrypt_certificates|default([]) }}'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment