<?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: Gateway First-time wizard through Ansible Playbook in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50182#M15</link>
    <description>&lt;P&gt;If I read his playbook correctly, he's executing config_system over SSH, which should be doable before the API is installed.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Apr 2019 18:48:18 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2019-04-08T18:48:18Z</dc:date>
    <item>
      <title>Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49688#M3</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to automate the gateway first time wizard&amp;nbsp; through ansible .while connecting the gateway from ansible i am getting the below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hostfile:&lt;/P&gt;&lt;P&gt;Gaia:vars]&lt;BR /&gt;ansible_connection=ssh&lt;BR /&gt;ansible_ssh_user=admin&lt;BR /&gt;ansible_sudo_pass=Infy123+&lt;BR /&gt;ansible_python_interpreter=/opt/CPsuite-R80/fw1/Python/bin/python&lt;BR /&gt;#export ansible_user='admin'&lt;BR /&gt;#export ansible_ssh_pass='Infy123+'&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[Gaia]&lt;BR /&gt;10.X.X.X ansible_python_interpreter="/opt/CPsuite-R80/fw1/Python/bin/python"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Playbook:&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: Gaia&lt;BR /&gt;gather_facts: no&lt;BR /&gt;tasks:&lt;BR /&gt;- name: Present working directory&lt;BR /&gt;command: pwd&lt;BR /&gt;- name: to check the route&lt;BR /&gt;command: netstat -nr&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;PLAY [Gaia] ************************************************************************************************************************************************************&lt;/P&gt;&lt;P&gt;TASK [Present working directory] ***************************************************************************************************************************************&lt;BR /&gt;fatal: [10.66.40.162]: UNREACHABLE! =&amp;gt; {"changed": false, "msg": "SSH Error: data could not be sent to remote host \"10.66.40.162\". Make sure this host can be reached over ssh", "unreachable": true}&lt;BR /&gt;to retry, use: --limit @/etc/ansible/gateway.retry&lt;/P&gt;&lt;P&gt;PLAY RECAP *************************************************************************************************************************************************************&lt;BR /&gt;10.66.40.162 : ok=0 changed=0 unreachable=1 failed=0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i am able to SSH the gateway from ansible server manually&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 09:25:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49688#M3</guid>
      <dc:creator>Aathi</dc:creator>
      <dc:date>2019-04-03T09:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49689#M4</link>
      <description>&lt;P&gt;That won't work. FTW is supposed to be done through WebUI. To deploy a new GW through ansible, you have to add GAIA API first. Look it up here, there is a couple of costs with examples already on CheckMates&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 09:29:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49689#M4</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2019-04-03T09:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49701#M5</link>
      <description>HI Valeri,&lt;BR /&gt;&lt;BR /&gt;Thanks for the update.Can you help me how i have to add GAIA API .&lt;BR /&gt;Regards&lt;BR /&gt;Aathi</description>
      <pubDate>Wed, 03 Apr 2019 11:09:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49701#M5</guid>
      <dc:creator>Aathi</dc:creator>
      <dc:date>2019-04-03T11:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49743#M6</link>
      <description>&lt;P&gt;You don't sudo on Gaia, you need to login as admin.&lt;BR /&gt;Also the Python included on the appliance does not contain many libraries and may not work with Ansible.&lt;BR /&gt;&lt;BR /&gt;The Gaia API is here: &lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk143612" target="_blank" rel="noopener"&gt;https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk143612&lt;/A&gt;&lt;BR /&gt;However I'm not sure it can be used to run the First Time Wizard.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 16:57:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49743#M6</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-04-05T16:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49905#M7</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;The below mentioned script is not working for fresh gateways&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: "{{ target }}"&lt;BR /&gt;gather_facts: no&lt;BR /&gt;connection: local&lt;BR /&gt;tasks:&lt;/P&gt;&lt;P&gt;- name: "Create config_system on the gateway"&lt;BR /&gt;raw: echo "config_system --config-string \"hostname={{ hostname }}&amp;amp;ftw_sic_key={{ sickey }}&amp;amp;timezone='America/New_York'&amp;amp;install_security_managment=false&amp;amp;install_mgmt_primary=false&amp;amp;install_security_gw=true&amp;amp;gateway_daip=false&amp;amp;install_ppak=true&amp;amp;gateway_cluster_member=false&amp;amp;download_info=true\" &amp;gt;&amp;gt; ftw.output &amp;amp; " &amp;gt; /home/admin/ftwstart&lt;/P&gt;&lt;P&gt;- name: "Change permissions"&lt;BR /&gt;raw: chmod 755 ftwstart&lt;/P&gt;&lt;P&gt;- name: "Run the FTW Setup"&lt;BR /&gt;command: "/bin/bash /home/admin/ftwstart"&lt;/P&gt;&lt;P&gt;- name: Wait until the FTW completes&lt;BR /&gt;wait_for:&lt;BR /&gt;path: /etc/.wizard_accepted&lt;BR /&gt;register: exists&lt;BR /&gt;until: exists|success&lt;BR /&gt;retries: 20&lt;BR /&gt;delay: 15&lt;/P&gt;&lt;P&gt;- name: Waiting for 10 seconds before reboot&lt;BR /&gt;pause:&lt;BR /&gt;seconds: 10&lt;/P&gt;&lt;P&gt;- name: Rebooting&lt;BR /&gt;command: "shutdown -r now"&lt;/P&gt;&lt;P&gt;I am getting the below error while executing from ansible server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apr 5 07:31:29 2019 Gateway01 ansible-wait_for: Invoked with active_connection_states=['ESTABLISHED', 'FIN_WAIT1', 'FIN_WAIT2', 'SYN_RECV', 'SYN_SENT', 'TIME_WAIT'] state=started connect_timeout=5 delay=0 msg=None host=127.0.0.1 sleep=1 timeout=300 exclude_hosts=None search_regex=None path=/etc/.wizard_accepted port=None&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But first-time wizard already installed gateways&amp;nbsp; the playbook is working fine .Kindly help on this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 11:34:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49905#M7</guid>
      <dc:creator>Aathi</dc:creator>
      <dc:date>2019-04-05T11:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49948#M8</link>
      <description>You said that the script is not working.&lt;BR /&gt;Yet, at the same time, you said the First Time Wizard completed successfully.&lt;BR /&gt;What is the issue, exactly?</description>
      <pubDate>Fri, 05 Apr 2019 16:56:19 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49948#M8</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-04-05T16:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49955#M9</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;For fresh gateways it is not working. not able to configure the first time wizard using this&amp;nbsp; playbook .can you help to solve the issue as i am having demo on monday.do let me know if you have any other scripts or playbook to deploy the firsttime wizard&lt;/P&gt;&lt;P&gt;Thanks in advance.&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;&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>Fri, 05 Apr 2019 19:16:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49955#M9</guid>
      <dc:creator>Aathi</dc:creator>
      <dc:date>2019-04-05T19:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49967#M10</link>
      <description>You're doing a level of indirection in your playbook that I'm not sure you need to do.&lt;BR /&gt;Why aren't you just invoking config_system directly versus running it directly?</description>
      <pubDate>Fri, 05 Apr 2019 21:20:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49967#M10</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-04-05T21:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49971#M11</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are automating checkpoint related tasks through ansible.Please let me know whether we can automate first time wizard through ansible and if there is any other ways also please do let me know if will be more helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2019 04:32:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/49971#M11</guid>
      <dc:creator>Aathi</dc:creator>
      <dc:date>2019-04-06T04:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50005#M12</link>
      <description>&lt;P&gt;You’re not giving any details are the starting state of these appliances, what kind of appliances these are, version of code, etc.&amp;nbsp;Based on that, we might be able to provide some alternatives.&lt;/P&gt;
