<?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 Re: Unable to add static route using Ansible module panos_static_route in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-add-static-route-using-ansible-module-panos-static/m-p/331750#M2365</link>
    <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/124862"&gt;@Krishna_R&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;failed:"msg": "Failed create: Test-One -&amp;gt; interface 'tunnel.18 ' is not a valid reference\n Test-One -&amp;gt; interface is invalid"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note the whitespace trailing tunnel.18 in the quote&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jun 2020 23:49:09 GMT</pubDate>
    <dc:creator>BPry</dc:creator>
    <dc:date>2020-06-04T23:49:09Z</dc:date>
    <item>
      <title>Unable to add static route using Ansible module panos_static_route</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-add-static-route-using-ansible-module-panos-static/m-p/331734#M2364</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to add a static route in a PAN FW using the Palo Alto module panos_static_route.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the variable file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;user@C02X67V3JG5J ➜ FW git:(master) ✗ $ cat host_vars/lap-pva01.domain.com/routing.yml&lt;BR /&gt;routing:&lt;BR /&gt;static_route:&lt;BR /&gt;- name: 'Test-One'&lt;BR /&gt;destination: '1.1.1.1/32'&lt;BR /&gt;nexthop_type: 'none'&lt;BR /&gt;interface: 'tunnel.18'&lt;BR /&gt;virtual_router: 'VR_VPN'&lt;BR /&gt;state: 'present'&lt;BR /&gt;user@C02X67V3JG5J ➜ FW git:(master) ✗ $&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the role file:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;user@C02X67V3JG5J ➜ FW git:(master) ✗ $ cat roles/routing/tasks/main.yml&lt;BR /&gt;---&lt;BR /&gt;- name: Static Routes&lt;BR /&gt;panos_static_route:&lt;BR /&gt;provider: '{{ cli }}'&lt;BR /&gt;state: '{{ item.state }}'&lt;BR /&gt;name: '{{ item.name }}'&lt;BR /&gt;destination: "{{ item.destination }}"&lt;BR /&gt;interface: "{{ item.interface | default (omit)}} "&lt;BR /&gt;nexthop: '{{ item.nexthop | default (omit) }}'&lt;BR /&gt;nexthop_type: '{{ item.nexthop_type }}'&lt;BR /&gt;virtual_router: '{{ item.virtual_router }}'&lt;BR /&gt;template: '{{ system.template }}'&lt;BR /&gt;loop: "{{ routing.static_route }}"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am getting this error when trying to execute the Playbook.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;user@C02X67V3JG5J ➜ FW git:(master) ✗ $ ansible-playbook main.yml --ask-vault-pass --tags routing&lt;BR /&gt;Vault password:&lt;BR /&gt;[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow bad characters in group names by default, this will change, but still be user configurable on deprecation. This feature will be removed in version 2.10.&lt;BR /&gt;Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.&lt;BR /&gt;[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details&lt;/P&gt;&lt;P&gt;What is your password?:&lt;/P&gt;&lt;P&gt;PLAY [FW Playbook] ***************************************************************************************************************************************************************************************************************&lt;/P&gt;&lt;P&gt;TASK [Gathering Facts] ***********************************************************************************************************************************************************************************************************************&lt;BR /&gt;ok: [lap-pva01.domain.com]&lt;/P&gt;&lt;P&gt;TASK [routing : Static Routes] ***************************************************************************************************************************************************************************************************************&lt;BR /&gt;failed: [lap-pva01.domain.com] (item={'name': 'Test-One', 'destination': '1.1.1.1/32', 'nexthop_type': 'none', 'interface': 'tunnel.18', 'virtual_router': 'VR_VPN', 'state': 'present'}) =&amp;gt; {"ansible_loop_var": "item", "changed": false, "item": {"destination": "1.1.1.1/32", "interface": "tunnel.18", "name": "Test-One", "nexthop_type": "none", "state": "present", "virtual_router": "VR_VPN"}, "msg": "Failed create: Test-One -&amp;gt; interface 'tunnel.18 ' is not a valid reference\n Test-One -&amp;gt; interface is invalid"}&lt;/P&gt;&lt;P&gt;PLAY RECAP ***********************************************************************************************************************************************************************************************************************************&lt;BR /&gt;lap-pva01.domain.com : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0&lt;/P&gt;&lt;P&gt;user@C02X67V3JG5J ➜ FW git:(master) ✗ $&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please note that I have other module(address,service,zone,VPN) configuration in the same Playbooks as different roles. They all are working fine. I am facing issue with only 'panos_static_route' module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already read the documentation at "&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;", but that doesn't answer my issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can share the entire Playbook if you need.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 22:25:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-add-static-route-using-ansible-module-panos-static/m-p/331734#M2364</guid>
      <dc:creator>Krishna_R</dc:creator>
      <dc:date>2020-06-04T22:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to add static route using Ansible module panos_static_route</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-add-static-route-using-ansible-module-panos-static/m-p/331750#M2365</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/124862"&gt;@Krishna_R&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;failed:"msg": "Failed create: Test-One -&amp;gt; interface 'tunnel.18 ' is not a valid reference\n Test-One -&amp;gt; interface is invalid"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note the whitespace trailing tunnel.18 in the quote&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 23:49:09 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-add-static-route-using-ansible-module-panos-static/m-p/331750#M2365</guid>
      <dc:creator>BPry</dc:creator>
      <dc:date>2020-06-04T23:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to add static route using Ansible module panos_static_route</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-add-static-route-using-ansible-module-panos-static/m-p/331777#M2366</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/43480"&gt;@BPry&lt;/a&gt;&amp;nbsp;, Here is my variable YAML file. There is not trailing whitespace:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;user@C02X67V3JG5J ➜ FW git:(master) ✗ $ cat host_vars/lap-pva01.domain.com/routing.yml&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;routing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;static_route:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- name: 'Test-One'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;destination: '1.1.1.1/32'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;nexthop_type: 'none'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;interface: 'tunnel.18'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;virtual_router: 'VR_VPN'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;state: 'present'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;user@C02X67V3JG5J ➜ FW git:(master) ✗ $&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 02:40:27 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-add-static-route-using-ansible-module-panos-static/m-p/331777#M2366</guid>
      <dc:creator>Krishna_R</dc:creator>
      <dc:date>2020-06-05T02:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to add static route using Ansible module panos_static_route</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-add-static-route-using-ansible-module-panos-static/m-p/331819#M2375</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/124862"&gt;@Krishna_R&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are right it is not in your variables files, but the whitespace is actually in the module param, as you can see after the final curly brace.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielBostock_0-1591344336272.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/26051iAB750AFAAA4AF6E3/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="DanielBostock_0-1591344336272.png" alt="DanielBostock_0-1591344336272.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/43480"&gt;@BPry&lt;/a&gt;&amp;nbsp; - Was on the right path here, because the feedback from ansible is key here to how Ansible is receiving the string.&lt;BR /&gt;&lt;BR /&gt;Try removing the whitespace and then re-rerun the playbook and let us know how you go.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Daniel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 08:08:17 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-add-static-route-using-ansible-module-panos-static/m-p/331819#M2375</guid>
      <dc:creator>DanielBostock</dc:creator>
      <dc:date>2020-06-05T08:08:17Z</dc:date>
    </item>
  </channel>
</rss>

