Good morning. I’m trying to develop a network module, but I’ve been stuck here for a few days.
I am having a hard time because of the persistent connection code.
I have noticed that there was a socket handler file in the “~/.ansible/pc” folder and we can use persistent connection through this handler.
But when I run the code, the socket path name is created, but the handler file is not created and an error occurred.
When I analyzed the code, I noticed that there was a problem with the “/usr/bin/ansible-connection” code. Exactly the problem occurred in the code below.
###################### ANSIBLE CODE in /usr/bin/ansible-connection #######################
def main():
.
.
server = Server(socket_path, pc)
.
.
class Server():
.
.
self.connection = connection_loader.get(play_context.connection, play_context, sys.stdin)
self.connection._connect()
.
.