<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic need help to define static route using ansible for next-vr... in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-help-to-define-static-route-using-ansible-for-next-vr/m-p/513951#M3106</link>
    <description>&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm trying to create static route with next hop type as a "next-vr" , and as a interface "None" in ansible. but seems like i'm getting an error for nexthop and interface...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample playbook:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; - name: Create route to aws tunnel-1&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; panos_static_route:&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; provider: '{{ provider }}'&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: "Route {{ item.id }} to {{ vendor_name }}"&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; destination: '{{ item.vpc_net }}'&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; interface: 'None'&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nexthop: 'next-vr'&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nexthop_type: 'none'&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; virtual_router: 'SR1'&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;getting below error:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;{"ansible_loop_var": "item", "changed": false, "item": {"id": 1, "vpc_net": "20.0.0.0/24"}, "msg": "Failed create: Route 1 to ansible-test -&amp;gt; interface 'None' is not a valid reference\n Route 1 to ansible-test -&amp;gt; interface is invalid"}&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;here is the original module for panos_static_route on ansible docx...&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;&lt;A href="https://ansible-pan.readthedocs.io/en/latest/modules/panos_static_route_module.html" target="_blank"&gt;https://ansible-pan.readthedocs.io/en/latest/modules/panos_static_route_module.html&lt;/A&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;can you please let me know what i'm misisng here, it works absolutely fine with GUI...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;thanks...!!&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2022 15:54:16 GMT</pubDate>
    <dc:creator>Bhargav_2784</dc:creator>
    <dc:date>2022-09-05T15:54:16Z</dc:date>
    <item>
      <title>need help to define static route using ansible for next-vr...</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-help-to-define-static-route-using-ansible-for-next-vr/m-p/513951#M3106</link>
      <description>&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm trying to create static route with next hop type as a "next-vr" , and as a interface "None" in ansible. but seems like i'm getting an error for nexthop and interface...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample playbook:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; - name: Create route to aws tunnel-1&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; panos_static_route:&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; provider: '{{ provider }}'&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: "Route {{ item.id }} to {{ vendor_name }}"&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; destination: '{{ item.vpc_net }}'&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; interface: 'None'&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nexthop: 'next-vr'&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nexthop_type: 'none'&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; virtual_router: 'SR1'&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;getting below error:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;{"ansible_loop_var": "item", "changed": false, "item": {"id": 1, "vpc_net": "20.0.0.0/24"}, "msg": "Failed create: Route 1 to ansible-test -&amp;gt; interface 'None' is not a valid reference\n Route 1 to ansible-test -&amp;gt; interface is invalid"}&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;here is the original module for panos_static_route on ansible docx...&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;&lt;A href="https://ansible-pan.readthedocs.io/en/latest/modules/panos_static_route_module.html" target="_blank"&gt;https://ansible-pan.readthedocs.io/en/latest/modules/panos_static_route_module.html&lt;/A&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;can you please let me know what i'm misisng here, it works absolutely fine with GUI...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;thanks...!!&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 15:54:16 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-help-to-define-static-route-using-ansible-for-next-vr/m-p/513951#M3106</guid>
      <dc:creator>Bhargav_2784</dc:creator>
      <dc:date>2022-09-05T15:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: need help to define static route using ansible for next-vr...</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-help-to-define-static-route-using-ansible-for-next-vr/m-p/513952#M3107</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/230992"&gt;@Bhargav_2784&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Per the docs (by the way, for your bookmarks, the current docs are&amp;nbsp;&lt;A href="https://paloaltonetworks.github.io/pan-os-ansible" target="_blank" rel="noopener"&gt;https://paloaltonetworks.github.io/pan-os-ansible&lt;/A&gt;&amp;nbsp;not&amp;nbsp;&lt;A href="https://ansible-pan.readthedocs.io" target="_blank" rel="noopener"&gt;https://ansible-pan.readthedocs.io&lt;/A&gt;) you only have to make a couple of changes:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;nexthop&lt;/FONT&gt; should be the name of the VR which is the next hop, which per your code is probably not 'next-vr' but something else?&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;nexthop_type&lt;/FONT&gt; should not be 'none', it should be the string 'next-vr', per the docs (&lt;A href="https://paloaltonetworks.github.io/pan-os-ansible/modules/panos_static_route_module.html" target="_blank" rel="noopener"&gt;https://paloaltonetworks.github.io/pan-os-ansible/modules/panos_static_route_module.html&lt;/A&gt;)&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;virtual_router&lt;/FONT&gt; should be the VR into which you are placing this static route&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;interface&lt;/FONT&gt; does not need to be defined at all, comment it out or remove it&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;An example from your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  - name: Create route to aws tunnel-1
    panos_static_route:
          provider: '{{ provider }}'
          name: "Route {{ item.id }} to {{ vendor_name }}"
          destination: '{{ item.vpc_net }}'
          #interface: 'None'
          nexthop: '{{ your-next-vr }}'
          nexthop_type: 'next-vr'
          virtual_router: '{{ the-vr-requiring-the-route }}'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 16:31:29 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-help-to-define-static-route-using-ansible-for-next-vr/m-p/513952#M3107</guid>
      <dc:creator>JimmyHolland</dc:creator>
      <dc:date>2022-09-05T16:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: need help to define static route using ansible for next-vr...</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-help-to-define-static-route-using-ansible-for-next-vr/m-p/514513#M3115</link>
      <description>&lt;P&gt;thanks&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/4294"&gt;@JimmyHolland&lt;/a&gt;&amp;nbsp; , that works...&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 01:59:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/need-help-to-define-static-route-using-ansible-for-next-vr/m-p/514513#M3115</guid>
      <dc:creator>Bhargav_2784</dc:creator>
      <dc:date>2022-09-12T01:59:45Z</dc:date>
    </item>
  </channel>
</rss>

