summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathaniel Case <this.is@nathanielca.se>2018-10-09 21:18:32 -0400
committerToshio Kuratomi <a.badger@gmail.com>2018-10-09 18:18:32 -0700
commitb1b93c7a226d9bcd557c0b2ed78bbee3d8bd916a (patch)
treecbf1f79dcfb17e13135b8c9464f26f3b7b4ccfae
parentcf28d22211e60656758691d74fd38a8ff0e8dff7 (diff)
downloadansible-b1b93c7a226d9bcd557c0b2ed78bbee3d8bd916a.tar.gz
[2.7] Clean up after ansible-connection if failure occurred in start() (#45930)
* [2.7] Clean up after ansible-connection if failure occurred in start() (#45929) (cherry picked from commit 0d143ed) Co-authored-by: Nathaniel Case <this.is@nathanielca.se> * Add changelog fragment
-rwxr-xr-xbin/ansible-connection2
-rw-r--r--changelogs/fragments/ansible-connection-cleanup-when-failed.yaml2
2 files changed, 4 insertions, 0 deletions
diff --git a/bin/ansible-connection b/bin/ansible-connection
index 09656a5541..ac378a4d87 100755
--- a/bin/ansible-connection
+++ b/bin/ansible-connection
@@ -271,6 +271,8 @@ def main():
if rc == 0:
process.run()
+ else:
+ process.shutdown()
sys.exit(rc)
diff --git a/changelogs/fragments/ansible-connection-cleanup-when-failed.yaml b/changelogs/fragments/ansible-connection-cleanup-when-failed.yaml
new file mode 100644
index 0000000000..e57839d1fa
--- /dev/null
+++ b/changelogs/fragments/ansible-connection-cleanup-when-failed.yaml
@@ -0,0 +1,2 @@
+bugfixes:
+ - ansible-connection - Clean up socket files if playbook aborted before connection is started.