Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/adblockplus/manifests/host.pp

Issue 29366814: Noissue - Fix adblockplus::host $ensure = "absent" support (Closed)
Patch Set: Noissue - Include $ensure = "absent" example in the host class documentation Created Dec. 5, 2016, 12:03 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | modules/private-stub/hiera/hosts.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/adblockplus/manifests/host.pp
diff --git a/modules/adblockplus/manifests/host.pp b/modules/adblockplus/manifests/host.pp
index a2441b3095615256653f29acd20e51d49066abc0..034d8fb9cf76d83d9e6048ed49da025f87513f57 100644
--- a/modules/adblockplus/manifests/host.pp
+++ b/modules/adblockplus/manifests/host.pp
@@ -54,11 +54,16 @@
# $primary_ip = getparam(Host['node1'], 'ip')
# $key_type = getparam(Sshkey['node1'], 'type')
#
+# # Resources associated with 'absent' hosts are always realized
+# adblockplus::host {'node0':
+# ensure => 'absent',
+# }
+#
define adblockplus::host (
$ensure = 'present',
$fqdn = "$name.$adblockplus::authority",
$groups = [],
- $ips,
+ $ips = [],
$public_key = undef,
$role = undef,
) {
@@ -84,7 +89,7 @@ define adblockplus::host (
@host {$title:
ensure => $ensure,
- ip => pick($ips),
+ ip => pick($ips[0], '0.0.0.0'),
name => $fqdn,
tag => ['adblockplus::host'],
}
« no previous file with comments | « no previous file | modules/private-stub/hiera/hosts.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld