<?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: fail to execute ansible command for PANFW in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224602#M1748</link>
    <description>&lt;P&gt;When you saying currently/today, does that mean that there are any plans in the future to use network_cli insted of pandevice for ansible?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Aug 2018 15:14:21 GMT</pubDate>
    <dc:creator>hbalzac</dc:creator>
    <dc:date>2018-08-02T15:14:21Z</dc:date>
    <item>
      <title>fail to execute ansible command for PANFW</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224554#M1745</link>
      <description>&lt;P&gt;Seek for solution to fix the problem. Thanks.&lt;/P&gt;&lt;P&gt;1）host vars:&lt;/P&gt;&lt;P&gt;ansible_user: user&lt;BR /&gt;ansible_password: xxxxxxxxxxxxx&lt;BR /&gt;ansible_connection: network_cli&lt;BR /&gt;ansible_network_os: panos&lt;/P&gt;&lt;P&gt;2）command:&lt;/P&gt;&lt;P&gt;ansible --vault-id /xxx/xxx/vault_key -i ./hosts xxxx -m ping&lt;/P&gt;&lt;P&gt;3）error output:&lt;/P&gt;&lt;P&gt;xxxxx | FAILED! =&amp;gt; {&lt;BR /&gt;"msg": "network os panos is not supported"&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 09:30:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224554#M1745</guid>
      <dc:creator>sjnkic</dc:creator>
      <dc:date>2018-08-02T09:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: fail to execute ansible command for PANFW</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224583#M1746</link>
      <description>&lt;P&gt;The Ansible modules for PAN-OS do not currently support the &lt;FONT face="courier new,courier"&gt;network_cli&lt;/FONT&gt; connection method. &amp;nbsp;Today these modules leverage the pandevice libraries to make API calls from the Ansible host. &amp;nbsp;You'll need to change your connection type to &lt;FONT face="courier new,courier"&gt;localhost&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Example:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;---&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;- name: Panorama configuration demo&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; hosts: localhost&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; connection: local&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; gather_facts: False&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; tasks:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; - name: include variables&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; include_vars: vars.yml&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; no_log: 'yes'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; - name: create a database server&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; panos_object:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ip_address: '{{ ip_address }}'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; api_key: '{{ api_key }}'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; addressobject: 'prod-db1'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; address: '10.0.50.10'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; description: "Database server 1"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 13:46:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224583#M1746</guid>
      <dc:creator>rhagen</dc:creator>
      <dc:date>2018-08-02T13:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: fail to execute ansible command for PANFW</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224602#M1748</link>
      <description>&lt;P&gt;When you saying currently/today, does that mean that there are any plans in the future to use network_cli insted of pandevice for ansible?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 15:14:21 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224602#M1748</guid>
      <dc:creator>hbalzac</dc:creator>
      <dc:date>2018-08-02T15:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: fail to execute ansible command for PANFW</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224614#M1749</link>
      <description>&lt;P&gt;I'll defer to&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/46544"&gt;@gfreeman&lt;/a&gt;&amp;nbsp;on that question. &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 16:41:56 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224614#M1749</guid>
      <dc:creator>rhagen</dc:creator>
      <dc:date>2018-08-02T16:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: fail to execute ansible command for PANFW</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224652#M1750</link>
      <description>&lt;P&gt;Cool&lt;/P&gt;&lt;P&gt;Its always good to have as few dependenties as possible &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 18:25:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224652#M1750</guid>
      <dc:creator>hbalzac</dc:creator>
      <dc:date>2018-08-02T18:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: fail to execute ansible command for PANFW</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224712#M1751</link>
      <description>&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;It works when change connection from 'network_cli' to 'local'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Further questions in vars:&lt;/P&gt;&lt;P&gt;1) how to use the 'api_key', where should I deternmine the value of 'api_key'&lt;/P&gt;&lt;P&gt;2) include vars: vars.yml.&lt;/P&gt;&lt;P&gt;&amp;nbsp; the location of vars.yml is the same with playbook.yml ?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 08:56:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224712#M1751</guid>
      <dc:creator>sjnkic</dc:creator>
      <dc:date>2018-08-03T08:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: fail to execute ansible command for PANFW</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224784#M1752</link>
      <description>&lt;P&gt;The API key is basically a hash of your username and password. &amp;nbsp;You can generate it on the firewall using a cURL command such as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;curl -X POST '&lt;A href="https://192.168.55.5/api?type=keygen&amp;amp;user=admin&amp;amp;password=paloalto" target="_blank"&gt;https://192.168.55.5/api?type=keygen&amp;amp;user=admin&amp;amp;password=paloalto&lt;/A&gt;'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll still want to safeguard the API key from exposure - just like a username and password. &amp;nbsp;Using an API key just makes it one less field to worry about in your Ansible task definitions. &amp;nbsp;You may want to place the key in a credentials.yml file and then encrypt it with &lt;A href="https://docs.ansible.com/ansible/latest/user_guide/vault.html" target="_self"&gt;Ansible Vault&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 20:55:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/fail-to-execute-ansible-command-for-panfw/m-p/224784#M1752</guid>
      <dc:creator>rhagen</dc:creator>
      <dc:date>2018-08-03T20:55:58Z</dc:date>
    </item>
  </channel>
</rss>

