diff options
-rwxr-xr-x | bin/helpers/launch-tozt | 2 | ||||
-rw-r--r-- | modules/host/manifests/tozt.pp | 18 | ||||
-rw-r--r-- | modules/host/manifests/tozt/backups.pp (renamed from modules/tozt/manifests/backups.pp) | 2 | ||||
-rw-r--r-- | modules/host/manifests/tozt/bootstrap.pp (renamed from modules/tozt/manifests/bootstrap.pp) | 2 | ||||
-rw-r--r-- | modules/host/manifests/tozt/certbot.pp | 8 | ||||
-rw-r--r-- | modules/host/manifests/tozt/git.pp (renamed from modules/tozt/manifests/git.pp) | 8 | ||||
-rw-r--r-- | modules/host/manifests/tozt/pass.pp (renamed from modules/tozt/manifests/pass.pp) | 6 | ||||
-rw-r--r-- | modules/host/manifests/tozt/paste.pp (renamed from modules/tozt/manifests/paste.pp) | 8 | ||||
-rw-r--r-- | modules/host/manifests/tozt/persistent.pp (renamed from modules/tozt/manifests/persistent.pp) | 2 | ||||
-rw-r--r-- | modules/host/manifests/tozt/services.pp (renamed from modules/tozt/manifests/services.pp) | 2 | ||||
-rw-r--r-- | modules/host/manifests/tozt/site.pp (renamed from modules/tozt/manifests/site.pp) | 8 | ||||
-rw-r--r-- | modules/host/manifests/tozt/tools.pp (renamed from modules/tozt/manifests/tools.pp) | 2 | ||||
-rw-r--r-- | modules/host/manifests/tozt/user.pp (renamed from modules/tozt/manifests/user.pp) | 8 | ||||
-rw-r--r-- | modules/host/manifests/tozt/users.pp (renamed from modules/tozt/manifests/users.pp) | 6 | ||||
-rw-r--r-- | modules/host/manifests/tozt/vpn.pp | 3 | ||||
-rw-r--r-- | modules/tozt/files/puppet-tozt | 2 | ||||
-rw-r--r-- | modules/tozt/manifests/certbot.pp | 8 | ||||
-rw-r--r-- | modules/tozt/manifests/init.pp | 18 | ||||
-rw-r--r-- | modules/tozt/manifests/vpn.pp | 3 |
19 files changed, 58 insertions, 58 deletions
diff --git a/bin/helpers/launch-tozt b/bin/helpers/launch-tozt index acd7ed9..e562e80 100755 --- a/bin/helpers/launch-tozt +++ b/bin/helpers/launch-tozt @@ -66,6 +66,6 @@ fi ensure_conf_exists scp -r /mnt/puppet/ root@"$host":/usr/local/share/puppet-tozt/modules/secret/files -remote "cd '$conf_location' && puppet apply --modulepath=./modules -e 'include tozt'" +remote "cd '$conf_location' && puppet apply --modulepath=./modules -e 'include host::tozt'" echo "Done" diff --git a/modules/host/manifests/tozt.pp b/modules/host/manifests/tozt.pp new file mode 100644 index 0000000..c3b31e5 --- /dev/null +++ b/modules/host/manifests/tozt.pp @@ -0,0 +1,18 @@ +class host::tozt { + include host::tozt::users + + Package::Makepkg { + build_user => 'doy', + } + + Host::Tozt::User['doy'] -> Package::Makepkg<| build_user == 'doy' |> + + include host::tozt::bootstrap + include host::tozt::backups + include host::tozt::git + include host::tozt::pass + include host::tozt::site + include host::tozt::services + include host::tozt::tools + include host::tozt::vpn +} diff --git a/modules/tozt/manifests/backups.pp b/modules/host/manifests/tozt/backups.pp index 2036777..6896b15 100644 --- a/modules/tozt/manifests/backups.pp +++ b/modules/host/manifests/tozt/backups.pp @@ -1,4 +1,4 @@ -class tozt::backups { +class host::tozt::backups { include duplicati include tarsnap } diff --git a/modules/tozt/manifests/bootstrap.pp b/modules/host/manifests/tozt/bootstrap.pp index 7d18444..0a9d192 100644 --- a/modules/tozt/manifests/bootstrap.pp +++ b/modules/host/manifests/tozt/bootstrap.pp @@ -1,4 +1,4 @@ -class tozt::bootstrap { +class host::tozt::bootstrap { package { [ "puppet", diff --git a/modules/host/manifests/tozt/certbot.pp b/modules/host/manifests/tozt/certbot.pp new file mode 100644 index 0000000..7c4233d --- /dev/null +++ b/modules/host/manifests/tozt/certbot.pp @@ -0,0 +1,8 @@ +class host::tozt::certbot { + include host::tozt::persistent + + class { "certbot": + config_dir => "/media/persistent/certbot", + require => Class["host::tozt::persistent"], + } +} diff --git a/modules/tozt/manifests/git.pp b/modules/host/manifests/tozt/git.pp index 03204dc..803532a 100644 --- a/modules/tozt/manifests/git.pp +++ b/modules/host/manifests/tozt/git.pp @@ -1,7 +1,7 @@ -class tozt::git { +class host::tozt::git { include git::server - include tozt::certbot - include tozt::persistent + include host::tozt::certbot + include host::tozt::persistent package { "perl-io-socket-ssl": ensure => installed, @@ -13,7 +13,7 @@ class tozt::git { owner => 'doy', group => 'doy', require => [ - Class['tozt::persistent'], + Class['host::tozt::persistent'], User['doy'], Group['doy'], ]; diff --git a/modules/tozt/manifests/pass.pp b/modules/host/manifests/tozt/pass.pp index b1241c1..8010745 100644 --- a/modules/tozt/manifests/pass.pp +++ b/modules/host/manifests/tozt/pass.pp @@ -1,5 +1,5 @@ -class tozt::pass { - include tozt::persistent +class host::tozt::pass { + include host::tozt::persistent file { "/media/persistent/pass": @@ -7,7 +7,7 @@ class tozt::pass { owner => 'doy', group => 'doy', require => [ - Class['tozt::persistent'], + Class['host::tozt::persistent'], User['doy'], Group['doy'], ]; diff --git a/modules/tozt/manifests/paste.pp b/modules/host/manifests/tozt/paste.pp index 93d7939..ebc3fb3 100644 --- a/modules/tozt/manifests/paste.pp +++ b/modules/host/manifests/tozt/paste.pp @@ -1,6 +1,6 @@ -class tozt::paste { - include tozt::certbot - include tozt::persistent +class host::tozt::paste { + include host::tozt::certbot + include host::tozt::persistent file { "/media/persistent/paste/doy": @@ -8,7 +8,7 @@ class tozt::paste { owner => 'doy', group => 'doy', require => [ - Class['tozt::persistent'], + Class['host::tozt::persistent'], User['doy'], Group['doy'], ]; diff --git a/modules/tozt/manifests/persistent.pp b/modules/host/manifests/tozt/persistent.pp index 0726455..2c0545b 100644 --- a/modules/tozt/manifests/persistent.pp +++ b/modules/host/manifests/tozt/persistent.pp @@ -1,4 +1,4 @@ -class tozt::persistent { +class host::tozt::persistent { file { "/media": ensure => directory; diff --git a/modules/tozt/manifests/services.pp b/modules/host/manifests/tozt/services.pp index 8dfbe5b..cc2794e 100644 --- a/modules/tozt/manifests/services.pp +++ b/modules/host/manifests/tozt/services.pp @@ -1,4 +1,4 @@ -class tozt::services { +class host::tozt::services { include locate include ntp } diff --git a/modules/tozt/manifests/site.pp b/modules/host/manifests/tozt/site.pp index f28619a..49fecee 100644 --- a/modules/tozt/manifests/site.pp +++ b/modules/host/manifests/tozt/site.pp @@ -1,7 +1,7 @@ -class tozt::site { +class host::tozt::site { include git - include tozt::certbot - include tozt::persistent + include host::tozt::certbot + include host::tozt::persistent package { "hugo": ensure => installed, @@ -43,7 +43,7 @@ class tozt::site { owner => 'doy', group => 'doy', require => [ - Class['tozt::persistent'], + Class['host::tozt::persistent'], User['doy'], Group['doy'], ]; diff --git a/modules/tozt/manifests/tools.pp b/modules/host/manifests/tozt/tools.pp index 5531460..db8e2ff 100644 --- a/modules/tozt/manifests/tools.pp +++ b/modules/host/manifests/tozt/tools.pp @@ -1,4 +1,4 @@ -class tozt::tools { +class host::tozt::tools { include mail::sender include yaourt diff --git a/modules/tozt/manifests/user.pp b/modules/host/manifests/tozt/user.pp index 99c52ed..6ec3deb 100644 --- a/modules/tozt/manifests/user.pp +++ b/modules/host/manifests/tozt/user.pp @@ -1,4 +1,4 @@ -define tozt::user( +define host::tozt::user( $pwhash, $user=$name, $group=$user, @@ -15,7 +15,7 @@ define tozt::user( default => $home, } - include tozt::persistent + include host::tozt::persistent group { $group: ensure => present; @@ -59,7 +59,7 @@ define tozt::user( require => [ User[$user], Group[$group], - Class["tozt::persistent"], + Class["host::tozt::persistent"], ]; "/media/persistent/rustup/${user}": ensure => 'directory', @@ -69,7 +69,7 @@ define tozt::user( require => [ User[$user], Group[$group], - Class["tozt::persistent"], + Class["host::tozt::persistent"], ]; "${_home}/.cargo": ensure => link, diff --git a/modules/tozt/manifests/users.pp b/modules/host/manifests/tozt/users.pp index b07373b..77d4eb7 100644 --- a/modules/tozt/manifests/users.pp +++ b/modules/host/manifests/tozt/users.pp @@ -1,9 +1,9 @@ -class tozt::users { - tozt::user { 'root': +class host::tozt::users { + host::tozt::user { 'root': pwhash => '$6$cqlzoze/Mq3$bHGFqjPF6wBRLcI0VWuQa9cg8c1DfGWL21QdA9KUuDqhtnCfjyaKryu.ACxP9umzuYsWpikegZN6wbTU2JX6V1'; } - tozt::user { 'doy': + host::tozt::user { 'doy': pwhash => '$6$Q6Y/nmt/QZbU$6D692oUPiFvnQEwoPtL7l83l/KaY/czy9/KI9.GnEEOslQumU39qteDDp.0i9E7nSDodWGOmPgfAsoYJBYrta1', extra_groups => ['wheel'], homedir_mode => '0701'; diff --git a/modules/host/manifests/tozt/vpn.pp b/modules/host/manifests/tozt/vpn.pp new file mode 100644 index 0000000..9e446e7 --- /dev/null +++ b/modules/host/manifests/tozt/vpn.pp @@ -0,0 +1,3 @@ +class host::tozt::vpn { + include wireguard +} diff --git a/modules/tozt/files/puppet-tozt b/modules/tozt/files/puppet-tozt index 4ea27ef..afa52ea 100644 --- a/modules/tozt/files/puppet-tozt +++ b/modules/tozt/files/puppet-tozt @@ -3,4 +3,4 @@ set -eu set -o pipefail (cd /usr/local/share/puppet-tozt && sudo git pull) -sudo puppet apply --show_diff --modulepath=/usr/local/share/puppet-tozt/modules -e 'include tozt' +sudo puppet apply --show_diff --modulepath=/usr/local/share/puppet-tozt/modules -e 'include host::tozt' diff --git a/modules/tozt/manifests/certbot.pp b/modules/tozt/manifests/certbot.pp deleted file mode 100644 index cad7d1a..0000000 --- a/modules/tozt/manifests/certbot.pp +++ /dev/null @@ -1,8 +0,0 @@ -class tozt::certbot { - include tozt::persistent - - class { "certbot": - config_dir => "/media/persistent/certbot", - require => Class["tozt::persistent"], - } -} diff --git a/modules/tozt/manifests/init.pp b/modules/tozt/manifests/init.pp deleted file mode 100644 index b13c4cd..0000000 --- a/modules/tozt/manifests/init.pp +++ /dev/null @@ -1,18 +0,0 @@ -class tozt { - include tozt::users - - Package::Makepkg { - build_user => 'doy', - } - - Tozt::User['doy'] -> Package::Makepkg<| build_user == 'doy' |> - - include tozt::bootstrap - include tozt::backups - include tozt::git - include tozt::pass - include tozt::site - include tozt::services - include tozt::tools - include tozt::vpn -} diff --git a/modules/tozt/manifests/vpn.pp b/modules/tozt/manifests/vpn.pp deleted file mode 100644 index aa84f53..0000000 --- a/modules/tozt/manifests/vpn.pp +++ /dev/null @@ -1,3 +0,0 @@ -class tozt::vpn { - include wireguard -} |