Unknown action 0 Command fail. Return code -1 || Ansible Fortios module

I’m trying to execute commands with fortios module via ssh – username and password. (Not ssh key)

‘”‘”‘echo ~admin && sleep 0′”‘”” is being used by ssh even though I have mentioned ansible_network_os=fortinet.fortios.fortios
in the inventory file.

The commands using raw works but I’m unable to use any of the fortios modules. The same error occurs everytime.

hosts_css (Inventory):

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>[testing]
Hello ansible_host=10.172.139.2 ansible_user=admin ansible_password=<password> ansible_ssh_extra_args='-o StrictHostKeyChecking=no' ansible_connection=ssh
[all:vars]
ansible_network_os=fortinet.fortios.fortios
</code>
<code>[testing] Hello ansible_host=10.172.139.2 ansible_user=admin ansible_password=<password> ansible_ssh_extra_args='-o StrictHostKeyChecking=no' ansible_connection=ssh [all:vars] ansible_network_os=fortinet.fortios.fortios </code>
[testing]
Hello ansible_host=10.172.139.2 ansible_user=admin ansible_password=<password> ansible_ssh_extra_args='-o StrictHostKeyChecking=no' ansible_connection=ssh

[all:vars]
ansible_network_os=fortinet.fortios.fortios

pls.yml (playbook):

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>- hosts: testing
gather_facts: no
collections:
- fortinet.fortios
tasks:
- name: Get system status using CLI
raw: get system status
register: system_status_output
- debug:
var: system_status_output.stdout_lines
- name: Get license status
fortinet.fortios.fortios_monitor_fact:
vdom: root
selectors:
- selector: license_status
- selector: system_status
- selector: firewall_security-policy
params:
policyid: '1'
</code>
<code>- hosts: testing gather_facts: no collections: - fortinet.fortios tasks: - name: Get system status using CLI raw: get system status register: system_status_output - debug: var: system_status_output.stdout_lines - name: Get license status fortinet.fortios.fortios_monitor_fact: vdom: root selectors: - selector: license_status - selector: system_status - selector: firewall_security-policy params: policyid: '1' </code>
- hosts: testing
  gather_facts: no
  collections:
    - fortinet.fortios
  tasks:
    - name: Get system status using CLI
      raw: get system status
      register: system_status_output

    - debug:
        var: system_status_output.stdout_lines

    - name: Get license status
      fortinet.fortios.fortios_monitor_fact:
        vdom: root
        selectors:
            - selector: license_status
            - selector: system_status
            - selector: firewall_security-policy
              params:
                  policyid: '1'
        

ansible.cfg:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>[defaults]
interpreter_python=/usr/local/bin/python
host_key_checking = false
</code>
<code>[defaults] interpreter_python=/usr/local/bin/python host_key_checking = false </code>
[defaults]
interpreter_python=/usr/local/bin/python
host_key_checking = false

Task with raw module gets executed properly:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>TASK [Get system status using CLI] ************************************************************************************************************************************************************************
task path: /home/tejas/Ansible/pls.yml:7
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' -tt 10.172.139.2 'get system status'
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # Version: FortiGate-100F v6.2.3,build6188,200109 (GA)rnFirmware Signature: certified
.......
debug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rnShared connection to 10.172.139.2 closed.rn')
</code>
<code>TASK [Get system status using CLI] ************************************************************************************************************************************************************************ task path: /home/tejas/Ansible/pls.yml:7 <10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin <10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' -tt 10.172.139.2 'get system status' <10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # Version: FortiGate-100F v6.2.3,build6188,200109 (GA)rnFirmware Signature: certified ....... debug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rnShared connection to 10.172.139.2 closed.rn') </code>
TASK [Get system status using CLI] ************************************************************************************************************************************************************************
task path: /home/tejas/Ansible/pls.yml:7
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' -tt 10.172.139.2 'get system status'
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # Version: FortiGate-100F v6.2.3,build6188,200109 (GA)rnFirmware Signature: certified

.......
debug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rnShared connection to 10.172.139.2 closed.rn')

