forked from infra/ansible
User certbot role for Log Detective
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
This commit is contained in:
parent
f4c497e764
commit
51a458f26b
3 changed files with 52 additions and 1 deletions
|
|
@ -23,4 +23,12 @@ tcp_ports: [
|
|||
22, 80, 443, 8090,
|
||||
]
|
||||
|
||||
letsencrypt:
|
||||
certificates:
|
||||
logdetective01.fedorainfracloud.org:
|
||||
challenge_dir: /var/www/html
|
||||
domains:
|
||||
- logdetective01.fedorainfracloud.org
|
||||
mail: copr-devel@lists.fedorahosted.org
|
||||
|
||||
zabbix_host: 38.145.32.41
|
||||
|
|
|
|||
18
roles/logdetective/files/certbot-deploy-hook.sh
Normal file
18
roles/logdetective/files/certbot-deploy-hook.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#! /bin/sh
|
||||
|
||||
copy_certs () {
|
||||
# Copy certificates to location where service will look for them
|
||||
cp /etc/letsencrypt/live/logdetective01.fedorainfracloud.org/fullchain.pem /root/logdetective/server/fullchain.pem
|
||||
cp /etc/letsencrypt/live/logdetective01.fedorainfracloud.org/privkey.pem /root/logdetective/server/privkey.pem
|
||||
cp /etc/letsencrypt/live/logdetective01.fedorainfracloud.org/chain.pem /root/logdetective/server/chain.pem
|
||||
cp /etc/letsencrypt/live/logdetective01.fedorainfracloud.org/cert.pem /root/logdetective/server/cert.pem
|
||||
}
|
||||
|
||||
case $1 in --init)
|
||||
copy_certs
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
copy_certs
|
||||
# Restart the service
|
||||
systemctl restart logdetective.service
|
||||
|
|
@ -14,7 +14,32 @@
|
|||
- wget
|
||||
- gcc-c++
|
||||
- firewalld
|
||||
- certbot
|
||||
|
||||
- name: Install certbot deploy hook
|
||||
ansible.builtin.copy:
|
||||
src: certbot-deploy-hook.sh
|
||||
dest: /usr/libexec/auto-certbot-deploy
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
tags:
|
||||
- certbot
|
||||
|
||||
- name: Install letsencrypt ssl certificates
|
||||
include_role: name=certbot
|
||||
tags:
|
||||
- certbot
|
||||
|
||||
- name: Configure certbot deploy hook
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/sysconfig/certbot
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
content: |
|
||||
DEPLOY_HOOK="--deploy-hook /usr/libexec/auto-certbot-deploy"
|
||||
tags:
|
||||
- certbot
|
||||
|
||||
- name: Download the cuda repofile
|
||||
ansible.builtin.get_url:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue