From dce8d35fe4f347d96e0ccc4a4109324c3103be11 Mon Sep 17 00:00:00 2001 From: Asara Date: Wed, 30 Sep 2020 22:40:16 -0400 Subject: [PATCH] Add reloads for new certs in consul --- ansible/roles/consul_server/handlers/main.yml | 10 ++++++++++ ansible/roles/consul_server/tasks/Debian.yml | 1 + ansible/roles/consul_server/tasks/FreeBSD.yml | 1 + 3 files changed, 12 insertions(+) diff --git a/ansible/roles/consul_server/handlers/main.yml b/ansible/roles/consul_server/handlers/main.yml index d360c40..1251682 100644 --- a/ansible/roles/consul_server/handlers/main.yml +++ b/ansible/roles/consul_server/handlers/main.yml @@ -3,6 +3,16 @@ systemd: daemon_reload: True +- name: reload_consul_debian + systemd: + name: consul + state: reloaded + +- name: reload_consul_fbsd + service: + name: consul + state: reloaded + - name: restart_consul_debian systemd: name: consul diff --git a/ansible/roles/consul_server/tasks/Debian.yml b/ansible/roles/consul_server/tasks/Debian.yml index ee6c320..68e926e 100644 --- a/ansible/roles/consul_server/tasks/Debian.yml +++ b/ansible/roles/consul_server/tasks/Debian.yml @@ -47,6 +47,7 @@ VAULT_FORMAT: json register: cert_data when: exp.rc != 0 + notify: reload_consul - name: write cert data to server copy: diff --git a/ansible/roles/consul_server/tasks/FreeBSD.yml b/ansible/roles/consul_server/tasks/FreeBSD.yml index 17bf956..a850327 100644 --- a/ansible/roles/consul_server/tasks/FreeBSD.yml +++ b/ansible/roles/consul_server/tasks/FreeBSD.yml @@ -47,6 +47,7 @@ VAULT_FORMAT: json register: cert_data when: exp.rc != 0 + notify: reload_consul - name: write cert data to server copy: