forward_next_hop_type gets failed in PBF ansible module..

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



- name: pbf policy
provider: '{{ provider }}'
name: '{{ vendor_name }}_AWS-VPN-PBF-1'
from_value: ['SR1_Zone']
destination_addresses: ["{{ object.results[0] }}","{{ object.results[1] }}"]
action: 'forward'
forward_egress_interface: 'tunnel.1'
forward_next_hop_type: 'ip-address'
forward_monitor_profile: 'Default_AWS-tunnelmonitor'
forward_monitor_ip_address: ''
forward_next_hop_value: ['{{ tunnel_address_1 }}']     ## this will reference through var defined outside of play





{"changed": false, "msg": "Failed apply: ansible-test_AWS-VPN-PBF-1 -> action -> forward -> nexthop -> ip-address [''] 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 ?




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 }}']


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!