From c98e7f3bff18d5976804d6d9ed38832d1cbabcef Mon Sep 17 00:00:00 2001 From: John Hensley Date: Tue, 23 Apr 2019 20:40:12 -0400 Subject: [PATCH] Clear Ansible SSH control path on reboot When rebooting the SD servers, remove the local Ansible SSH control path directory, ensuring stale connections won't break later steps. --- install_files/ansible-base/tasks/reboot.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install_files/ansible-base/tasks/reboot.yml b/install_files/ansible-base/tasks/reboot.yml index d239d309ffd..31d02db82b6 100644 --- a/install_files/ansible-base/tasks/reboot.yml +++ b/install_files/ansible-base/tasks/reboot.yml @@ -17,6 +17,15 @@ tags: - reboot +- name: Clear out SSH sessions, to prevent reuse of stale ControlPersist file. + local_action: + module: file + args: + path: /home/amnesia/.ansible/cp + state: absent + run_once: yes + become: no + - name: Wait for server to come back. local_action: wait_for args: