<?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: FTD Ansible Module in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/ftd-ansible-module/m-p/4470293#M356</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/482043"&gt;@nstapp&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm prepping for the SAUTO exam so I've been playing with Ansible and FTD for the first time and this was doing my head in (especially as a complete Ansible n00b). Stumbled on your post and it sorted it right out. THANK YOU!!!!&lt;/P&gt;</description>
    <pubDate>Mon, 20 Sep 2021 18:48:09 GMT</pubDate>
    <dc:creator>mattw</dc:creator>
    <dc:date>2021-09-20T18:48:09Z</dc:date>
    <item>
      <title>FTD Ansible Module</title>
      <link>https://community.cisco.com/t5/network-security/ftd-ansible-module/m-p/4158369#M7</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to update an StoS Connection profile using the FTD Ansible modules.&amp;nbsp; I can't seem to get past the first post.&amp;nbsp; When running the operation, I continually get the erorr:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;fatal: [ftd]: FAILED! =&amp;gt; {"changed": false, "msg": {"Invalid data provided": "'type'"}}&lt;/PRE&gt;&lt;P&gt;In my playbook I am retrieving the VPN settings in a task and saving the result as "stosprofile" which I then use to fill out all of the mandatory fields per the documentation:&amp;nbsp;&lt;A href="https://developer.cisco.com/site/ftd-ansible/#!editstosconnectionprofile/" target="_blank"&gt;https://developer.cisco.com/site/ftd-ansible/#!editstosconnectionprofile/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; - name: edit outside stos vpn
      ftd_configuration:
        operation: editSToSConnectionProfile
        data:
          name: Name_Updated_2
          ikev1AuthMethod: "{{ stosprofile.ikev1AuthMethod }}"
          ikev2AuthMethod: "{{ stosprofile.ikev2AuthMethod }}"
          ikev1Enabled: "{{ stosprofile.ikev1Enabled }}"
          ikev2Enabled: "{{ stosprofile.ikev2Enabled }}"
          rriEnabled: "{{ stosprofile.rriEnabled }}"
          dynamicRRIEnabled: "{{ stosprofile.dynamicRRIEnabled }}"
          ipsecLifetimeInSeconds: "{{ stosprofile.ipsecLifetimeInSeconds }}"
          ipsecLifetimeInKiloBytes: "{{ stosprofile.ipsecLifetimeInKiloBytes }}"
          ipsecLifetimeUnlimited: "{{ stosprofile.ipsecLifetimeUnlimited }}"
          type: "stosconnectionprofile"
          outsideInterfaces: "{{ stosprofile.outsideInterfaces }}"
          id: "{{ stosprofile.id }}"
        path_params:
          objId: &amp;lt;objid&amp;gt;&lt;/PRE&gt;&lt;P&gt;When I run the operation with `check_mode: yes` I get a successful completion&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 23:58:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/ftd-ansible-module/m-p/4158369#M7</guid>
      <dc:creator>Michael Keetman</dc:creator>
      <dc:date>2020-09-28T23:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: FTD Ansible Module</title>
      <link>https://community.cisco.com/t5/network-security/ftd-ansible-module/m-p/4308434#M325</link>
      <description>&lt;P&gt;Hey Michael,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Literally just found the issue and resolution.&amp;nbsp; I've been troubleshooting this with a customer recently and it appears that the FTDAnsible module has some validation bugs it in (likely linked to FTD version and Spec checking done in ansible).&amp;nbsp; This is an ANSIBLE / ANSIBLE MODULE issue, not an FTD issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I'm assuming you are running FTD 6.6 + .&amp;nbsp; I assume this because this is where changes to the Spec have been made and are causing issues with the antiquated version of FTDAnsible in Ansible (even version 2.9).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bottom line is when you try to push a change to FTD via Ansible the FTDAnsible module validates the command by pulling a syntactical schema and making sure your command matches, only then will it send the command.&amp;nbsp; This validation fails in FTDAnsible with Ansible 2.9 and earlier with FTD 6.6+ because the Type field is no longer provided in the spec.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; On december 15th and 16th changes were pushed to allow FTDAnsible to properly validate commands to make changes, they were incorporated into the v0.3.1 release on Apr 28th 2020.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;You can either update FTDAnsible manually to v0.3.1 or make the changes manually to the module files in your version.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Changes here:&amp;nbsp;&lt;A href="https://github.com/CiscoDevNet/FTDAnsible/commit/9ce13b31337294d6aaec733a47e13a3c2d522d54" target="_blank"&gt;https://github.com/CiscoDevNet/FTDAnsible/commit/9ce13b31337294d6aaec733a47e13a3c2d522d54&lt;/A&gt;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 19:57:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/ftd-ansible-module/m-p/4308434#M325</guid>
      <dc:creator>nstapp</dc:creator>
      <dc:date>2021-03-16T19:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: FTD Ansible Module</title>
      <link>https://community.cisco.com/t5/network-security/ftd-ansible-module/m-p/4309792#M326</link>
      <description>&lt;P&gt;I wanted to make this a little easier to do so and warn/clarify about a bug currently affecting FTDAnsible module.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Even if you install the Galaxy collection community.networks (which has a more recent version of FTDAnsible) it currently imports and uses the native built in fdm_swagger_client.py&lt;/LI&gt;
&lt;LI&gt;It is generally NOT recommended to modify the built-ins because an update at any time can overwrite them, however in this case there is little workaround unless you use the DOCKER container version.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached is the ACTUAL file you will need to replace the current fdm_swagger_client.py with and the instructions are as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on the Linux version and the Ansible version "fdm_swagger_client" could be in different directories because of your python distro, so the below instructions account for that&lt;/P&gt;
&lt;P&gt;DO THIS FIRST:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;sudo su -
cd /
find . -name fdm_swagger_client.py
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will see something that looks like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DONT DO THIS - IT IS AN EXAMPLE&lt;/P&gt;
&lt;PRE&gt;/usr/lib/python3.6/site-packages/ansible/module_utils/network/ftd/fdm_swagger_client.py&lt;/PRE&gt;
&lt;P&gt;If you have installed the galaxy collections you will see others as well, but it is the one that starts with the /USR/LIB directory that is the one you ultimately need to modify till a new version gets pushed, and untill the galaxy collection bug is addressed.&lt;/P&gt;
&lt;P&gt;DO THIS SECOND&lt;/P&gt;
&lt;P&gt;But replace the file path with whatever was returned with your search from the FIND command:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;mv &amp;lt;ORIGINAL FDM_SWAGGER_CLIENT PATH&amp;gt; &amp;lt;ORIGINAL FDM_SWAGGER_CLIENT PATH.BAK&amp;gt;
nano &amp;lt;ORIGINAL FDM_SWAGGER_CLIENT PATH&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DONT DO THIS - IT IS AN EXAMPLE&lt;/P&gt;
&lt;PRE&gt;mv /usr/lib/python3.6/site-packages/ansible/module_utils/network/ftd/fdm_swagger_client.py /usr/lib/python3.6/site-packages/ansible/module_utils/network/ftd/fdm_swagger_client.py.bak
nano /usr/lib/python3.6/site-packages/ansible/module_utils/network/ftd/fdm_swagger_client.py&lt;/PRE&gt;
&lt;P&gt;Now open the file I provided with this post, copy the text and paste it into the nano editor via.&amp;nbsp; Then hit CTRL+o, enter, CTRL+x.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thats it! you are done and can now run playbooks against FTD6.6+&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 16:54:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/ftd-ansible-module/m-p/4309792#M326</guid>
      <dc:creator>nstapp</dc:creator>
      <dc:date>2021-03-18T16:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: FTD Ansible Module</title>
      <link>https://community.cisco.com/t5/network-security/ftd-ansible-module/m-p/4470293#M356</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/482043"&gt;@nstapp&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm prepping for the SAUTO exam so I've been playing with Ansible and FTD for the first time and this was doing my head in (especially as a complete Ansible n00b). Stumbled on your post and it sorted it right out. THANK YOU!!!!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 18:48:09 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/ftd-ansible-module/m-p/4470293#M356</guid>
      <dc:creator>mattw</dc:creator>
      <dc:date>2021-09-20T18:48:09Z</dc:date>
    </item>
  </channel>
</rss>