This is the debug output for Get license status task which I tried to execute with fortinet.fortios.fortios_monitor_fact:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>TASK [Get license status] *********************************************************************************************************************************************************************************
task path: /home/tejas/Ansible/pls.yml:14
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 '/bin/sh -c '"'"'echo ~admin && sleep 0'"'"''
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn')
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo trondheim02-vpn-1-mgmt #/.ansible/tmp `"&& mkdir "` echo trondheim02-vpn-1-mgmt #/.ansible/tmp/ansible-tmp-1721587091.1048012-8344-202590340256464 `" && echo ansible-tmp-1721587091.1048012-8344-202590340256464="` echo trondheim02-vpn-1-mgmt #/.ansible/tmp/ansible-tmp-1721587091.1048012-8344-202590340256464 `" ) && sleep 0'"'"''
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn')
Using module file /home/tejas/.ansible/collections/ansible_collections/fortinet/fortios/plugins/modules/fortios_monitor_fact.py
<10.172.139.2> PUT /home/tejas/.ansible/tmp/ansible-local-8321msrd7qqs/tmp2l6h9yru TO trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py
<10.172.139.2> SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' '[10.172.139.2]'
[WARNING]: sftp transfer mechanism failed on [10.172.139.2]. Use ANSIBLE_DEBUG=1 to see detailed information
<10.172.139.2> SSH: EXEC sshpass -d12 scp -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' /home/tejas/.ansible/tmp/ansible-local-8321msrd7qqs/tmp2l6h9yru '[10.172.139.2]:'"'"'trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py'"'"''
[WARNING]: scp transfer mechanism failed on [10.172.139.2]. Use ANSIBLE_DEBUG=1 to see detailed information
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 'dd of=trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py bs=65536'
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn')
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn')
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 '/bin/sh -c '"'"'chmod u+x '"'"'"'"'"'"'"'"'trondheim02-vpn-1-mgmt #/'"'"'"'"'"'"'"'"' '"'"'"'"'"'"'"'"'trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn')
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' -tt 10.172.139.2 '/bin/sh -c '"'"'/usr/local/bin/python '"'"'"'"'"'"'"'"'trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # 8278: Unknown action 0rnCommand fail. Return code -1rnrntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rnShared connection to 10.172.139.2 closed.rn')
fatal: [Hello]: FAILED! => {
"changed": false,
"module_stderr": "OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rnShared connection to 10.172.139.2 closed.rn",
"module_stdout": "trondheim02-vpn-1-mgmt # 8278: Unknown action 0rnCommand fail. Return code -1rnrntrondheim02-vpn-1-mgmt # ",
"msg": "MODULE FAILUREnSee stdout/stderr for the exact error",
"rc": 0
}
</code>
<code>TASK [Get license status] ********************************************************************************************************************************************************************************* task path: /home/tejas/Ansible/pls.yml:14 <10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin <10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 '/bin/sh -c '"'"'echo ~admin && sleep 0'"'"'' <10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn') <10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin <10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo trondheim02-vpn-1-mgmt #/.ansible/tmp `"&& mkdir "` echo trondheim02-vpn-1-mgmt #/.ansible/tmp/ansible-tmp-1721587091.1048012-8344-202590340256464 `" && echo ansible-tmp-1721587091.1048012-8344-202590340256464="` echo trondheim02-vpn-1-mgmt #/.ansible/tmp/ansible-tmp-1721587091.1048012-8344-202590340256464 `" ) && sleep 0'"'"'' <10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn') Using module file /home/tejas/.ansible/collections/ansible_collections/fortinet/fortios/plugins/modules/fortios_monitor_fact.py <10.172.139.2> PUT /home/tejas/.ansible/tmp/ansible-local-8321msrd7qqs/tmp2l6h9yru TO trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py <10.172.139.2> SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' '[10.172.139.2]' [WARNING]: sftp transfer mechanism failed on [10.172.139.2]. Use ANSIBLE_DEBUG=1 to see detailed information <10.172.139.2> SSH: EXEC sshpass -d12 scp -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' /home/tejas/.ansible/tmp/ansible-local-8321msrd7qqs/tmp2l6h9yru '[10.172.139.2]:'"'"'trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py'"'"'' [WARNING]: scp transfer mechanism failed on [10.172.139.2]. Use ANSIBLE_DEBUG=1 to see detailed information <10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin <10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 'dd of=trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py bs=65536' <10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn') <10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn') <10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin <10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 '/bin/sh -c '"'"'chmod u+x '"'"'"'"'"'"'"'"'trondheim02-vpn-1-mgmt #/'"'"'"'"'"'"'"'"' '"'"'"'"'"'"'"'"'trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py'"'"'"'"'"'"'"'"' && sleep 0'"'"'' <10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn') <10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin <10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' -tt 10.172.139.2 '/bin/sh -c '"'"'/usr/local/bin/python '"'"'"'"'"'"'"'"'trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py'"'"'"'"'"'"'"'"' && sleep 0'"'"'' <10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # 8278: Unknown action 0rnCommand fail. Return code -1rnrntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rnShared connection to 10.172.139.2 closed.rn') fatal: [Hello]: FAILED! => { "changed": false, "module_stderr": "OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rnShared connection to 10.172.139.2 closed.rn", "module_stdout": "trondheim02-vpn-1-mgmt # 8278: Unknown action 0rnCommand fail. Return code -1rnrntrondheim02-vpn-1-mgmt # ", "msg": "MODULE FAILUREnSee stdout/stderr for the exact error", "rc": 0 } </code>
TASK [Get license status] *********************************************************************************************************************************************************************************
task path: /home/tejas/Ansible/pls.yml:14
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 '/bin/sh -c '"'"'echo ~admin && sleep 0'"'"''
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn')
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo trondheim02-vpn-1-mgmt #/.ansible/tmp `"&& mkdir "` echo trondheim02-vpn-1-mgmt #/.ansible/tmp/ansible-tmp-1721587091.1048012-8344-202590340256464 `" && echo ansible-tmp-1721587091.1048012-8344-202590340256464="` echo trondheim02-vpn-1-mgmt #/.ansible/tmp/ansible-tmp-1721587091.1048012-8344-202590340256464 `" ) && sleep 0'"'"''
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn')
Using module file /home/tejas/.ansible/collections/ansible_collections/fortinet/fortios/plugins/modules/fortios_monitor_fact.py
<10.172.139.2> PUT /home/tejas/.ansible/tmp/ansible-local-8321msrd7qqs/tmp2l6h9yru TO trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py
<10.172.139.2> SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' '[10.172.139.2]'
[WARNING]: sftp transfer mechanism failed on [10.172.139.2]. Use ANSIBLE_DEBUG=1 to see detailed information
<10.172.139.2> SSH: EXEC sshpass -d12 scp -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' /home/tejas/.ansible/tmp/ansible-local-8321msrd7qqs/tmp2l6h9yru '[10.172.139.2]:'"'"'trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py'"'"''
[WARNING]: scp transfer mechanism failed on [10.172.139.2]. Use ANSIBLE_DEBUG=1 to see detailed information
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 'dd of=trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py bs=65536'
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn')
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn')
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' 10.172.139.2 '/bin/sh -c '"'"'chmod u+x '"'"'"'"'"'"'"'"'trondheim02-vpn-1-mgmt #/'"'"'"'"'"'"'"'"' '"'"'"'"'"'"'"'"'trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # ntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rn8278: Unknown action 0nCommand fail. Return code -1ndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rn')
<10.172.139.2> ESTABLISH SSH CONNECTION FOR USER: admin
<10.172.139.2> SSH: EXEC sshpass -d12 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="admin"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o 'ControlPath="/home/tejas/.ansible/cp/4a0f0783ec"' -tt 10.172.139.2 '/bin/sh -c '"'"'/usr/local/bin/python '"'"'"'"'"'"'"'"'trondheim02-vpn-1-mgmt #/AnsiballZ_fortios_monitor_fact.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<10.172.139.2> (0, b'trondheim02-vpn-1-mgmt # 8278: Unknown action 0rnCommand fail. Return code -1rnrntrondheim02-vpn-1-mgmt # ', b'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rnShared connection to 10.172.139.2 closed.rn')
fatal: [Hello]: FAILED! => {
    "changed": false,
    "module_stderr": "OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: /etc/ssh/ssh_config line 58: Applying options for *rndebug1: auto-mux: Trying existing masterrndebug2: fd 3 setting O_NONBLOCKrndebug2: mux_client_hello_exchange: master version 4rndebug3: mux_client_forwards: request forwardings: 0 local, 0 remoterndebug3: mux_client_request_session: enteringrndebug3: mux_client_request_alive: enteringrndebug3: mux_client_request_alive: done pid = 8340rndebug3: mux_client_request_session: session request sentrndebug1: mux_client_request_session: master session id: 2rndebug3: mux_client_read_packet: read header failed: Broken piperndebug2: Received exit status from master 0rnShared connection to 10.172.139.2 closed.rn",
    "module_stdout": "trondheim02-vpn-1-mgmt # 8278: Unknown action 0rnCommand fail. Return code -1rnrntrondheim02-vpn-1-mgmt # ",
    "msg": "MODULE FAILUREnSee stdout/stderr for the exact error",
    "rc": 0
}

I’m unable to use any fortios module as I’m getting the same error.

New contributor

corpslav69 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật