Hi,
I just rebuilt my Ubuntu and re-installed all modules that I had before for my lab. I know my playbook worked previously but not sure why not this time.
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.module_utils.connection.ConnectionError: string indices must be integers
fatal: [checkpoint]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/osboxes/.ansible/tmp/ansible-local-4258683ilf5oi0/ansible-tmp-1624393456.3348339-425981-7450313037159/AnsiballZ_cp_mgmt_network.py\", line 100, in <module>\n _ansiballz_main()\n File \"/home/osboxes/.ansible/tmp/ansible-local-4258683ilf5oi0/ansible-tmp-1624393456.3348339-425981-7450313037159/AnsiballZ_cp_mgmt_network.py\", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/osboxes/.ansible/tmp/ansible-local-4258683ilf5oi0/ansible-tmp-1624393456.3348339-425981-7450313037159/AnsiballZ_cp_mgmt_network.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible_collections.check_point.mgmt.plugins.modules.cp_mgmt_network', init_globals=dict(_module_fqn='ansible_collections.check_point.mgmt.plugins.modules.cp_mgmt_network', _modlib_path=modlib_path),\n File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_cp_mgmt_network_payload_tpg00l8b/ansible_cp_mgmt_network_payload.zip/ansible_collections/check_point/mgmt/plugins/modules/cp_mgmt_network.py\", line 225, in <module>\n File \"/tmp/ansible_cp_mgmt_network_payload_tpg00l8b/ansible_cp_mgmt_network_payload.zip/ansible_collections/check_point/mgmt/plugins/modules/cp_mgmt_network.py\", line 220, in main\n File \"/tmp/ansible_cp_mgmt_network_payload_tpg00l8b/ansible_cp_mgmt_network_payload.zip/ansible_collections/check_point/mgmt/plugins/module_utils/checkpoint.py\", line 265, in api_call\n File \"/tmp/ansible_cp_mgmt_network_payload_tpg00l8b/ansible_cp_mgmt_network_payload.zip/ansible_collections/check_point/mgmt/plugins/module_utils/checkpoint.py\", line 65, in send_request\n File \"/tmp/ansible_cp_mgmt_network_payload_tpg00l8b/ansible_cp_mgmt_network_payload.zip/ansible/module_utils/connection.py\", line 195, in __rpc__\nansible.module_utils.connection.ConnectionError: string indices must be integers\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
Here is my host.yml
---
firewall:
hosts:
checkpoint:
ckp_sms_ngen ansible_host: 10.10.10.2
ansible_httpapi_use_ssl: True
ansible_httpapi_validate: False
ansible_user: admin
ansible_network_os: check_point.mgmt.checkpoint
Here is my playbook
---
- hosts: checkpoint
connection: httpapi
tasks:
- name: Adding Site1 VL 10
cp_mgmt_network:
name: Site1-VL10-Nets
state: present
subnet: 10.10.10.0
subnet_mask: 255.255.255.0
comments: Network
auto_publish_session: yes
- name: Adding Site1 VL 20
cp_mgmt_network:
name: Site1-VL20-Nets
state: present
subnet: 10.10.20.0
subnet_mask: 255.255.255.0
comments: Desktop
auto_publish_session: yes
- name: Adding Site1 VL 30
cp_mgmt_network:
name: Site1-VL30-Nets
state: present
subnet: 10.10.30.0
subnet_mask: 255.255.255.0
comments: Secure
auto_publish_session: yes
- name: Adding Site2 VL 10
cp_mgmt_network:
name: Site2-VL10-Nets
state: present
subnet: 10.20.10.0
subnet_mask: 255.255.255.0
comments: Network
auto_publish_session: yes
- name: Adding Site2 VL 20
cp_mgmt_network:
name: Site2-VL20-Nets
state: present
subnet: 10.20.20.0
subnet_mask: 255.255.255.0
comments: Network
auto_publish_session: yes
- name: Adding Site2 VL 30
cp_mgmt_network:
name: Site2-VL30-Nets
state: present
subnet: 10.20.30.0
subnet_mask: 255.255.255.0
comments: Secure
auto_publish_session: yes
- name: Adding Site3 VL 10
cp_mgmt_network:
name: Site3-VL10-Nets
state: present
subnet: 10.30.10.0
subnet_mask: 255.255.255.0
comments: Network
auto_publish_session: yes
- name: Adding Site3 VL 20
cp_mgmt_network:
name: Site3-VL20-Nets
state: present
subnet: 10.30.20.0
subnet_mask: 255.255.255.0
comments: Desktop
auto_publish_session: yes
- name: Adding Site3 VL 30
cp_mgmt_network:
name: Site3-VL10-Nets
state: present
subnet: 10.30.30.0
subnet_mask: 255.255.255.0
comments: Secure
auto_publish_session: yes