summaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2023-03-26 13:38:51 -0400
committerJesse Luehrs <doy@tozt.net>2023-03-26 13:38:51 -0400
commit1057960b6c76cb319e9a6eba547bb76361b8cc7e (patch)
treee08c6980f18e41f746d97c11c54cc4daa0ad17da /manifests
parente12c25531059a087890e8a28db38c6d8fe12a355 (diff)
downloadpuppet-tozt-1057960b6c76cb319e9a6eba547bb76361b8cc7e.tar.gz
puppet-tozt-1057960b6c76cb319e9a6eba547bb76361b8cc7e.zip
let's try actually using hiera
Diffstat (limited to 'manifests')
-rw-r--r--manifests/00global.pp11
-rw-r--r--manifests/mail.pp13
-rw-r--r--manifests/partofme.pp12
-rw-r--r--manifests/tozt.pp14
4 files changed, 10 insertions, 40 deletions
diff --git a/manifests/00global.pp b/manifests/00global.pp
index 078bdef..8a5342c 100644
--- a/manifests/00global.pp
+++ b/manifests/00global.pp
@@ -1,11 +1,6 @@
-$default_user = 'doy'
-$vpn_ips = {
- 'hornet' => '10.49.0.2',
- 'mail' => '10.49.0.3',
- 'partofme' => '10.49.0.4',
- 'phone' => '10.49.0.5',
- 'tozt' => '10.49.0.6',
-}
+$default_user = lookup('default_user')
+$vpn_ips = lookup('vpn_ips')
+$persistent_data = lookup('persistent_data')
Package::Makepkg {
build_user => $default_user,
diff --git a/manifests/mail.pp b/manifests/mail.pp
index 15063cf..24bcc1b 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -1,16 +1,9 @@
node 'mail', 'mail.localdomain' {
- $persistent_data = '/media/persistent'
- include mail::persistent
- Class['mail::persistent'] -> Class['base']
-
- class { 'base':
- extra_script => "
- (cd /media/persistent && sudo docker-compose pull -q)
- ";
- }
-
+ include base
include mail::operatingsystem
+ include mail::persistent
Class['mail::operatingsystem'] -> Package<| provider == "pacman" |>
+ Class['mail::persistent'] -> Class['base']
include mail::backups
include mail::mailu
diff --git a/manifests/partofme.pp b/manifests/partofme.pp
index e53d4ef..eff007c 100644
--- a/manifests/partofme.pp
+++ b/manifests/partofme.pp
@@ -1,15 +1,5 @@
node 'partofme', 'partofme.localdomain' {
- # we don't want to store anything system-related on the persistent disk,
- # since we want it to be encrypted, and we can't really access it at boot
- # time to type in a password
- $persistent_data = undef
-
- class { 'base':
- extra_script => "
- (sudo podman pull docker.io/pihole/pihole)
- ";
- }
-
+ include base
include partofme::operatingsystem
Class['partofme::operatingsystem'] -> Package<| provider == "pacman" |>
diff --git a/manifests/tozt.pp b/manifests/tozt.pp
index 2aa1bc6..4c64046 100644
--- a/manifests/tozt.pp
+++ b/manifests/tozt.pp
@@ -1,17 +1,9 @@
node 'tozt', 'tozt.localdomain' {
- $persistent_data = '/media/persistent'
- include tozt::persistent
- Class['tozt::persistent'] -> Class['base']
-
- class { 'base':
- extra_script => "
- (cd /home/doy/coding/metabase-utils && git pull)
- (sudo podman pull docker.io/vaultwarden/server)
- ";
- }
-
+ include base
include tozt::operatingsystem
+ include tozt::persistent
Class['tozt::operatingsystem'] -> Package<| provider == "pacman" |>
+ Class['tozt::persistent'] -> Class['base']
include tozt::backups
include tozt::bitwarden