summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap1
-rw-r--r--modules/secret/manifests/init.pp7
-rwxr-xr-xsync-secrets7
3 files changed, 15 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap
index 055efd5..155f4a6 100755
--- a/bootstrap
+++ b/bootstrap
@@ -33,4 +33,5 @@ if remote test ! -e /usr/bin/pacman; then
fi
ensure_conf_exists
+"$(dirname "$0")"/sync-secrets
remote "cd '$conf_location' && puppet apply --modulepath=./modules -e 'include tozt'"
diff --git a/modules/secret/manifests/init.pp b/modules/secret/manifests/init.pp
new file mode 100644
index 0000000..7d78787
--- /dev/null
+++ b/modules/secret/manifests/init.pp
@@ -0,0 +1,7 @@
+define secret($source, $path=$name) {
+ file { "$path":
+ source => "puppet:///modules/secret/$source",
+ mode => '0600',
+ show_diff => false,
+ }
+}
diff --git a/sync-secrets b/sync-secrets
new file mode 100755
index 0000000..4979bf6
--- /dev/null
+++ b/sync-secrets
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+set -eux
+set -o pipefail
+
+host="$1"
+
+rsync -avz /mnt/puppet root@"$host":/usr/local/share/puppet-tozt/modules/secret/files