Skip to content

Instantly share code, notes, and snippets.

@ganeshrn
Last active April 23, 2018 20:54
Show Gist options
  • Save ganeshrn/e5334f1700ca03b2727b8efb70b67393 to your computer and use it in GitHub Desktop.
Save ganeshrn/e5334f1700ca03b2727b8efb70b67393 to your computer and use it in GitHub Desktop.
$ git diff
diff --git a/bin/ansible-connection b/bin/ansible-connection
index ed6070b..57fd128 100755
--- a/bin/ansible-connection
+++ b/bin/ansible-connection
@@ -161,7 +161,7 @@ def main():
result = {}
messages = list()
socket_path = None
-
+ display.display("ansible-connection: main: %s" % os.getppid(), log_only=True)
# Need stdin as a byte stream
if PY3:
stdin = sys.stdin.buffer
diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py
index ab6915d..598992a 100644
--- a/lib/ansible/executor/task_executor.py
+++ b/lib/ansible/executor/task_executor.py
@@ -882,6 +882,7 @@ class TaskExecutor:
'''
Starts the persistent connection
'''
+ display.display("task_executor: _start_connection: %s" % os.getppid(), log_only=True)
master, slave = pty.openpty()
python = sys.executable
diff --git a/lib/ansible/plugins/connection/network_cli.py b/lib/ansible/plugins/connection/network_cli.py
index 3f198d1..bc1eaf5 100644
--- a/lib/ansible/plugins/connection/network_cli.py
+++ b/lib/ansible/plugins/connection/network_cli.py
@@ -280,6 +280,7 @@ class Connection(ConnectionBase):
'''
Connects to the remote device and starts the terminal
'''
+ display.display("network_cli: _connect: %s" % os.getppid(), log_only=True)
if self.connected:
return
@ganeshrn
Copy link
Author

2018-04-24 02:21:21,369 p=74384 u=gnalawad |  task_executor: _start_connection: 74384
2018-04-24 02:21:21,861 p=74391 u=gnalawad |  ansible-connection: main: 74390
2018-04-24 02:21:21,908 p=74391 u=gnalawad |  network_cli: _connect: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment