<?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: Ansible error while fetching zone from Panorama template stack in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-error-while-fetching-zone-from-panorama-template-stack/m-p/508512#M3067</link>
    <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/201800"&gt;@MAULIK_NUTA&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you search for the error "may need to override template" in the forum search you can see couple of people also received such error, but in most case the problem was in their syntax, so I am wondering if the error is actually misleading and your real problem is something else.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried to create the tunnel interfaces without assigning them to zone and without creating the zone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach would be to try to override the zone, not creating it. &lt;A href="https://paloaltonetworks.github.io/pan-os-ansible/modules/panos_type_cmd.html?highlight=override" target="_blank"&gt;https://paloaltonetworks.github.io/pan-os-ansible/modules/panos_type_cmd.html?highlight=override&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jul 2022 20:55:11 GMT</pubDate>
    <dc:creator>aleksandar.astardzhiev</dc:creator>
    <dc:date>2022-07-11T20:55:11Z</dc:date>
    <item>
      <title>Ansible error while fetching zone from Panorama template stack</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-error-while-fetching-zone-from-panorama-template-stack/m-p/507086#M3061</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;i'm preparing for IPSEC in palo alto using Ansible. we have panorama template stack used for zone configuration to all firewall.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when we tried to configure tunnel interface and attached to zone( zone was inherited from template stack) , i'm getting below error..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"msg": "Failed setref: edit failed, may need to override template object XYZ first "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ansible task sample:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: PALO_HOST&lt;BR /&gt;connection: local&lt;BR /&gt;gather_facts: false&lt;/P&gt;&lt;P&gt;collections:&lt;BR /&gt;- paloaltonetworks.panos&lt;/P&gt;&lt;P&gt;tasks:&lt;BR /&gt;- name: load var&lt;BR /&gt;include_vars: provider.yaml&lt;BR /&gt;&lt;BR /&gt;- name: Create tunnel interfaces&lt;BR /&gt;paloaltonetworks.panos.panos_tunnel:&lt;BR /&gt;provider: '{{ provider }}'&lt;BR /&gt;if_name: '{{ item.tunnel_id }}'&lt;BR /&gt;ip: '{{ item.ip }}/30'&lt;BR /&gt;management_profile: 'PING-ONLY'&lt;BR /&gt;state: 'present'&lt;BR /&gt;# template: 'NA-LAB_stack'&lt;BR /&gt;zone_name: 'XYZ'&lt;BR /&gt;vr_name: 'default'&lt;BR /&gt;commit: False&lt;BR /&gt;comment: "to-aws-{{ item.id }}"&lt;BR /&gt;with_items:&lt;BR /&gt;- { ip : '4.4.4.4' , tunnel_id : 'tunnel.119', id : '1' }&lt;BR /&gt;- { ip : '4.4.4.5' , tunnel_id : 'tunnel.120' , id : '2'}&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 13:15:40 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-error-while-fetching-zone-from-panorama-template-stack/m-p/507086#M3061</guid>
      <dc:creator>MAULIK_NUTA</dc:creator>
      <dc:date>2022-06-29T13:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible error while fetching zone from Panorama template stack</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-error-while-fetching-zone-from-panorama-template-stack/m-p/508212#M3065</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/201800"&gt;@MAULIK_NUTA&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;Let me check if I get your setup correctly:&lt;/P&gt;
