forward_next_hop_type gets failed in PBF ansible module..

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

forward_next_hop_type gets failed in PBF ansible module..

L1 Bithead

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..!!

1 REPLY 1

L5 Sessionator

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!

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂
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!