Merge "Cleanup previous files for puppet network runtime execution"
This commit is contained in:
commit
f00a516d92
|
@ -86,8 +86,10 @@ function parse_interface_stanzas {
|
|||
local last_generated=''
|
||||
local puppet_data
|
||||
|
||||
do_rm ${PUPPET_DIR}/auto
|
||||
do_rm ${PUPPET_DIR}/ifcfg-\*
|
||||
log_it info "remove ${PUPPET_DIR}/auto"
|
||||
rm -f ${PUPPET_DIR}/auto
|
||||
log_it info "remove ${PUPPET_DIR}/ifcfg-*"
|
||||
rm -f ${PUPPET_DIR}/ifcfg-*
|
||||
|
||||
is_iface=$(false)
|
||||
is_auto=$(false)
|
||||
|
|
|
@ -654,7 +654,8 @@ class platform::network::apply {
|
|||
include ::platform::network::addresses
|
||||
include ::platform::network::routes
|
||||
|
||||
Network_config <| |>
|
||||
Exec['cleanup-interfaces-file']
|
||||
-> Network_config <| |>
|
||||
-> Exec['apply-network-config']
|
||||
-> Platform::Network::Network_address <| |>
|
||||
-> Exec['wait-for-tentative']
|
||||
|
@ -685,6 +686,12 @@ class platform::network::apply {
|
|||
try_sleep => 1,
|
||||
onlyif => 'test ! -f /var/run/.network_upgrade_bootstrap',
|
||||
}
|
||||
|
||||
exec { 'cleanup-interfaces-file':
|
||||
command => 'rm -f /var/run/network-scripts.puppet/interfaces && touch /var/run/network-scripts.puppet/interfaces',
|
||||
logoutput => true,
|
||||
onlyif => 'test -f /var/run/network-scripts.puppet/interfaces',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue