feat: manage timezone per region

- add timezone module
- set per-region timezone setting
- setup hiera_classes, set to deep merge, and set to include all in base profile
This commit is contained in:
Ben Vincent 2024-04-21 15:15:00 +10:00
parent ccf43f3bcb
commit 9c6dee7609
5 changed files with 14 additions and 0 deletions

View File

@ -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'

View File

@ -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

View File

@ -0,0 +1,2 @@
---
timezone::timezone: 'Australia/Darwin'

View File

@ -0,0 +1,2 @@
---
timezone::timezone: 'Australia/Sydney'

View File

@ -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
}