- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-11-2022 07:09 PM
hi ,
i'm trying to create PBF using ansible module but it keeps throwing an error when i choose "forward_next_hope_type" as a "ip-address" , and even it doesn't take a value of IPV4 when i have given to "forward_next_hope_value".
ansible-playbook/task:
- name: pbf policy
panos_pbf_rule:
provider: '{{ provider }}'
name: '{{ vendor_name }}_AWS-VPN-PBF-1'
from_value: ['SR1_Zone']
destination_addresses: ["{{ object.results[0].before.name }}","{{ object.results[1].before.name }}"]
action: 'forward'
forward_egress_interface: 'tunnel.1'
forward_next_hop_type: 'ip-address'
forward_monitor_profile: 'Default_AWS-tunnelmonitor'
forward_monitor_ip_address: '4.4.4.4'
forward_next_hop_value: ['{{ tunnel_address_1 }}'] ## this will reference through var defined outside of play
error:
{"changed": false, "msg": "Failed apply: ansible-test_AWS-VPN-PBF-1 -> action -> forward -> nexthop -> ip-address ['4.4.4.4'] is an invalid ipv4/v6 address\n ansible-test_AWS-VPN-PBF-1 -> action -> forward -> nexthop -> ip-address is invalid"}
can someone please help me here ?
thanks..!!
09-12-2022 12:36 AM
Hi @Bhargav_2784,
For this one, per the docs, the value for "forward_next_hop_value" needs to be a string, not a list of strings. Therefore change
forward_next_hop_value: ['{{ tunnel_address_1 }}']
to
forward_next_hop_value: '{{ tunnel_address_1 }}'
Hope that helps!
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!