&lt;P&gt;What I tried to say before (but failed) is your playbook appears to create a script on the appliance to call config_system when you could just have the playbook call config_system directly. Since the default shell (clish) does NOT support output redirection, your approach won't work. Likewise, checking for the existence of a file won't work since clish doesn't expose the filesystem.&lt;/P&gt;
&lt;P&gt;Before you write an Ansible playbook to automate something, try to do the same steps as a human first and see if they work.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2019 17:47:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50005#M12</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-04-06T17:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50115#M13</link>
      <description>&lt;P&gt;For info about GAIA API, please start here:&amp;nbsp;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk143612" target="_blank"&gt;https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk143612&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are also plenty of articles and demos around this topic in the community. Just look it up, user "Search all content" tool above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 09:01:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50115#M13</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2019-04-08T09:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50116#M14</link>
      <description>&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/7"&gt;@PhoneBoy&lt;/a&gt;&amp;nbsp;, CLI based script will not work on the fresh installation. One needs to install API first. Our CPX demo actually includes API based First Wizard GW initialisation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The flow should be:&lt;/P&gt;
&lt;P&gt;1. Fresh install&lt;/P&gt;
&lt;P&gt;2. API deployment&lt;/P&gt;
&lt;P&gt;3. Ansible config&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 09:03:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50116#M14</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2019-04-08T09:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50182#M15</link>
      <description>&lt;P&gt;If I read his playbook correctly, he's executing config_system over SSH, which should be doable before the API is installed.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 18:48:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50182#M15</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-04-08T18:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50393#M16</link>
      <description>&lt;P&gt;Correct. Cause ssh on a freshly installed device does not give you bash. He needs to set up expert access or a direct bash enabled account beforehand. I was proposing an alternative which is supposed to be better for Ansible and other automation tools.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 08:20:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50393#M16</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2019-04-10T08:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway First-time wizard through Ansible Playbook</title>
      <link>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50595#M17</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your support for this issue. the below ansible script is working for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: Gaia&lt;BR /&gt;gather_facts: no&lt;BR /&gt;connection: local&lt;BR /&gt;vars_files:&lt;BR /&gt;- vars.yml&lt;BR /&gt;tasks:&lt;/P&gt;&lt;P&gt;- name: "Create config_system on the gateway"&lt;BR /&gt;command: config_system --config-string "hostname=myhost&amp;amp;domainname=nnm.com&amp;amp;timezone='America/Indiana/Indianapolis'&amp;amp;ftw_sic_key=aaaa&amp;amp;install_security_gw=true&amp;amp;gateway_daip=false&amp;amp;install_ppak=true&amp;amp;gateway_cluster_member=false&amp;amp;install_security_managment=false"&lt;BR /&gt;ignore_unreachable: true&lt;BR /&gt;- name: reboot the gateway&lt;BR /&gt;command: shutdown -r now&lt;BR /&gt;- name: wait for server to come back&lt;BR /&gt;wait_for_connection:&lt;BR /&gt;timeout: 120&lt;BR /&gt;- name: THE FIRST-TIME WIZARD COMPLETED SUCCESSFULLY&lt;BR /&gt;command: uptime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aathi&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 13:31:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Gateway-First-time-wizard-through-Ansible-Playbook/m-p/50595#M17</guid>
      <dc:creator>Aathi</dc:creator>
      <dc:date>2019-04-11T13:31:13Z</dc:date>
    </item>
  </channel>
</rss>

