Skip to content

Commit

Permalink
SRE-880 Restart etcd on certificate change
Browse files Browse the repository at this point in the history
Etcd does not automatically pickup changes to CA certificates. This
commits adds an automatic restart step on certificate change.

See etcd-io/etcd#11555 for context.

Signed-off-by: Jean-Tiare Le Bigot <[email protected]>
  • Loading branch information
yadutaf committed Feb 19, 2024
1 parent faedd7a commit 5cb55b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
- name: restart etcd
ansible.builtin.systemd_service:
daemon_reload: true
name: etcd
state: restarted

- name: reload systemd
systemd:
daemon_reload: yes
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
group: root
with_items:
- "{{ etcd_certificates }}"
notify:
- restart etcd
no_log: true
tags:
- etcd
Expand Down

0 comments on commit 5cb55b2

Please sign in to comment.