An Ansible collection provides control over a Check Point machine using Check Point's web-services APIs.
20
stars
21
forks
source link
check_point.gaia.cp_gaia_physical_interfaces_facts: TypeError: string indices must be integers #12
Open
gaetanquentin opened 2 years ago
Subject
unable to use check_point.gaia.cp_gaia_physical_interfaces_facts
Environment
ansible 2.9.24 python version = 3.6.8 (default, May 6 2020, 12:04:35) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
ansible.netcommon collection: "version": "2.6.1", check_point.gaia : "version": "2.0.0",
Inventory
ansible_network_os: check_point.gaia.checkpoint ansible_connection: ansible.netcommon.httpapi
Command
ansible -i my-inventory.yml mydevice -m check_point.gaia.cp_gaia_physical_interfaces_facts -e 'ansible_python_interpreter=python3'
Results
2022-05-13 09:05:18,279 p=80811 umyaccount n=ansible | Using module file /usr/share/ansible/collections/ansible_collections/check_point/gaia/plugins/modules/cp_gaia_physical_interfaces_facts.py 2022-05-13 09:05:18,280 p=80811 umyaccount n=ansible | PUT /home/w23960p/.ansible/tmp/ansible-local-76536khpld3yk/tmpf7ivmq9j TO /home/w23960p/.ansible/tmp/ansible-local-76536khpld3yk/ansible-tmp-1652425517.
684108-80811-94927829950467/AnsiballZ_cp_gaia_physical_interfaces_facts.py
2022-05-13 09:05:18,305 p=80811 umyaccount n=ansible | EXEC /bin/sh -c 'chmod u+x /home/w23960p/.ansible/tmp/ansible-local-76536khpld3yk/ansible-tmp-1652425517.684108-80811-94927829950467/ /home/w23960p/.ans
ible/tmp/ansible-local-76536khpld3yk/ansible-tmp-1652425517.684108-80811-94927829950467/AnsiballZ_cp_gaia_physical_interfaces_facts.py && sleep 0'
2022-05-13 09:05:18,330 p=80811 umyaccount n=ansible | EXEC /bin/sh -c 'python3 /home/w23960p/.ansible/tmp/ansible-local-76536khpld3yk/ansible-tmp-1652425517.684108-80811-94927829950467/AnsiballZ_cp_gaia_phy
sical_interfaces_facts.py && sleep 0'
2022-05-13 09:05:18,794 p=81499 umyaccount n=ansible | Traceback (most recent call last):
File "/home/w23960p/venv3_6/lib64/python3.6/site-packages/ansible/utils/jsonrpc.py", line 45, in handle_request
result = rpc_method(*args, **kwargs)
File "/usr/share/ansible/collections/ansible_collections/check_point/gaia/plugins/httpapi/checkpoint.py", line 68, in send_request
response, response_data = self.connection.send(path, data, method='POST', headers=BASE_HEADERS)
File "/home/w23960p/venv3_6/lib64/python3.6/site-packages/ansible/plugins/connection/init.py", line 34, in wrapped
self._connect()
File "/usr/share/ansible/collections/ansible_collections/ansible/netcommon/plugins/connection/httpapi.py", line 260, in _connect
self.get_option("remote_user"), self.get_option("password")
File "/usr/share/ansible/collections/ansible_collections/check_point/gaia/plugins/httpapi/checkpoint.py", line 50, in login
self.connection._auth = {'X-chkp-sid': response_data['sid']}
TypeError: string indices must be integers