michaelrigart / ansible-role-interfaces

An ansible role for configuring different network interfaces
GNU General Public License v3.0
83 stars 61 forks source link

RedHat: move network service start after interface config #120

Closed markgoddard closed 2 years ago

markgoddard commented 2 years ago

The CentOS cloud images may include network interface files used when the image was built, which may be invalid. This role already has a workaround to remove them. It only removes files for interfaces that are not managed by this role. This ensures that the role is idempotent. However, if an invalid interface file exists for an interface that is managed by this role, it may prevent the network service from starting, resulting in Ansible failing in the following task:

RedHat | ensure network service is started and enabled

This change moves the start of the network service after configuring interfaces. This should overwrite any invalid configuration files of interfaces managed by this role. This may result in some interfaces being bounced again in handlers.