From 1057960b6c76cb319e9a6eba547bb76361b8cc7e Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 26 Mar 2023 13:38:51 -0400 Subject: let's try actually using hiera --- manifests/00global.pp | 11 +++-------- manifests/mail.pp | 13 +++---------- manifests/partofme.pp | 12 +----------- manifests/tozt.pp | 14 +++----------- 4 files changed, 10 insertions(+), 40 deletions(-) (limited to 'manifests') 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 -- cgit v1.2.3-54-g00ecf