<?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: Use Ansible to backup config in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/328176#M2339</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/139206"&gt;@sylvaing&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes removing the --check mode and installing the lxml python module did the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2020 11:07:10 GMT</pubDate>
    <dc:creator>jmolefe</dc:creator>
    <dc:date>2020-05-15T11:07:10Z</dc:date>
    <item>
      <title>Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/292742#M2048</link>
      <description>&lt;P&gt;Ciao,&lt;/P&gt;&lt;P&gt;is there a simple way to backup config using Ansible ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2019 16:11:57 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/292742#M2048</guid>
      <dc:creator>IarnoPagliani</dc:creator>
      <dc:date>2019-10-13T16:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/292897#M2051</link>
      <description>&lt;P&gt;Not yet, this is still a pending feature request for the Ansible role:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/PaloAltoNetworks/ansible-pan/issues/90" target="_blank"&gt;https://github.com/PaloAltoNetworks/ansible-pan/issues/90&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd recommend commenting or thumbs-up'ing the original issue opener, so that Palo Alto Networks has a way to see how many users want a particular issue / feature request.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 17:14:51 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/292897#M2051</guid>
      <dc:creator>gfreeman</dc:creator>
      <dc:date>2019-10-14T17:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/324749#M2274</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/24629"&gt;@IarnoPagliani&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A bit late on the topic but I created a playbook sometime ago to perform backups of PAN FWs&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/wpacket/pan-ansible/blob/master/pan_config_pull.yml" target="_blank" rel="noopener"&gt;https://github.com/wpacket/pan-ansible/blob/master/pan_config_pull.yml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Had to reuse it today and I can confirm it still works ( Python3 + Ansible 2.9.7 )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also put a playbook to push local configs to devices from the same inventory but I guess you already have that&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/wpacket/pan-ansible/blob/master/pan_config_push.yml" target="_blank" rel="noopener"&gt;https://github.com/wpacket/pan-ansible/blob/master/pan_config_push.yml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 09:50:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/324749#M2274</guid>
      <dc:creator>sylvaing</dc:creator>
      <dc:date>2020-04-24T09:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/325800#M2293</link>
      <description>&lt;P&gt;Is there any reason to use this insted of the built in backup function with scp?&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2020 12:26:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/325800#M2293</guid>
      <dc:creator>hbalzac</dc:creator>
      <dc:date>2020-05-02T12:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327586#M2321</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/139206"&gt;@sylvaing&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm also using Ansible 2.9.7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the play fails at the "Extract API Key from XML Output" task with error "fatal: [x.x.x.x]: FAILED! =&amp;gt; {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'content'\n\n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No changes done on the playbook besides referencing my host group&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 18:16:07 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327586#M2321</guid>
      <dc:creator>jmolefe</dc:creator>
      <dc:date>2020-05-12T18:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327606#M2323</link>
      <description>&lt;P&gt;Upgrading to python 3 doesn't help as well&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 19:01:59 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327606#M2323</guid>
      <dc:creator>jmolefe</dc:creator>
      <dc:date>2020-05-12T19:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327906#M2332</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/90411"&gt;@hbalzac&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you only manage PAN firewalls , no.&lt;/P&gt;&lt;P&gt;However if you are dealing with a multivendor setup , using ansible as a central point of automation ( backup , config , ops ) can simplify your life.&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 12:53:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327906#M2332</guid>
      <dc:creator>sylvaing</dc:creator>
      <dc:date>2020-05-14T12:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327907#M2333</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/141209"&gt;@jmolefe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interresting , this might be related to the format of the API KEY response from the firewall. I ve been dealing with 8.1 and 9.0 atm when creating this playbook mostly. What version are you running on your firewall ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sylvain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 12:55:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327907#M2333</guid>
      <dc:creator>sylvaing</dc:creator>
      <dc:date>2020-05-14T12:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327912#M2334</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/139206"&gt;@sylvaing&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Firewalls run 8.1 and Panorama is on 9.0 and both fail. Please see format of API response below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;response&lt;SPAN class="html-attribute"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="html-attribute-name"&gt;status&lt;/SPAN&gt;="&lt;SPAN class="html-attribute-value"&gt;success&lt;/SPAN&gt;"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="collapsible-content"&gt;&lt;DIV class="collapsible"&gt;&lt;DIV class="expanded"&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;result&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="collapsible-content"&gt;&lt;DIV class="collapsible"&gt;&lt;DIV class="expanded"&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;key&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="collapsible-content"&gt;KEY_HERE&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;/key&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;/result&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;/response&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;Br&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;John.&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 May 2020 13:09:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327912#M2334</guid>
      <dc:creator>jmolefe</dc:creator>
      <dc:date>2020-05-14T13:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327960#M2335</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/141209"&gt;@jmolefe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you -vvv you ansible-playbook command and show me the output of the&amp;nbsp;&lt;SPAN&gt;&lt;U&gt;&lt;STRONG&gt;Generate API Key&lt;/STRONG&gt;&lt;/U&gt; task ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I bet it is not formated as mine and that must be the reason why the API key cannot be extracted.&amp;nbsp; Or maybe one ansible module is missing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Let s figure that out,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 15:54:55 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/327960#M2335</guid>
      <dc:creator>sylvaing</dc:creator>
      <dc:date>2020-05-14T15:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/328029#M2336</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/139206"&gt;@sylvaing&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see output below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;skipping: [&lt;STRONG&gt;x.x.x.x&lt;/STRONG&gt;] =&amp;gt; {&lt;BR /&gt;"ansible_facts": {&lt;BR /&gt;"discovered_interpreter_python": "/usr/bin/python"&lt;BR /&gt;},&lt;BR /&gt;"changed": false,&lt;BR /&gt;"invocation": {&lt;BR /&gt;"module_args": {&lt;BR /&gt;"method": "GET",&lt;BR /&gt;"return_content": true,&lt;BR /&gt;"url": "https://&lt;STRONG&gt;x.x.x.x&lt;/STRONG&gt;/api/?type=keygen&amp;amp;user=&amp;lt;&lt;STRONG&gt;username&lt;/STRONG&gt;&amp;gt;&amp;amp;password=&amp;lt;&lt;STRONG&gt;password&lt;/STRONG&gt;&amp;gt;",&lt;BR /&gt;"validate_certs": false&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"msg": "remote module (uri) does not support check mode"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS. Items in &lt;STRONG&gt;Bold&amp;nbsp;&lt;/STRONG&gt;have been substituted&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment I can pull the configs with a script that performs API calls though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 18:45:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/328029#M2336</guid>
      <dc:creator>jmolefe</dc:creator>
      <dc:date>2020-05-14T18:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/328163#M2337</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/141209"&gt;@jmolefe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you run the playbook with the &lt;STRONG&gt;--check&lt;/STRONG&gt; knob which is not compatible with the uri module.&lt;/P&gt;&lt;P&gt;I don t like it&amp;nbsp; but I have change the playbook to force each task to run in un-check mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Give it a try with the new version and you should be good,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 09:50:03 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/328163#M2337</guid>
      <dc:creator>sylvaing</dc:creator>
      <dc:date>2020-05-15T09:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/328176#M2339</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/139206"&gt;@sylvaing&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes removing the --check mode and installing the lxml python module did the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 11:07:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/328176#M2339</guid>
      <dc:creator>jmolefe</dc:creator>
      <dc:date>2020-05-15T11:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/328237#M2340</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/141209"&gt;@jmolefe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correct&amp;nbsp;&lt;SPAN&gt;lxml&amp;nbsp;is mandatory , I should create a README with the requirement ,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Will do that in the next update,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 16:44:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/328237#M2340</guid>
      <dc:creator>sylvaing</dc:creator>
      <dc:date>2020-05-15T16:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Use Ansible to backup config</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/328332#M2341</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/139206"&gt;@sylvaing&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes that should help.&lt;/P&gt;&lt;P&gt;I see however that whenever I connect to the devices using the playbook there is no logout task and the connection remains active until a connection-timeout kicks the sessions out. Weird..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* Check logged in users after the play completes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 06:11:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/use-ansible-to-backup-config/m-p/328332#M2341</guid>
      <dc:creator>jmolefe</dc:creator>
      <dc:date>2020-05-16T06:11:38Z</dc:date>
    </item>
  </channel>
</rss>

