1
0
Fork 0
forked from infra/ansible

User certbot role for Log Detective

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
This commit is contained in:
Jiri Podivin 2026-07-01 16:59:59 +02:00 committed by Miroslav Suchý
commit 51a458f26b
3 changed files with 52 additions and 1 deletions

View file

@ -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

View 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

View file

@ -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: