diff options
-rwxr-xr-x | bootstrap | 21 | ||||
-rw-r--r-- | manifest.pp | 5 | ||||
-rw-r--r-- | modules/dovecot/manifests/init.pp | 2 | ||||
-rw-r--r-- | modules/doy/manifests/conf.pp | 2 | ||||
-rw-r--r-- | modules/doy/manifests/packages.pp | 11 | ||||
-rw-r--r-- | modules/nginx/manifests/init.pp | 2 | ||||
-rw-r--r-- | modules/postfix/manifests/init.pp | 2 | ||||
-rw-r--r-- | modules/tozt/manifests/mail.pp | 3 | ||||
-rw-r--r-- | modules/tozt/manifests/site.pp | 3 |
9 files changed, 51 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..e2cdf1c --- /dev/null +++ b/bootstrap @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -eux +set -o pipefail + +host="$1" + +if ssh root@$host test ! -e /usr/bin/pacman; then + ssh root@$host wget https://raw.githubusercontent.com/gh2o/digitalocean-debian-to-arch/debian9/install.sh -O install.sh + echo "wipe this droplet" | ssh root@host bash install.sh + sleep 15 +fi + +ssh root@$host pacman --noconfirm -S puppet git + +if ssh root@$host test -d /root/bootstrap-tozt; then + ssh root@$host sh -c "cd bootstrap-tozt && git pull" +else + ssh root@$host git clone git://github.com/doy/bootstrap-tozt +fi + +ssh root@$host sh -c "cd bootstrap-tozt && puppet apply manifest.pp" diff --git a/manifest.pp b/manifest.pp new file mode 100644 index 0000000..2110cde --- /dev/null +++ b/manifest.pp @@ -0,0 +1,5 @@ +include tozt::mail +include tozt::site + +include doy::packages +include doy::conf diff --git a/modules/dovecot/manifests/init.pp b/modules/dovecot/manifests/init.pp new file mode 100644 index 0000000..7a4d458 --- /dev/null +++ b/modules/dovecot/manifests/init.pp @@ -0,0 +1,2 @@ +class dovecot { +} diff --git a/modules/doy/manifests/conf.pp b/modules/doy/manifests/conf.pp new file mode 100644 index 0000000..981ded5 --- /dev/null +++ b/modules/doy/manifests/conf.pp @@ -0,0 +1,2 @@ +class doy::conf { +} diff --git a/modules/doy/manifests/packages.pp b/modules/doy/manifests/packages.pp new file mode 100644 index 0000000..0a81f16 --- /dev/null +++ b/modules/doy/manifests/packages.pp @@ -0,0 +1,11 @@ +class doy::packages { + package { + [ + "git", + "puppet", + "vim", + "lsof", + ]: + ensure => 'installed'; + } +} diff --git a/modules/nginx/manifests/init.pp b/modules/nginx/manifests/init.pp new file mode 100644 index 0000000..e3e6b70 --- /dev/null +++ b/modules/nginx/manifests/init.pp @@ -0,0 +1,2 @@ +class nginx { +} diff --git a/modules/postfix/manifests/init.pp b/modules/postfix/manifests/init.pp new file mode 100644 index 0000000..d2afd7c --- /dev/null +++ b/modules/postfix/manifests/init.pp @@ -0,0 +1,2 @@ +class postfix { +} diff --git a/modules/tozt/manifests/mail.pp b/modules/tozt/manifests/mail.pp new file mode 100644 index 0000000..981ce28 --- /dev/null +++ b/modules/tozt/manifests/mail.pp @@ -0,0 +1,3 @@ +class tozt::mail { + include dovecot, postfix +} diff --git a/modules/tozt/manifests/site.pp b/modules/tozt/manifests/site.pp new file mode 100644 index 0000000..ef7fcae --- /dev/null +++ b/modules/tozt/manifests/site.pp @@ -0,0 +1,3 @@ +class tozt::site { + include nginx +} |