fix httpd reload only for proxy hosts
This commit is contained in:
parent
864636d23d
commit
e0531fee72
2 changed files with 10 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# reload SERVICE only if PACKAGE is installed.
|
# reload SERVICE only if PACKAGE is installed.
|
||||||
# We use this throughout handlers/restart_services.yml
|
# We use this throughout handlers/restart_services.yml
|
||||||
|
HOST=$(hostname -s)
|
||||||
SERVICE=$1
|
SERVICE=$1
|
||||||
PACKAGE=$2
|
PACKAGE=$2
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ rpm -q $PACKAGE
|
||||||
|
|
||||||
INSTALLED=$?
|
INSTALLED=$?
|
||||||
|
|
||||||
if [ ! -f /etc/httpd/ticketkey_*.tkey ]; then
|
if [ ! -f /etc/httpd/ticketkey_*.tkey -a ! $HOST =~ (^proxy) ]; then
|
||||||
# This host is not configured yet, do not try and restart httpd
|
# This host is not configured yet and not proxy host, do not try and restart httpd
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,8 @@
|
||||||
tags:
|
tags:
|
||||||
- letsencrypt
|
- letsencrypt
|
||||||
delegate_to: "{{ certbot_addhost }}"
|
delegate_to: "{{ certbot_addhost }}"
|
||||||
when: certbot_addhost is defined
|
when:
|
||||||
|
- certbot_addhost is defined
|
||||||
|
|
||||||
- name: Install the intermediate/chain certificate (additional host)
|
- name: Install the intermediate/chain certificate (additional host)
|
||||||
copy: >
|
copy: >
|
||||||
|
@ -120,7 +121,8 @@
|
||||||
tags:
|
tags:
|
||||||
- letsencrypt
|
- letsencrypt
|
||||||
delegate_to: "{{ certbot_addhost }}"
|
delegate_to: "{{ certbot_addhost }}"
|
||||||
when: certbot_addhost is defined
|
when:
|
||||||
|
- certbot_addhost is defined
|
||||||
|
|
||||||
- name: Install the key (additional host)
|
- name: Install the key (additional host)
|
||||||
copy: >
|
copy: >
|
||||||
|
@ -134,7 +136,8 @@
|
||||||
tags:
|
tags:
|
||||||
- letsencrypt
|
- letsencrypt
|
||||||
delegate_to: "{{ certbot_addhost }}"
|
delegate_to: "{{ certbot_addhost }}"
|
||||||
when: certbot_addhost is defined
|
when:
|
||||||
|
- certbot_addhost is defined
|
||||||
|
|
||||||
- name: Install certificate bundle
|
- name: Install certificate bundle
|
||||||
template: >
|
template: >
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue