From 6a5092ce3150cb149976010c15820e1d6427bf42 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Sat, 6 Dec 2025 17:56:29 +0000 Subject: [PATCH] ovh: Fix handler to restart SSH --- playbook.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/playbook.yaml b/playbook.yaml index 5f4e2e1..cd833f2 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -14,7 +14,7 @@ backup: true become: true notify: - - restart ssh + - Restart SSH - name: Update authorized SSH keys for Ansible user ansible.builtin.copy: dest: '/home/{{ ansible_user }}/.ssh/authorized_keys' @@ -23,6 +23,13 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJEmkV9arotms79lJPsLHkdzAac4eu3pYS08ym0sB/on qenya@tohru ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFjBuuxo+w3yED0aPnsNb8S90p/GgBqFEG9K4ETZ5Wkq qenya@kilgharrah mode: "0600" + + handlers: + - name: Restart SSH + ansible.builtin.service: + name: sshd + state: restarted + - name: Enable automatic upgrades hosts: ovh tasks: @@ -46,9 +53,3 @@ enabled: true state: started become: true - - handlers: - - name: Restart SSH - ansible.builtin.service: - name: sshd - state: restarted