ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

commit e88e8816fd62e43801acdc68183146a6062e7a30
parent 9eab3aa8a826eafeb2b7ac1bc4de6838bca3ed02
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Sun,  2 Dec 2018 18:14:04 +0200

haproxy: Make sure haproxy is reloaded daily

Diffstat:
ansible/inventory/group_vars/all/apt_install.yml | 2+-
ansible/inventory/host_vars/spinny/haproxy.yml | 2+-
ansible/roles/haproxy/templates/concat_certificates.sh.j2 | 1+
ansible/roles/haproxy/templates/haproxy.cfg.j2 | 2+-
4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/ansible/inventory/group_vars/all/apt_install.yml b/ansible/inventory/group_vars/all/apt_install.yml @@ -4,4 +4,4 @@ apt_install__packages: [git, vim, rxvt-unicode-256color, screen, tmux, fail2ban, mlocate, htop, sudo, ferm, strace, ltrace, file, monit, less, nmon, colordiff, bash-completion, telnet, dstat, ca-certificates, curl, sysstat, tcpdump, zsh, mosh, lsof, iotop, netcat, mtr-tiny, bwm-ng, - etckeeper,prometheus-node-exporter] + etckeeper, prometheus-node-exporter] diff --git a/ansible/inventory/host_vars/spinny/haproxy.yml b/ansible/inventory/host_vars/spinny/haproxy.yml @@ -6,4 +6,4 @@ static__private_ip: '192.168.122.2' certs__names: ['f.erethon.com', 'chat.erethon.com', 'grafana.erethon.com', 'capitalism.erethon.com', 'blog.erethon.com', 'erethon.com', - 'www.plothopes.com'] + 'www.plothopes.com', 'about.erethon.com', 'git.erethon.com'] diff --git a/ansible/roles/haproxy/templates/concat_certificates.sh.j2 b/ansible/roles/haproxy/templates/concat_certificates.sh.j2 @@ -3,3 +3,4 @@ {% for item in certs__names %} cat /etc/letsencrypt/live/{{ item }}/fullchain.pem /etc/letsencrypt/live/{{ item }}/privkey.pem > /etc/ssl/private/{{ item }}.pem; {% endfor %} +service haproxy reload diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2 @@ -52,7 +52,7 @@ frontend ssl use_backend plothopes if { hdr(host) -i plothopes.com -i www.plothopes.com } use_backend f.erethon.com if { hdr(host) -i f.erethon.com } use_backend grafana.erethon.com if { hdr(host) -i grafana.erethon.com } - use_backend static if { hdr(host) -i capitalism.erethon.com -i hacked.erethon.com -i erethon.com -i www.erethon.com -i blog.erethon.com } + use_backend static if { hdr(host) -i capitalism.erethon.com -i hacked.erethon.com -i erethon.com -i www.erethon.com -i blog.erethon.com -i about.erethon.com -i git.erethon.com } backend plothopes mode http