# \[ Ansible-Fortinet\] Fortinet issue with ansible

**URL:** <https://forum.ansible.com/t/ansible-fortinet-fortinet-issue-with-ansible/37005>\
**Category:** Ansible Project\
**Created:** [August 18, 2022, 6:15pm UTC](https://forum.ansible.com/t/ansible-fortinet-fortinet-issue-with-ansible/37005 "2022-08-18T18:15:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ibrahim\_camara](https://avatars.discourse-cdn.com/v4/letter/i/bbe5ce/32.png) [@ibrahim\_camara](https://forum.ansible.com/u/ibrahim_camara)\
**Post date:** [August 18, 2022, 6:15pm UTC](https://forum.ansible.com/t/ansible-fortinet-fortinet-issue-with-ansible/37005/1 "2022-08-18T18:15:38Z")

</div>

Hello,

I need help with an ansible deployment I would like to create a user account (admin) on fortinet.

but when I play the playbook I have an error that I can’t debug if someone in the group has already encountered this error when deploying on fortinet could he help me.

i share my simple test configuration below:

**inventary hosts:**  
[forti]  
192.168.1.136

**testForti.yml**

---

<div class="post-metadata">

**Author:** ![ibrahim\_camara](https://avatars.discourse-cdn.com/v4/letter/i/bbe5ce/32.png) [@ibrahim\_camara](https://forum.ansible.com/u/ibrahim_camara)\
**Post date:** [August 18, 2022, 6:49pm UTC](https://forum.ansible.com/t/ansible-fortinet-fortinet-issue-with-ansible/37005/2 "2022-08-18T18:49:04Z")

</div>

hello,

i resolve the issue .  
i see that ansible check " [https://192.168.1.136:443/logincheck](https://192.168.1.136:443/logincheck)" , but in fortinet the port:443 is use for the sslvpn.  
So the best practice is to use new port for the management admin exemple: 4433 and configure a certificat (in system setting fortigate) and enable https on the phisycal port.

So ansible can https for the connection to the FW

just change:  
ansible\_httpapi\_port: 443 → ansible\_httpapi\_port: 4433
