ansible - Kill own ssh connections -
i have question on ansible. want disconnect ansible session using task , after time ansible should reconnect. checked ansible galaxy. there module
ssh reconnect: usage:- name: kill own ssh connections ssh-reconnect:
which has python module library. added py module library folder ansible disconnect ssh sessions.
but following error:
fatal: [127.0.0.1]: failed! => {"changed": false, "failed": true, "invocation": {"module_name": "ssh-reconnect"}, "module_stderr": "openssh_6.6.1, openssl 1.0.1f 6 jan 2014\r\ndebug1: reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: applying options *\r\ndebug1: auto-mux: trying existing master\r\ndebug2: fd 3 setting o_nonblock\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 9543\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: broken pipe\r\ndebug2: received exit status master 0\r\nshared connection 127.0.0.1 closed.\r\n", "module_stdout": "\r\n", "msg": "module failure", "parsed": false}
approach two:
i separated tasks playbooks different roles, 1 task of installing software , next take new session , see changes.
my problem os not allow changes take effect in same ansible session.
but ansible using old session think, because if take manual session, can see expected output in ansible session not getting it.
Comments
Post a Comment