Hi
I have used appropriate attributes, please find the below full error message which is i am getting.
TASK [Create host object] **********************************************************************************************************************************************************************
task path: /etc/ansible/cp-tes.yml:7
<172.31.37.222> ESTABLISH LOCAL CONNECTION FOR USER: root
<172.31.37.222> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-1540p8hj6toz `"&& mkdir /root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871 && echo ansible-tmp-1589207536.623636-1595-254398751069871="` echo /root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871 `" ) && sleep 0'
Using module file /usr/local/lib/python3.6/site-packages/ansible/modules/network/check_point/cp_mgmt_host.py
<172.31.37.222> PUT /root/.ansible/tmp/ansible-local-1540p8hj6toz/tmp7h7gg62s TO /root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871/AnsiballZ_cp_mgmt_host.py
<172.31.37.222> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871/ /root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871/AnsiballZ_cp_mgmt_host.py && sleep 0'
<172.31.37.222> EXEC /bin/sh -c '/usr/libexec/platform-python /root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871/AnsiballZ_cp_mgmt_host.py && sleep 0'
<172.31.37.222> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871/AnsiballZ_cp_mgmt_host.py", line 102, in <module>
_ansiballz_main()
File "/root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871/AnsiballZ_cp_mgmt_host.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871/AnsiballZ_cp_mgmt_host.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.network.check_point.cp_mgmt_host', init_globals=None, run_name='__main__', alter_sys=True)
File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmp/ansible_cp_mgmt_host_payload_iey_wfae/ansible_cp_mgmt_host_payload.zip/ansible/modules/network/check_point/cp_mgmt_host.py", line 333, in <module>
File "/tmp/ansible_cp_mgmt_host_payload_iey_wfae/ansible_cp_mgmt_host_payload.zip/ansible/modules/network/check_point/cp_mgmt_host.py", line 328, in main
File "/tmp/ansible_cp_mgmt_host_payload_iey_wfae/ansible_cp_mgmt_host_payload.zip/ansible/module_utils/network/checkpoint/checkpoint.py", line 201, in api_call
File "/tmp/ansible_cp_mgmt_host_payload_iey_wfae/ansible_cp_mgmt_host_payload.zip/ansible/module_utils/connection.py", line 185, in __rpc__
ansible.module_utils.connection.ConnectionError: 'Connection' object has no attribute '_session_uid'
fatal: [172.31.37.222]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871/AnsiballZ_cp_mgmt_host.py\", line 102, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871/AnsiballZ_cp_mgmt_host.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-local-1540p8hj6toz/ansible-tmp-1589207536.623636-1595-254398751069871/AnsiballZ_cp_mgmt_host.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.check_point.cp_mgmt_host', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_cp_mgmt_host_payload_iey_wfae/ansible_cp_mgmt_host_payload.zip/ansible/modules/network/check_point/cp_mgmt_host.py\", line 333, in <module>\n File \"/tmp/ansible_cp_mgmt_host_payload_iey_wfae/ansible_cp_mgmt_host_payload.zip/ansible/modules/network/check_point/cp_mgmt_host.py\", line 328, in main\n File \"/tmp/ansible_cp_mgmt_host_payload_iey_wfae/ansible_cp_mgmt_host_payload.zip/ansible/module_utils/network/checkpoint/checkpoint.py\", line 201, in api_call\n File \"/tmp/ansible_cp_mgmt_host_payload_iey_wfae/ansible_cp_mgmt_host_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: 'Connection' object has no attribute '_session_uid'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
Thanks In Advance !
Best Regards,
Shyam