&lt;P&gt;- You have Panorama that push Zones definition to managed firewalls&lt;/P&gt;
&lt;P&gt;- You are using Anisible to create IPsec tunnel locally on the firewall (not through the Panorama)&lt;/P&gt;
&lt;P&gt;Correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although the GUI allow you to define the zone under the interface, the actual configuration is the opposite - interfaces are assigned to zones&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;zone {
  VPN-Tunnel {
    network {
      layer3 [ tunnel.2 tunnel.1];
      log-setting default;
      enable-packet-buffer-protection yes;
    }
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;So when you push Zone definition from Panorama it is not part of the firewall local config - you cannot see it in the extract running-config.xml, nor under CLI (in config mode # show zone). So when you create the tunnel interface locally it cannot be assigned to the required zone, because it is not part of the local configuration so it definition does not exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As the error suggest you need to override the zone definition pushed by Panorama template. This will create zone definition in the local fw config, to which you can add the new local tunnel interface.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 12:36:23 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-error-while-fetching-zone-from-panorama-template-stack/m-p/508212#M3065</guid>
      <dc:creator>aleksandar.astardzhiev</dc:creator>
      <dc:date>2022-07-07T12:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible error while fetching zone from Panorama template stack</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-error-while-fetching-zone-from-panorama-template-stack/m-p/508480#M3066</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/70130"&gt;@aleksandar.astardzhiev&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that's correct.. that's what i was looking for...i made adjustment and created tunnel config first then created zone , attached interface as a layer 3 to it,...still getting same error...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- name: Create tunnel interfaces&lt;BR /&gt;panos_tunnel:&lt;BR /&gt;provider: '{{ provider }}'&lt;BR /&gt;if_name: '{{ item.tunnel_id }}'&lt;BR /&gt;ip: '{{ item.ip }}/30'&lt;BR /&gt;management_profile: 'PING-ONLY'&lt;BR /&gt;state: 'present'&lt;BR /&gt;# template: 'NA-LAB_stack'&lt;BR /&gt;#zone_name: 'AWS-REMOTE-ZONE'&lt;BR /&gt;vr_name: 'default'&lt;BR /&gt;commit: False&lt;BR /&gt;comment: "to-aws-{{ item.id }}"&lt;BR /&gt;with_items:&lt;BR /&gt;- { ip: '{{parsed_vpn.vpn_connection.ipsec_tunnel[0].customer_gateway.tunnel_inside_address.ip_address}}' ,tunnel_id : '{{ tunnel_id_1 }}', id : '1'} ##&lt;BR /&gt;- { ip: '{{parsed_vpn.vpn_connection.ipsec_tunnel[1].customer_gateway.tunnel_inside_address.ip_address}}' ,tunnel_id : '{{ tunnel_id_2 }}', id : '2'}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- name: create zone and attached to interface&lt;BR /&gt;&amp;nbsp; panos_zone:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;provider: '{{ provider }}'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;state: 'present'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;zone: 'AWS-REMOTE-ZONE'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;mode: 'layer3'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;interface: ['tunnel.109']&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;error:&amp;nbsp;FAILED! =&amp;gt; {"changed": false, "msg": "Failed apply: edit failed, may need to override template object AWS-REMOTE-ZONE first"}&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 12:49:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-error-while-fetching-zone-from-panorama-template-stack/m-p/508480#M3066</guid>
      <dc:creator>MAULIK_NUTA</dc:creator>
      <dc:date>2022-07-11T12:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible error while fetching zone from Panorama template stack</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-error-while-fetching-zone-from-panorama-template-stack/m-p/508512#M3067</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/201800"&gt;@MAULIK_NUTA&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you search for the error "may need to override template" in the forum search you can see couple of people also received such error, but in most case the problem was in their syntax, so I am wondering if the error is actually misleading and your real problem is something else.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried to create the tunnel interfaces without assigning them to zone and without creating the zone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach would be to try to override the zone, not creating it. &lt;A href="https://paloaltonetworks.github.io/pan-os-ansible/modules/panos_type_cmd.html?highlight=override" target="_blank"&gt;https://paloaltonetworks.github.io/pan-os-ansible/modules/panos_type_cmd.html?highlight=override&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 20:55:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-error-while-fetching-zone-from-panorama-template-stack/m-p/508512#M3067</guid>
      <dc:creator>aleksandar.astardzhiev</dc:creator>
      <dc:date>2022-07-11T20:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible error while fetching zone from Panorama template stack</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-error-while-fetching-zone-from-panorama-template-stack/m-p/509178#M3070</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/70130"&gt;@aleksandar.astardzhiev&lt;/a&gt;&amp;nbsp;i have&amp;nbsp;&lt;SPAN&gt;create the tunnel interfaces without assigning them to zone and that did work...also as you suggested i tried to overrid zone using xpath/xml api , it did work too.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 12:25:05 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/ansible-error-while-fetching-zone-from-panorama-template-stack/m-p/509178#M3070</guid>
      <dc:creator>MAULIK_NUTA</dc:creator>
      <dc:date>2022-07-18T12:25:05Z</dc:date>
    </item>
  </channel>
</rss>

