Skip to content

Commit

Permalink
Clear Ansible SSH control path on reboot
Browse files Browse the repository at this point in the history
When rebooting the SD servers, remove the local Ansible SSH control
path directory, ensuring stale connections won't break later steps.
  • Loading branch information
rmol committed Apr 24, 2019
1 parent 7765fde commit c98e7f3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions install_files/ansible-base/tasks/reboot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c98e7f3

Please sign in to comment.