I have run the playbook command with the -vvvv flag and it is giving me this error
[root@gefela ansible_junos]# ansible-playbook -i inventory junos_config.yml --check -vvvv
ansible-playbook 2.9.5
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 3.6.8 (default, Oct 11 2019, 15:04:54) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /home/gefela/ansible_junos/inventory as it did not pass its verify_file() method
script declined parsing /home/gefela/ansible_junos/inventory as it did not pass its verify_file() method
auto declined parsing /home/gefela/ansible_junos/inventory as it did not pass its verify_file() method
Parsed /home/gefela/ansible_junos/inventory inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python3.6/site-packages/ansible/plugins/callback/default.py
PLAYBOOK: junos_config.yml *******************************************************************************************************************************
Positional arguments: junos_config.yml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
check: True
inventory: ('/home/gefela/ansible_junos/inventory',)
forks: 5
1 plays in junos_config.yml
PLAY [Juniper SRX configuration compliance checks] *******************************************************************************************************
META: ran handlers
TASK [Syslog server check] *******************************************************************************************************************************
task path: /home/gefela/ansible_junos/junos_config.yml:9
<172.16.203.121> attempting to start connection
<172.16.203.121> using connection plugin netconf
<172.16.203.121> local domain socket does not exist, starting it
<172.16.203.121> control socket path is /root/.ansible/pc/3e04c18d96
<172.16.203.121> local domain socket listeners started successfully
<172.16.203.121> loaded netconf plugin junos from path /usr/lib/python3.6/site-packages/ansible/plugins/netconf/junos.py for network_os junos
<172.16.203.121>
<172.16.203.121> local domain socket path is /root/.ansible/pc/3e04c18d96
<172.16.203.121> ESTABLISH LOCAL CONNECTION FOR USER: gefela
<172.16.203.121> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-10845_kx_3k77/ansible-tmp-1586683874.2918632-239315467988226 `" && echo ansible-tmp-1586683874.2918632-239315467988226="` echo /root/.ansible/tmp/ansible-local-10845_kx_3k77/ansible-tmp-1586683874.2918632-239315467988226 `" ) && sleep 0'
<172.16.203.121> Attempting python interpreter discovery
<172.16.203.121> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
<172.16.203.121> Python interpreter discovery fallback (pipelining support required for extended interpreter discovery)
Using module file /usr/lib/python3.6/site-packages/ansible/modules/network/junos/junos_config.py
<172.16.203.121> PUT /root/.ansible/tmp/ansible-local-10845_kx_3k77/tmps4qg_pli TO /root/.ansible/tmp/ansible-local-10845_kx_3k77/ansible-tmp-1586683874.2918632-239315467988226/AnsiballZ_junos_config.py
<172.16.203.121> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-10845_kx_3k77/ansible-tmp-1586683874.2918632-239315467988226/ /root/.ansible/tmp/ansible-local-10845_kx_3k77/ansible-tmp-1586683874.2918632-239315467988226/AnsiballZ_junos_config.py && sleep 0'
<172.16.203.121> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-local-10845_kx_3k77/ansible-tmp-1586683874.2918632-239315467988226/AnsiballZ_junos_config.py && sleep 0'
<172.16.203.121> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-10845_kx_3k77/ansible-tmp-1586683874.2918632-239315467988226/ > /dev/null 2>&1 && sleep 0'
[WARNING]: Platform linux on host 172.16.203.121 is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python
interpreter could change this. See
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.
fatal: [172.16.203.121]: FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"module_stderr": "",
"module_stdout": "\n{\"msg\": \
"FileNotFoundError(2, 'No such file or directory')\", \"failed\": true, \"exception\": \"WARNING: The below traceback may *not* be related to the actual failure.\\n File \\\"/tmp/ansible_junos_config_payload_BA_i4F/ansible_junos_config_payload.zip/ansible/module_utils/network/junos/junos.py\\\", line 97, in get_capabilities\\n capabilities = Connection(module._socket_path).get_capabilities()\\n File \\\"/tmp/ansible_junos_config_payload_BA_i4F/ansible_junos_config_payload.zip/ansible/module_utils/connection.py\\\", line 185, in __rpc__\\n raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)\\n\", \"invocation\": {\"module_args\": {\"comment\": \"Appropriate Syslog server configured\", \"username\": null, \"provider\": null, \"backup_options\": null, \"rollback\": null, \"timeout\": null, \"src\": null, \"confirm\": 0, \"lines\": [\"set system syslog archive size 300000\", \"set system syslog archive files 3\", \"set system syslog archive world-readable\", \"set system syslog user * any emergency\", \"set system syslog host 192.168.100.70 any any\", \"set system syslog host 192.168.100.70 interactive-commands any\", \"set system syslog host 192.168.100.70 facility-override local1\", \"set system syslog host 192.168.100.70 log-prefix firewall\", \"set system syslog host 192.168.100.70 source-address \\\"172.16.203.121\\\"\", \"set system syslog host 192.168.100.70 explicit-priority\", \"set system syslog file messages any critical\", \"set system syslog file messages authorization info\", \"set system syslog file default-log-messages structured-data\", \"set system syslog file sessions user info\", \"set system syslog file interactive-commands interactive-commands error\"], \"update\": \"merge\", \"replace\": null, \"confirm_commit\": false, \"host\": null, \"zeroize\": false, \"src_format\": null, \"ssh_keyfile\": null, \"check_commit\": false, \"password\": null, \"backup\": false, \"port\": null, \"transport\": null}}}\n\n{\"msg\": \"FileNotFoundError(2, 'No such file or directory')\", \"failed\": true, \"exception\": \"WARNING: The below traceback may *not* be related to the actual failure.\\n File \\\"/tmp/ansible_junos_config_payload_BA_i4F/ansible_junos_config_payload.zip/ansible/module_utils/network/junos/junos.py\\\", line 97, in get_capabilities\\n capabilities = Connection(module._socket_path).get_capabilities()\\n File \\\"/tmp/ansible_junos_config_payload_BA_i4F/ansible_junos_config_payload.zip/ansible/module_utils/connection.py\\\", line 185, in __rpc__\\n raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)\\n\", \"invocation\": {\"module_args\": {\"comment\": \"Appropriate Syslog server configured\", \"username\": null, \"provider\": null, \"backup_options\": null, \"rollback\": null, \"timeout\": null, \"src\": null, \"confirm\": 0, \"lines\": [\"set system syslog archive size 300000\", \"set system syslog archive files 3\", \"set system syslog archive world-readable\", \"set system syslog user * any emergency\", \"set system syslog host 192.168.100.70 any any\", \"set system syslog host 192.168.100.70 interactive-commands any\", \"set system syslog host 192.168.100.70 facility-override local1\", \"set system syslog host 192.168.100.70 log-prefix firewall\", \"set system syslog host 192.168.100.70 source-address \\\"172.16.203.121\\\"\", \"set system syslog host 192.168.100.70 explicit-priority\", \"set system syslog file messages any critical\", \"set system syslog file messages authorization info\", \"set system syslog file default-log-messages structured-data\", \"set system syslog file sessions user info\", \"set system syslog file interactive-commands interactive-commands error\"], \"update\": \"merge\", \"replace\": null, \"confirm_commit\": false, \"host\": null, \"zeroize\": false, \"src_format\": null, \"ssh_keyfile\": null, \"check_commit\": false, \"password\": null, \"backup\": false, \"port\": null, \"transport\": null}}}\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
PLAY RECAP *****************************************************************************************************************