Faidon Liambotis has submitted this change and it was merged. Change subject: Brown paper bag fix for interface::ip $options ......................................................................
Brown paper bag fix for interface::ip $options This makes the regular case of no options add a double-space to the command, which makes Augeas not finding the existing entries and adding additional "up" statements to /etc/network/interfaces. Fix this by adding an $options_real variable (ugh, hate you puppet). Change-Id: I7190bf3b719f540aa5cbac832fa7395e344b803d --- M modules/interface/manifests/ip.pp 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved BBlack: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/interface/manifests/ip.pp b/modules/interface/manifests/ip.pp index 496ebeb..401779d 100644 --- a/modules/interface/manifests/ip.pp +++ b/modules/interface/manifests/ip.pp @@ -1,7 +1,12 @@ # Expects address without a length, like address => "208.80.152.10", prefixlen => "32" -define interface::ip($interface, $address, $prefixlen='32', $options='') { +define interface::ip($interface, $address, $prefixlen='32', $options=undef) { $prefix = "${address}/${prefixlen}" - $ipaddr_command = "ip addr add ${prefix} ${options} dev ${interface}" + if $options { + $options_real = "${options} " + } else { + $options_real = '' + } + $ipaddr_command = "ip addr add ${prefix} ${options_real}dev ${interface}" # Use augeas to add an 'up' command to the interface augeas { "${interface}_${prefix}": -- To view, visit https://gerrit.wikimedia.org/r/242633 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7190bf3b719f540aa5cbac832fa7395e344b803d Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis <fai...@wikimedia.org> Gerrit-Reviewer: BBlack <bbl...@wikimedia.org> Gerrit-Reviewer: Faidon Liambotis <fai...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits