Merge pull request #444 from enovance/init
cloud/init: add default values
This commit is contained in:
@@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
class cloud(
|
class cloud(
|
||||||
$rhn_registration = undef,
|
$rhn_registration = undef,
|
||||||
|
$root_password = 'root',
|
||||||
|
$ntp_servers = ['0.debian.pool.ntp.org', '1.debian.pool.ntp.org'],
|
||||||
|
$dns_ips = ['8.8.8.8', '8.8.4.4'],
|
||||||
|
$site_domain = 'mydomain'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if ! ($::osfamily in [ 'RedHat', 'Debian' ]) {
|
if ! ($::osfamily in [ 'RedHat', 'Debian' ]) {
|
||||||
@@ -50,20 +54,18 @@ This node is under the control of Puppet ${::puppetversion}.
|
|||||||
|
|
||||||
# DNS
|
# DNS
|
||||||
class { 'dnsclient':
|
class { 'dnsclient':
|
||||||
nameservers => ['8.8.8.8'],
|
nameservers => $dns_ips,
|
||||||
options => 'UNSET',
|
domain => $site_domain
|
||||||
search => 'example.com',
|
|
||||||
domain => 'example.com',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# NTP
|
# NTP
|
||||||
class { 'ntp': servers => undef }
|
class { 'ntp': servers => $ntp_servers }
|
||||||
|
|
||||||
# Strong root password for all servers
|
# Strong root password for all servers
|
||||||
user { 'root':
|
user { 'root':
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
gid => '0',
|
gid => '0',
|
||||||
password => 'root',
|
password => $root_password,
|
||||||
uid => '0',
|
uid => '0',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user