Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
loxon76
New Contributor

Ansible for end session FortiGate

Setting up a baseline script to deploy my fortigates.

And I ran into the following problem while running my script:

One of the steps is to delete the Admin user, and when I go to delete it I get a warning that it is logged in because I used it for the initial configurations.

I would like to know if anyone has any idea how to disconnect the user using Ansible so that I can finish applying the baseline.

https://19216801.onl/ https://routerlogin.uno/
2 REPLIES 2
Severo
New Contributor II

First, create a new administrator account with the necessary privileges to maintain access. Next, ensure that the allow_remove_admin_session parameter is set to "enable" in the administrator's configuration, which allows privileged users to terminate active admin sessions. You can use the fortios_system_admin module in your Ansible playbook to configure the new admin and enable this option. Once the new admin is set up, terminate the default admin’s session before deleting the account.

kathama2
New Contributor

It's just like on a server installation. You create the new ansible admin user during the initial config steps, then switch users during the play, and ansible can then delete the first account.

10.0.0.0.1 192.168.1.254
Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors