- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Labels:
-
FortiGate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
