Skip to content

Instantly share code, notes, and snippets.

View realdimas's full-sized avatar

Dima Scherbakov realdimas

View GitHub Profile
@realdimas
realdimas / reset_connect_via_direct_ssh_invocation.yml
Last active April 24, 2020 01:48
Manual reset_connection via local SSH invocation for Ansible v2.5.0 … v2.5.5 (fixed in v2.5.6)
# As of Ansible 2.5.2 reset_connection meta function is broken
# (see https://github.com/ansible/ansible/issues/27520)
# Below is reimplementation of reset_connect via local ssh command invocation
# Requires Ansible 2.5+ (config lookup plugin) and OpenSSH 5.9+ ("-O stop" command)
# *Update*
# Fixed in v2.5.6
# https://github.com/ansible/ansible/blob/stable-2.5/changelogs/CHANGELOG-v2.5.rst#bugfixes-9
- name: Reset persistent connection to host