ansible module panos_ha support NGFW-VM series on AWS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

ansible module panos_ha support NGFW-VM series on AWS

L0 Member

Trying to use ansible setup HA pair in the AWS same availability zone. 

But got error: "IndexError: list index out of range", any suggestions please? The github issue report on HA looks no one response for a long time... Big Thanks.

 

The NGFW-VM documentation over GUI, it demands to use management port for the HA1.

 

The Playbook:

##############

---
- hosts: localhost
connection: local
gather_facts: no

collections:
- paloaltonetworks.panos

 

tasks:
- name: Include variables
include_vars: provider.yml
no_log: yes

- name: Set primary HA port
panos_interface:
provider: '{{ primary }}'
state: present
if_name: '{{ item }}'
mode: "ha"
enable_dhcp: false
with_items:
- ethernet1/1

- name: Config primary control links
panos_ha:
provider: '{{ primary }}'
state: present
ha_peer_ip: "10.2.240.252"
ha1_ip_address: "10.2.240.236"
ha1_netmask: "255.255.255.0"
ha1_port: "ethernet0/0"
ha2_port: "ethernet1/1"
#############################

The ansible error below:

#############################

(.venv) 14:26 % ansible-playbook -i 127.0.0.1, -e "ansible_python_interpreter=$(which python)" vm-ha.yml 

PLAY [localhost] ***************************************************************************************************************************************************************************************************************************

TASK [Include variables] *******************************************************************************************************************************************************************************************************************
ok: [127.0.0.1]

TASK [Set primary HA port] *****************************************************************************************************************************************************************************************************************
ok: [127.0.0.1] => (item=ethernet1/1)

TASK [Config primary control links] ********************************************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: IndexError: list index out of range
fatal: [127.0.0.1]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/Users/jozhou/.ansible/tmp/ansible-tmp-1623619631.2409449-82377-159027178184794/AnsiballZ_panos_ha.py\", line 100, in <module>\n _ansiballz_main()\n File \"/Users/jozhou/.ansible/tmp/ansible-tmp-1623619631.2409449-82377-159027178184794/AnsiballZ_panos_ha.py\", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/Users/jozhou/.ansible/tmp/ansible-tmp-1623619631.2409449-82377-159027178184794/AnsiballZ_panos_ha.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible_collections.paloaltonetworks.panos.plugins.modules.panos_ha', init_globals=dict(_module_fqn='ansible_collections.paloaltonetworks.panos.plugins.modules.panos_ha', _modlib_path=modlib_path),\n File \"/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py\", line 210, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/var/folders/qy/dvxp9_ps17z3k5_nmy95vt6mzsqgps/T/ansible_panos_ha_payload_zsopcaxw/ansible_panos_ha_payload.zip/ansible_collections/paloaltonetworks/panos/plugins/modules/panos_ha.py\", line 452, in <module>\n File \"/var/folders/qy/dvxp9_ps17z3k5_nmy95vt6mzsqgps/T/ansible_panos_ha_payload_zsopcaxw/ansible_panos_ha_payload.zip/ansible_collections/paloaltonetworks/panos/plugins/modules/panos_ha.py\", line 439, in main\nIndexError: list index out of range\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP *********************************************************************************************************************************************************************************************************************************
127.0.0.1 : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

 

0 REPLIES 0
  • 2271 Views
  • 0 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!