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

Unified Diff: manifests/vagrant.pp

Issue 9349025: Generate /etc/hosts via usual host class, do not define a custom one (Closed)
Patch Set: Created Feb. 8, 2013, 10:11 a.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/hosts/manifests/init.pp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: manifests/vagrant.pp
===================================================================
--- a/manifests/vagrant.pp
+++ b/manifests/vagrant.pp
@@ -1,18 +1,30 @@
-node default {
- class {'hosts':
- hosts => {
- 'localhost' => '127.0.0.1',
- "${hostname}" => '127.0.0.1',
- 'www.adblockplus.org' => '10.8.0.97',
- 'monitoring.adblockplus.org' => '10.8.0.98',
- 'server_1.adblockplus.org' => '10.8.0.105',
- 'server_3.adblockplus.org' => '10.8.0.99',
- 'server_4.adblockplus.org' => '10.8.0.98',
- 'server_5.adblockplus.org' => '10.8.0.100',
- 'server_6.adblockplus.org' => '10.8.0.101',
- 'server_7.adblockplus.org' => '10.8.0.102',
- 'server_8.adblockplus.org' => '10.8.0.103',
- 'server_9.adblockplus.org' => '10.8.0.104'
- }
+define hostentry (
+ $host = $title['host'],
+ $ip = $title['ip']
+) {
+ host {$host:
+ ensure => present,
+ ip => $ip,
+ name => $host
}
}
+
+node default {
+
+ $hosts = [
+ {host => 'localhost', ip => '127.0.0.1'},
+ {host => $hostname, ip => '127.0.0.1'},
+ {host => 'www.adblockplus.org', ip => '10.8.0.97'},
+ {host => 'monitoring.adblockplus.org', ip => '10.8.0.98'},
+ {host => 'server_1.adblockplus.org', ip => '10.8.0.105'},
+ {host => 'server_3.adblockplus.org', ip => '10.8.0.99'},
+ {host => 'server_4.adblockplus.org', ip => '10.8.0.98'},
+ {host => 'server_5.adblockplus.org', ip => '10.8.0.100'},
+ {host => 'server_6.adblockplus.org', ip => '10.8.0.101'},
+ {host => 'server_7.adblockplus.org', ip => '10.8.0.102'},
+ {host => 'server_8.adblockplus.org', ip => '10.8.0.103'},
+ {host => 'server_9.adblockplus.org', ip => '10.8.0.104'}
+ ]
+
+ hostentry { $hosts: }
+}
« no previous file with comments | « no previous file | modules/hosts/manifests/init.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld