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