theforeman / foreman-ansible-modules

Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello
GNU General Public License v3.0
148 stars 165 forks source link

Add possibility to configure more than one interface per host #871

Closed cmeissner closed 4 years ago

cmeissner commented 4 years ago
SUMMARY

We manage (create/delete/configure) hosts via ansible module what works fine for us. But now we need a host which provides two nics with two different subnets aligned to. As we see in the documentation of the ansible host module (link) there are only single parameter subnet, subnet6 and domain which we assume that these configure the nic.

ISSUE TYPE

It would be great if we'll be able to manage all nics of a host. Maybe convert subnet, subnet6 anddomain` into list or dict object to manage more than one interface at all. A dict can be a better choice to address interfaces by name.

cmeissner commented 4 years ago

As described in API v2 documentation for creating a host. there is an interfaces array. This should be addressed by the ansible module to manage multiple interfaces i guess.

evgeni commented 4 years ago

I think that's an duplicate of https://github.com/theforeman/foreman-ansible-modules/issues/757, which we are planning to address soon. Would you agree?

cmeissner commented 4 years ago

Agreed! Is there a valid time schedule already or should we implement a workaround for a while?

evgeni commented 4 years ago

There is no schedule, @Fobhep tried it in https://github.com/theforeman/foreman-ansible-modules/pull/792 but had some issues with it.

Best is probably to have a workaround for now :(