Index: modules/base/manifests/init.pp |
=================================================================== |
--- a/modules/base/manifests/init.pp |
+++ b/modules/base/manifests/init.pp |
@@ -1,18 +1,20 @@ |
class base ($zone='adblockplus.org') { |
stage {'pre': before => Stage['main']} |
stage {'post': require => Stage['main']} |
class {'users': |
stage => 'pre', |
} |
- class {'apt': |
- always_apt_update => true |
+ if !defined(Class['apt']) { |
+ class {'apt': |
+ always_apt_update => true |
+ } |
} |
Exec['apt_update'] -> Package <| |> |
include private::users, postfix, ssh |
package {['mercurial', 'vim', 'emacs', 'debian-goodies', 'htop']: |
ensure => present, |
@@ -47,33 +49,33 @@ class base ($zone='adblockplus.org') { |
define explicit_host_record( |
$ip, |
$ssh_public_key = undef, |
$role = undef, |
$dns = undef, |
$groups = undef, |
) { |
- |
+ |
if is_array($ip) { |
$internal_ip = $ip[0] |
} else { |
$internal_ip = $ip |
} |
$fqdn_name = join([$name, $base::zone], '.') |
- |
+ |
host{$name: |
ensure => present, |
ip => $internal_ip, |
name => $fqdn_name, |
host_aliases => $dns ? { |
undef => [], |
default => $dns, |
- } |
+ } |
} |
if $ssh_public_key != undef { |
$name_key = $dns ? { |
undef => $fqdn_name, |
default => $dns, |
} |