Faidon Liambotis has submitted this change and it was merged. Change subject: Silence interface::ip with an onlyif ......................................................................
Silence interface::ip with an onlyif This is another useless execve, but it's factually more correct and helps making puppet shut up and not print a message on each run. Change-Id: Ie7277be80dda72453b66384048b29023f9ae6262 --- M modules/interface/manifests/ip.pp 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Faidon Liambotis: Verified; Looks good to me, approved diff --git a/modules/interface/manifests/ip.pp b/modules/interface/manifests/ip.pp index 78a03a7..fcff1fe 100644 --- a/modules/interface/manifests/ip.pp +++ b/modules/interface/manifests/ip.pp @@ -1,7 +1,7 @@ # Expects address without a length, like address => "208.80.152.10", prefixlen => "32" define interface::ip($interface, $address, $prefixlen="32") { $prefix = "${address}/${prefixlen}" - $ipaddr_command = "ip addr add ${prefix} dev ${interface}" + $ipaddr_command = "ip address add ${prefix} dev ${interface}" if $::lsbdistid == "Ubuntu" and versioncmp($::lsbdistrelease, "10.04") >= 0 { # Use augeas to add an 'up' command to the interface @@ -14,7 +14,8 @@ # Add the IP address manually as well exec { $ipaddr_command: - path => "/bin:/usr/bin", - returns => [0, 2] + path => "/bin:/usr/bin", + returns => [0, 2], + onlyif => "ip address show ${interface} | grep -q ${prefix}", } } -- To view, visit https://gerrit.wikimedia.org/r/99358 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie7277be80dda72453b66384048b29023f9ae6262 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis <fai...@wikimedia.org> Gerrit-Reviewer: Faidon Liambotis <fai...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits