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

Fortigate + Ansible (fortinet.fortio)

I've just started getting into using Ansible with Fortinet. My first play was to setup DHCP reservations from my inventory (netbooting PIs). It seem like you have to manage the ID field for each reservation. Right now I'm basing the ID on the position in a list object that i'm looping through. I'm thinking I'm going to change this to be a group or something else so i can have a more static number.

My concern is how do you manage the ID. I don't like the idea of parsing the config to find the next number because I can't guarantee that ID is really free as the fortigate doesn't seem to support locking an ID (feels like race condition basically). It also doesn't seem like I can say just give me an ID that isn't used.

I'm assuming this is something I'll need to deal with across other fortinet.fortios modules but I haven't gone into anything outside of dhcp just yet.

Hopefully I'm missing something here. I read through a few of the docs and nothing is standing out. I did find member_path and member_state so at least I have something that works.

omegle xender
1 REPLY 1
amrit
Staff
Staff
Labels
Top Kudoed Authors