diff --git a/Puppetfile b/Puppetfile index 6d50a38..5c887fc 100644 --- a/Puppetfile +++ b/Puppetfile @@ -38,6 +38,7 @@ mod 'puppet-keepalived', '3.6.0' # other mod 'ghoneycutt-puppet', '3.3.0' mod 'saz-sudo', '8.0.0' +mod 'ghoneycutt-timezone', '4.0.0' mod 'dalen-puppetdbquery', '3.0.1' mod 'markt-galera', '3.1.0' mod 'kogitoapp-minio', '1.1.4' diff --git a/hieradata/common.yaml b/hieradata/common.yaml index 2f4d7dc..185780a 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -1,5 +1,8 @@ --- lookup_options: + hiera_classes: + merge: + strategy: deep profiles::packages::install: merge: strategy: deep @@ -39,6 +42,9 @@ lookup_options: facts_path: '/opt/puppetlabs/facter/facts.d' +hiera_classes: + - timezone + profiles::ntp::client::ntp_role: 'roles::infra::ntp::server' profiles::ntp::client::peers: - 0.pool.ntp.org diff --git a/hieradata/country/au/region/drw1.yaml b/hieradata/country/au/region/drw1.yaml new file mode 100644 index 0000000..703d863 --- /dev/null +++ b/hieradata/country/au/region/drw1.yaml @@ -0,0 +1,2 @@ +--- +timezone::timezone: 'Australia/Darwin' diff --git a/hieradata/country/au/region/syd1.yaml b/hieradata/country/au/region/syd1.yaml new file mode 100644 index 0000000..2a744b7 --- /dev/null +++ b/hieradata/country/au/region/syd1.yaml @@ -0,0 +1,2 @@ +--- +timezone::timezone: 'Australia/Sydney' diff --git a/site/profiles/manifests/base.pp b/site/profiles/manifests/base.pp index 65bf0cb..fb463d6 100644 --- a/site/profiles/manifests/base.pp +++ b/site/profiles/manifests/base.pp @@ -60,4 +60,7 @@ class profiles::base ( if $::facts['is_virtual'] and $::facts['dmi']['manufacturer'] == 'QEMU' { include profiles::qemu::agent } + + # include classes from hiera + lookup('hiera_classes', Array[String], 'unique').include }