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

Unified Diff: modules/base/manifests/init.pp

Issue 29366882: Issue 3574 - Refactor Puppet class base into class adblockplus (Closed)
Patch Set: For comments 2 and 3 Created Dec. 6, 2016, 11:36 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
Index: modules/base/manifests/init.pp
===================================================================
deleted file mode 100644
--- a/modules/base/manifests/init.pp
+++ /dev/null
@@ -1,38 +0,0 @@
-class base ($zone='adblockplus.org') {
-
- $servers = hiera('servers')
- create_resources(base::explicit_host_record, $servers)
-
- define explicit_host_record(
- $ip,
- $ssh_public_key = undef,
- $role = undef,
- $dns = undef,
- $groups = undef,
- ) {
-
- $fqdn = $dns ? {
- undef => "$name.${base::zone}",
- default => $dns,
- }
-
- $ips = is_array($ip) ? {
- true => $ip,
- default => [$ip],
- }
-
- $public_key = $ssh_public_key ? {
- undef => undef,
- default => "ssh-rsa $ssh_public_key $fqdn",
- }
-
- adblockplus::host {$title:
- fqdn => $fqdn,
- groups => $groups,
- ips => $ips,
- name => $name,
- role => $role,
- public_key => $public_key,
- }
- }
-}

Powered by Google App Engine
This is Rietveld