Open gerases opened 7 years ago
Hi gerases,
this is a known issue https://github.com/voxpupuli/puppet-network/issues/132. Forcing an if down/up on the interfaces (with exec?) would make them use the updated configuration.
Cool. I was thinking about doing an exec but wasn't sure if it was best practice. Thank you much.
Well, I don't know if that is the right solution either, but that is what I ended up doing when using puppet-network myself. Hope it helps.
I am wondering if restarting the network service at every puppet run is a good idea. What I mean is: in a production environment, could this cause some connection issues?
I am using the network module as it follows:
class profile::network::interfaces($interfaces = hiera('interfaces',false)) {
if ($interfaces != false) {
include '::network'
create_resources(network_config, $interfaces)
}
}
And in hiera:
interfaces:
ens160:0:
name: 'ens160:0'
ensure: 'present'
provider: 'interfaces'
onboot: 'true'
ipaddress: 'xxx.xxx.xxx.xxx'
netmask: 'xxx.xxx.xxx.xxx'
method: 'static'
family: 'inet'
hotplug: 'false'
How could I implement something that restarts the network service only when changes are made?
Hi,
Upon configuring an interface, I though the network service would restart, but it doesn't. Can I do something to make that happen automatically? This is how I configure an interface:
Thanks