<?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 in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Ansible/m-p/82149#M282</link>
    <description>Pretty sure the Python interpreter you're calling is incorrect for Gaia OS.&lt;BR /&gt;You might look at some other examples posted to the community, e.g. &lt;A href="https://community.checkpoint.com/t5/Ansible/Ansible-based-automation-for-Check-Point-Management-Server-and/m-p/54109" target="_blank"&gt;https://community.checkpoint.com/t5/Ansible/Ansible-based-automation-for-Check-Point-Management-Server-and/m-p/54109&lt;/A&gt;</description>
    <pubDate>Thu, 16 Apr 2020 18:06:17 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2020-04-16T18:06:17Z</dc:date>
    <item>
      <title>Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible/m-p/81998#M279</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi all, I'm trying to make a playbook to automate some commands on a Check Point (virtual).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Playbook:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;---&lt;BR /&gt;- hosts: mgmt-server&lt;BR /&gt;tasks:&lt;BR /&gt;- name: "login"&lt;BR /&gt;check_point_mgmt:&lt;BR /&gt;command: login&lt;BR /&gt;parameters:&lt;BR /&gt;username: "{{mgmt_user}}"&lt;BR /&gt;password: "{{mgmt_password}}"&lt;BR /&gt;management: "{{mgmt_server}}"&lt;BR /&gt;fingerprint: "{{mgmt_fingerprint}}"&lt;BR /&gt;register: login_response&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;- name: "set static-route default nexthop gateway address"&lt;BR /&gt;command: clish -c 'set static-route default nexthop gateway address 10.0.0.1 on' -s&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Host:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;## db-[99:101]-node.example.com&lt;BR /&gt;[mgmt-server]&lt;BR /&gt;127.0.0.1&lt;BR /&gt;[mgmt-server:vars]&lt;BR /&gt;ansible_user=ubuntu&lt;BR /&gt;mgmt_server=10.11.3.185&lt;BR /&gt;appliance_name=MGMT&lt;BR /&gt;ansible_python_interpreter=/usr/bin/python2.7&lt;BR /&gt;mgmt_user=admin&lt;BR /&gt;mgmt_password=1q2w3e&lt;BR /&gt;mgmt_fingerprint=43:2E:E0:61:FC:0B:E5:BD:02:42:9E:49:FA:79:46:5F:B4:C0:84:2C&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ansible.cfg:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;library = /usr/share/my_modules/&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;*&lt;BR /&gt;fatal: [127.0.0.1]: FAILED! =&amp;gt; {"changed": false, "cmd": "clish -c 'set static-route default nexthop gateway address 10.0.0.1 on' -s", "msg": "[Errno 2] No such file or directory", "rc": 2}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Снимок_1.PNG"&gt;&lt;img src="https://community.checkpoint.com/skins/images/A0811211BFFB226A1389B4D28DEFF538/responsive_peak/images/image_not_found.png" alt="Снимок_1.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But I have NOT problem with playbook:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;---&lt;BR /&gt;- hosts: mgmt-server&lt;BR /&gt;tasks:&lt;BR /&gt;- name: "login"&lt;BR /&gt;check_point_mgmt:&lt;BR /&gt;command: login&lt;BR /&gt;parameters:&lt;BR /&gt;username: "{{mgmt_user}}"&lt;BR /&gt;password: "{{mgmt_password}}"&lt;BR /&gt;management: "{{mgmt_server}}"&lt;BR /&gt;fingerprint: "{{mgmt_fingerprint}}"&lt;BR /&gt;register: login_response&lt;BR /&gt;- name: "add host"&lt;BR /&gt;check_point_mgmt:&lt;BR /&gt;command: add-host&amp;nbsp;&lt;BR /&gt;parameters:&amp;nbsp;&lt;BR /&gt;name: "host_demo"&lt;BR /&gt;ip-address: "1.2.3.5"&lt;BR /&gt;session-data: "{{ login_response }}"&lt;BR /&gt;- name: "add group"&lt;BR /&gt;check_point_mgmt:&lt;BR /&gt;command: add-group&lt;BR /&gt;parameters:&lt;BR /&gt;name: "group_demo"&lt;BR /&gt;members:&lt;BR /&gt;- "host_demo"&lt;BR /&gt;session-data: "{{ login_response }}"&lt;BR /&gt;- name: "publish"&amp;nbsp;&lt;BR /&gt;check_point_mgmt:&amp;nbsp;&lt;BR /&gt;command: publish&lt;BR /&gt;session-data: "{{login_response}}"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can someone assist? Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 15:21:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible/m-p/81998#M279</guid>
      <dc:creator>sergey1</dc:creator>
      <dc:date>2020-04-15T15:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible/m-p/82149#M282</link>
      <description>Pretty sure the Python interpreter you're calling is incorrect for Gaia OS.&lt;BR /&gt;You might look at some other examples posted to the community, e.g. &lt;A href="https://community.checkpoint.com/t5/Ansible/Ansible-based-automation-for-Check-Point-Management-Server-and/m-p/54109" target="_blank"&gt;https://community.checkpoint.com/t5/Ansible/Ansible-based-automation-for-Check-Point-Management-Server-and/m-p/54109&lt;/A&gt;</description>
      <pubDate>Thu, 16 Apr 2020 18:06:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible/m-p/82149#M282</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-04-16T18:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible/m-p/82727#M290</link>
      <description>Errors were in the module and in the code. Now my code is working. Thanks.</description>
      <pubDate>Wed, 22 Apr 2020 07:11:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible/m-p/82727#M290</guid>
      <dc:creator>sergey1</dc:creator>
      <dc:date>2020-04-22T07:11:52Z</dc:date>
    </item>
  </channel>
</rss>

