adding in the ntp server hiera data

This commit is contained in:
christopher.lawrence 2020-02-05 15:42:05 +00:00
parent 097d1e6884
commit c2faa35b17
3 changed files with 23 additions and 11 deletions

View File

@ -1,9 +1,13 @@
---
message: "This node is using common data"
profile::base::resolv: true
profile::base::resolv::nameservers:
- '8.8.8.8'
- '127.0.0.1'
profile::base::resolv::domainname: home
profile::base::selinux::mode: permissive
profile::base::time: true
profile::base::time::ntp_servers:
- 0.uk.pool.ntp.org
- 1.uk.pool.ntp.org
- 2.uk.pool.ntp.org

View File

@ -1,8 +1,6 @@
class profile::base (
Boolean $firewall = false,
Boolean $lvm = false,
Boolean $ntp = false,
Boolean $puppet = false,
Boolean $time = false,
Boolean $repos = false,
Boolean $resolv = false,
Boolean $ssh = true,
@ -15,15 +13,9 @@ class profile::base (
if $firewall {
class { '::profile::base::firewall': }
}
if $lvm {
class { '::profile::base::lvm': }
}
if $ntp {
if $time {
class { '::profile::base::time': }
}
if $puppet {
class { '::profile::base::puppet': }
}
if $repos {
class { '::profile::base::repositories': }
}

View File

@ -0,0 +1,16 @@
class profile::base::time (
String $default_timezone = 'Europe/London',
Array $ntp_servers = [],
Array $restrict = [],
Boolean $set_timezone = false,
) {
class { '::ntp':
servers => $ntp_servers,
restrict => $restrict,
}
if $set_timezone {
class { '::timezone':
default_timezone => $default_timezone,
}
}
}