<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Fortinet on Ricky</title><link>https://linzeyan.github.io/categories/fortinet/</link><description>Recent content in Fortinet on Ricky</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Thu, 06 Jan 2022 13:40:40 +0800</lastBuildDate><atom:link href="https://linzeyan.github.io/categories/fortinet/index.xml" rel="self" type="application/rss+xml"/><item><title>Misspelling, missing collection, or incorrect module path for fortios_system_config_backup_restore</title><link>https://linzeyan.github.io/posts/2022/20220106-ansible-galaxy-fortios-collection/</link><pubDate>Thu, 06 Jan 2022 13:40:40 +0800</pubDate><guid>https://linzeyan.github.io/posts/2022/20220106-ansible-galaxy-fortios-collection/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://github.com/fortinet-ansible-dev/ansible-galaxy-fortios-collection/issues/95" target="_blank" rel="noopener">Misspelling, missing collection, or incorrect module path for fortios_system_config_backup_restore&lt;/a>&lt;/li>
&lt;/ul>
&lt;h4 id="issue">issue&lt;/h4>
&lt;p>Hi,&lt;/p>
&lt;p>I&amp;rsquo;m trying to retrieve the configuration from a Fortigate using the module &lt;code>fortios_system_config_backup_restore&lt;/code> and basing on your playbook example.&lt;/p>
&lt;p>I have &lt;code>ansible 2.10.6&lt;/code>.&lt;/p>
&lt;p>When I use the collection &lt;code>fortinet.fortios:1.1.8&lt;/code>, I got the following error: &lt;code>missing 1 required positional argument: 'mod'&lt;/code>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>The full traceback is:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Traceback &lt;span style="color:#f92672">(&lt;/span>most recent call last&lt;span style="color:#f92672">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> File &lt;span style="color:#e6db74">&amp;#34;/home/ansible/.ansible/tmp/ansible-local-8668osvgufxk/ansible-tmp-1615481963.0092971-8768-3877705280026/AnsiballZ_fortios_system_config_backup_restore.py&amp;#34;&lt;/span>, line 102, in &amp;lt;module&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> _ansiballz_main&lt;span style="color:#f92672">()&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> File &lt;span style="color:#e6db74">&amp;#34;/home/ansible/.ansible/tmp/ansible-local-8668osvgufxk/ansible-tmp-1615481963.0092971-8768-3877705280026/AnsiballZ_fortios_system_config_backup_restore.py&amp;#34;&lt;/span>, line 94, in _ansiballz_main
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> invoke_module&lt;span style="color:#f92672">(&lt;/span>zipped_mod, temp_path, ANSIBALLZ_PARAMS&lt;span style="color:#f92672">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> File &lt;span style="color:#e6db74">&amp;#34;/home/ansible/.ansible/tmp/ansible-local-8668osvgufxk/ansible-tmp-1615481963.0092971-8768-3877705280026/AnsiballZ_fortios_system_config_backup_restore.py&amp;#34;&lt;/span>, line 40, in invoke_module
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> runpy.run_module&lt;span style="color:#f92672">(&lt;/span>mod_name&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#39;ansible_collections.fortinet.fortios.plugins.modules.fortios_system_config_backup_restore&amp;#39;&lt;/span>, init_globals&lt;span style="color:#f92672">=&lt;/span>None, run_name&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#39;__main__&amp;#39;&lt;/span>, alter_sys&lt;span style="color:#f92672">=&lt;/span>True&lt;span style="color:#f92672">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> File &lt;span style="color:#e6db74">&amp;#34;/usr/lib/python3.8/runpy.py&amp;#34;&lt;/span>, line 207, in run_module
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> _run_module_code&lt;span style="color:#f92672">(&lt;/span>code, init_globals, run_name, mod_spec&lt;span style="color:#f92672">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> File &lt;span style="color:#e6db74">&amp;#34;/usr/lib/python3.8/runpy.py&amp;#34;&lt;/span>, line 97, in _run_module_code
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> _run_code&lt;span style="color:#f92672">(&lt;/span>code, mod_globals, init_globals,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> File &lt;span style="color:#e6db74">&amp;#34;/usr/lib/python3.8/runpy.py&amp;#34;&lt;/span>, line 87, in _run_code
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> exec&lt;span style="color:#f92672">(&lt;/span>code, run_globals&lt;span style="color:#f92672">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> File &lt;span style="color:#e6db74">&amp;#34;/tmp/ansible_fortinet.fortios.fortios_system_config_backup_restore_payload_mplamrs7/ansible_fortinet.fortios.fortios_system_config_backup_restore_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_system_config_backup_restore.py&amp;#34;&lt;/span>, line 472, in &amp;lt;module&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> File &lt;span style="color:#e6db74">&amp;#34;/tmp/ansible_fortinet.fortios.fortios_system_config_backup_restore_payload_mplamrs7/ansible_fortinet.fortios.fortios_system_config_backup_restore_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_system_config_backup_restore.py&amp;#34;&lt;/span>, line 436, in main
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>TypeError: __init__&lt;span style="color:#f92672">()&lt;/span> missing &lt;span style="color:#ae81ff">1&lt;/span> required positional argument: &lt;span style="color:#e6db74">&amp;#39;mod&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>fatal: &lt;span style="color:#f92672">[&lt;/span>fortigate-01&lt;span style="color:#f92672">]&lt;/span>: FAILED! &lt;span style="color:#f92672">=&lt;/span>&amp;gt; &lt;span style="color:#f92672">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;changed&amp;#34;&lt;/span>: false,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;module_stderr&amp;#34;&lt;/span>: &lt;span style="color:#e6db74">&amp;#34;Traceback (most recent call last):\n File \&amp;#34;/home/ansible/.ansible/tmp/ansible-local-8668osvgufxk/ansible-tmp-1615481963.0092971-8768-3877705280026/AnsiballZ_fortios_system_config_backup_restore.py\&amp;#34;, line 102, in &amp;lt;module&amp;gt;\n _ansiballz_main()\n File \&amp;#34;/home/ansible/.ansible/tmp/ansible-local-8668osvgufxk/ansible-tmp-1615481963.0092971-8768-3877705280026/AnsiballZ_fortios_system_config_backup_restore.py\&amp;#34;, line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \&amp;#34;/home/ansible/.ansible/tmp/ansible-local-8668osvgufxk/ansible-tmp-1615481963.0092971-8768-3877705280026/AnsiballZ_fortios_system_config_backup_restore.py\&amp;#34;, line 40, in invoke_module\n runpy.run_module(mod_name=&amp;#39;ansible_collections.fortinet.fortios.plugins.modules.fortios_system_config_backup_restore&amp;#39;, init_globals=None, run_name=&amp;#39;__main__&amp;#39;, alter_sys=True)\n File \&amp;#34;/usr/lib/python3.8/runpy.py\&amp;#34;, line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \&amp;#34;/usr/lib/python3.8/runpy.py\&amp;#34;, line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \&amp;#34;/usr/lib/python3.8/runpy.py\&amp;#34;, line 87, in _run_code\n exec(code, run_globals)\n File \&amp;#34;/tmp/ansible_fortinet.fortios.fortios_system_config_backup_restore_payload_mplamrs7/ansible_fortinet.fortios.fortios_system_config_backup_restore_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_system_config_backup_restore.py\&amp;#34;, line 472, in &amp;lt;module&amp;gt;\n File \&amp;#34;/tmp/ansible_fortinet.fortios.fortios_system_config_backup_restore_payload_mplamrs7/ansible_fortinet.fortios.fortios_system_config_backup_restore_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_system_config_backup_restore.py\&amp;#34;, line 436, in main\nTypeError: __init__() missing 1 required positional argument: &amp;#39;mod&amp;#39;\n&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;module_stdout&amp;#34;&lt;/span>: &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;msg&amp;#34;&lt;/span>: &lt;span style="color:#e6db74">&amp;#34;MODULE FAILURE\nSee stdout/stderr for the exact error&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;rc&amp;#34;&lt;/span>: &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using the recent pre release &lt;code>fortinet.fortios:2.0.0&lt;/code> , I got:&lt;/p></description></item></channel></rss>