Hi, I have written a playbook which runs a bash script. The script imports a ndjson kibana dashboard that i had previously exported and saved.
Here is the command
curl -X POST “Reverse_PROXY_IP/kibana/api/saved_objects/_import?createNewCopies=true” -H “Content-Type: application/x-ndjson” --form file=@./dashboard.ndjson -u name:pwd
When i run this command directly without the playbook it successfully executes. But with the playbook i am getting the following erro
The full traceback is:
NoneType: None
fatal: [10.0.2.4]: FAILED! => {
“changed”: true,
“msg”: “non-zero return code”,
“rc”: 26,
“stderr”: “OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for \r\ndebug2: resolve_canonicalize: hostname 10.0.2.4 is address\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 = 1726\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 26\r\nShared connection to 10.0.2.4 closed.\r\n",
“stderr_lines”: [
“OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020”,
“debug1: Reading configuration data /etc/ssh/ssh_config”,
"debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/.conf matched no files”,
“debug1: /etc/ssh/ssh_config line 21: Applying options for *”,
“debug2: resolve_canonicalize: hostname 10.0.2.4 is address”,
“debug1: auto-mux: Trying existing master”,
“debug2: fd 3 setting O_NONBLOCK”,
“debug2: mux_client_hello_exchange: master version 4”,
“debug3: mux_client_forwards: request forwardings: 0 local, 0 remote”,
“debug3: mux_client_request_session: entering”,
“debug3: mux_client_request_alive: entering”,
“debug3: mux_client_request_alive: done pid = 1726”,
“debug3: mux_client_request_session: session request sent”,
“debug3: mux_client_read_packet: read header failed: Broken pipe”,
“debug2: Received exit status from master 26”,
“Shared connection to 10.0.2.4 closed.”
],
“stdout”: “curl: (26) Failed to open/read local data from file/application\r\n”,
- “stdout_lines”: [*
- “curl: (26) Failed to open/read local data from file/application”*
]
}
This thing worked previously using the playbook. With the current setup the only difference is that ansible machine also has apache on it which acts as reverse proxy for kibana machine which only has a private IP. Please Help!