Handle subnets thats use external IPAM like phpIPAM with ansible modules

Problem: The foreman-ansible-modules provide a smart way to configure subnets in a foreman installation. This is especially helpful if you have to manage a bigger foreman installation with dozen of subnets in dozen of locations. This is why we want to use foreman-ansible-modules to configure anything via pipelines.
Unfortunately the subnet module is not able to handle IPAM configuration if you use an external IPAM like phpIPAM. This is what we do.
If we follow the documentation of the subnet module there are exactly 4 cases which are supported as IPAM by the ansible module.

DHCP ←
Internal DB
Random DB
EUI-64
None

Expected outcome:

  1. The plugin smart_proxy_ipam should extend the API object subnet by the needed fields to configure these via API too.
  2. The subnet module should provide a way to configure such fields from 1) via an extra dictionary or so.

Foreman and Proxy versions:

Foreman server: 2.1.2

Foreman and Proxy plugin versions:

smart_proxy_ipam: 0.0.15

Other relevant data:
We also open a issue on github page of foreman-ansible-modules (#966)

As noted in the GH issue, this needs a small patch (add external ipam to subnet module by evgeni · Pull Request #967 · theforeman/foreman-ansible-modules · GitHub) which I’d love you to test :wink:

1 Like

For the record, it also needs a small change in core: Bug #30890: please expose external IPAM group via API - Foreman

I will try to squeeze it for this week.

1 Like