<?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: Deploy file using ansible in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Deploy-file-using-ansible/m-p/187515#M738</link>
    <description>&lt;P&gt;I believe it's because you did not specify to NOT gather facts in your playbook. Check Point does not support it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;---&lt;BR /&gt;- name: "Copy file to MDS"&lt;BR /&gt;gather_facts: no&lt;BR /&gt;hosts: mds&lt;/P&gt;
&lt;P&gt;tasks:&lt;BR /&gt;- name: Transfer file&lt;BR /&gt;copy:&lt;BR /&gt;src: test.txt&lt;BR /&gt;dest: /var/log/tmp/test.txt&lt;BR /&gt;force: no&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2023 13:31:29 GMT</pubDate>
    <dc:creator>Erik_Lagzdins</dc:creator>
    <dc:date>2023-07-25T13:31:29Z</dc:date>
    <item>
      <title>Deploy file using ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Deploy-file-using-ansible/m-p/181208#M735</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want to automate file deployment on multiple management servers and gateways using ansible.&lt;/P&gt;&lt;P&gt;Sincerely, I don't get it running.&lt;/P&gt;&lt;P&gt;Playbook:&lt;/P&gt;&lt;PRE&gt;---&lt;BR /&gt;# Copy demo.txt to Check Point Management&lt;BR /&gt;&lt;BR /&gt;- name: Copy file&lt;BR /&gt;hosts: checkpoint_management&lt;BR /&gt;&lt;BR /&gt;tasks:&lt;BR /&gt;- name: Copy file&lt;BR /&gt;copy:&lt;BR /&gt;src: /home/xx/xx/ansible/demo.txt&lt;BR /&gt;dest: /home/xx/demo.txt&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result from running&amp;nbsp;&lt;EM&gt;ansible-playbook copy-file.yml&lt;/EM&gt;:&lt;/P&gt;&lt;PRE&gt;fatal: [xx.xx.xx.202]: FAILED! =&amp;gt; {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.setup": {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "exception": "Traceback (most recent call last):&lt;BR /&gt;File \"/home/xx/.ansible/tmp/ansible-tmp-1684305632.491652-3376170-41574932784899/AnsiballZ_setup.py\", line 102, in &amp;lt;module&amp;gt;&lt;BR /&gt;_ansiballz_main()&lt;BR /&gt;File \"/home/xx/.ansible/tmp/ansible-tmp-1684305632.491652-3376170-41574932784899/AnsiballZ_setup.py\", line 94, in _ansiballz_main&lt;BR /&gt;invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)&lt;BR /&gt;File \"/home/xx/.ansible/tmp/ansible-tmp-1684305632.491652-3376170-41574932784899/AnsiballZ_setup.py\", line 40, in invoke_module&lt;BR /&gt;runpy.run_module(mod_name='ansible.modules.setup', init_globals=None, run_name='__main__', alter_sys=True)&lt;BR /&gt;File \"/opt/CPsuite-R81.10/fw1/Python/lib/python2.7/runpy.py\", line 188, in run_module\r\n fname, loader, pkg_name)&lt;BR /&gt;File \"/opt/CPsuite-R81.10/fw1/Python/lib/python2.7/runpy.py\", line 82, in _run_module_code\r\n mod_name, mod_fname, mod_loader, pkg_name)&lt;BR /&gt;File \"/opt/CPsuite-R81.10/fw1/Python/lib/python2.7/runpy.py\", line 72, in _run_code\r\n exec code in run_globals&lt;BR /&gt;File \"/tmp/ansible_ansible.legacy.setup_payload_duRtha/ansible_ansible.legacy.setup_payload.zip/ansible/modules/setup.py\", line 130, in &amp;lt;module&amp;gt;&lt;BR /&gt;File \"/tmp/ansible_ansible.legacy.setup_payload_duRtha/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/facts/__init__.py\", line 34, in &amp;lt;module&amp;gt;&lt;BR /&gt;File \"/tmp/ansible_ansible.legacy.setup_payload_duRtha/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/facts/compat.py\", line 33, in &amp;lt;module&amp;gt;&lt;BR /&gt;File \"/tmp/ansible_ansible.legacy.setup_payload_duRtha/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/facts/default_collectors.py\", line 51, in &amp;lt;module&amp;gt;&lt;BR /&gt;File \"/tmp/ansible_ansible.legacy.setup_payload_duRtha/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/facts/system/service_mgr.py\", line 35, in &amp;lt;module&amp;gt;&lt;BR /&gt;ImportError: No module named distutils.version\r\n", "failed": true, "module_stderr": "Shared connection to xx.xx.xx.202 closed.\r\n", "module_stdout": "Traceback (most recent call last): &lt;BR /&gt;File \"/home/xx/.ansible/tmp/ansible-tmp-1684305632.491652-3376170-41574932784899/AnsiballZ_setup.py\", line 102, in &amp;lt;module&amp;gt;\r\n _ansiballz_main()&lt;BR /&gt;File \"/home/xx/.ansible/tmp/ansible-tmp-1684305632.491652-3376170-41574932784899/AnsiballZ_setup.py\", line 94, in _ansiballz_main&lt;BR /&gt;invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/home/xx/.ansible/tmp/ansible-tmp-1684305632.491652-3376170-41574932784899/AnsiballZ_setup.py\", line 40, in invoke_module&lt;BR /&gt;runpy.run_module(mod_name='ansible.modules.setup', init_globals=None, run_name='__main__', alter_sys=True)\r\n File \"/opt/CPsuite-R81.10/fw1/Python/lib/python2.7/runpy.py\", line 188, in run_module&lt;BR /&gt;fname, loader, pkg_name)\r\n File \"/opt/CPsuite-R81.10/fw1/Python/lib/python2.7/runpy.py\", line 82, in _run_module_code mod_name, mod_fname, mod_loader, pkg_name)&lt;BR /&gt;File \"/opt/CPsuite-R81.10/fw1/Python/lib/python2.7/runpy.py\", line 72, in _run_code&lt;BR /&gt;exec code in run_globals\r\n File \"/tmp/ansible_ansible.legacy.setup_payload_duRtha/ansible_ansible.legacy.setup_payload.zip/ansible/modules/setup.py\", line 130, in &amp;lt;module&amp;gt;&lt;BR /&gt;File \"/tmp/ansible_ansible.legacy.setup_payload_duRtha/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/facts/__init__.py\", line 34, in &amp;lt;module&amp;gt;&lt;BR /&gt;File \"/tmp/ansible_ansible.legacy.setup_payload_duRtha/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/facts/compat.py\", line 33, in &amp;lt;module&amp;gt;&lt;BR /&gt;File \"/tmp/ansible_ansible.legacy.setup_payload_duRtha/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/facts/default_collectors.py\", line 51, in &amp;lt;module&amp;gt;&lt;BR /&gt;File \"/tmp/ansible_ansible.legacy.setup_payload_duRtha/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/facts/system/service_mgr.py\", line 35, in &amp;lt;module&amp;gt;&lt;BR /&gt;ImportError: No module named distutils.version\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1, "warnings": ["Platform linux on host xx.xx.xx.202 is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could change the meaning of that path. See removed bc spam for more information."]}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I cannot find any helpful documentation on this, maybe you have a tip for me?&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 10:51:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Deploy-file-using-ansible/m-p/181208#M735</guid>
      <dc:creator>Michael_Wagner</dc:creator>
      <dc:date>2023-05-17T10:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy file using ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Deploy-file-using-ansible/m-p/181251#M736</link>
      <description>&lt;P&gt;To the best of my knowledge, we only support our own Ansible modules on Check Point appliances.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 15:25:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Deploy-file-using-ansible/m-p/181251#M736</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-05-17T15:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy file using ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Deploy-file-using-ansible/m-p/187515#M738</link>
      <description>&lt;P&gt;I believe it's because you did not specify to NOT gather facts in your playbook. Check Point does not support it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;---&lt;BR /&gt;- name: "Copy file to MDS"&lt;BR /&gt;gather_facts: no&lt;BR /&gt;hosts: mds&lt;/P&gt;
&lt;P&gt;tasks:&lt;BR /&gt;- name: Transfer file&lt;BR /&gt;copy:&lt;BR /&gt;src: test.txt&lt;BR /&gt;dest: /var/log/tmp/test.txt&lt;BR /&gt;force: no&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 13:31:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Deploy-file-using-ansible/m-p/187515#M738</guid>
      <dc:creator>Erik_Lagzdins</dc:creator>
      <dc:date>2023-07-25T13:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy file using ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Deploy-file-using-ansible/m-p/187523#M739</link>
      <description>&lt;P&gt;Thanks, that workes!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 13:39:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Deploy-file-using-ansible/m-p/187523#M739</guid>
      <dc:creator>Michael_Wagner</dc:creator>
      <dc:date>2023-07-25T13:39:39Z</dc:date>
    </item>
  </channel>
</rss>

