summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-06-15 02:29:30 -0400
committerJesse Luehrs <doy@tozt.net>2020-06-15 02:41:26 -0400
commit26e5c8cc4f17d65160dcde4d1665031286a32337 (patch)
treeb491ef55c6b384a48347d8c255808d7b49b6f30d
parentea4fc116c199b378fcf626b6ce636d1b6c6b4807 (diff)
downloadpuppet-tozt-26e5c8cc4f17d65160dcde4d1665031286a32337.tar.gz
puppet-tozt-26e5c8cc4f17d65160dcde4d1665031286a32337.zip
start using hiera
-rw-r--r--hiera/data/common.yaml2
-rw-r--r--hiera/data/node/mail.yaml2
-rw-r--r--hiera/data/node/partofme.yaml2
-rw-r--r--hiera/data/node/tozt.yaml2
-rw-r--r--hiera/hiera.yaml7
-rw-r--r--modules/base/files/puppet-tozt2
6 files changed, 16 insertions, 1 deletions
diff --git a/hiera/data/common.yaml b/hiera/data/common.yaml
new file mode 100644
index 0000000..d9e1a25
--- /dev/null
+++ b/hiera/data/common.yaml
@@ -0,0 +1,2 @@
+---
+{}
diff --git a/hiera/data/node/mail.yaml b/hiera/data/node/mail.yaml
new file mode 100644
index 0000000..d9e1a25
--- /dev/null
+++ b/hiera/data/node/mail.yaml
@@ -0,0 +1,2 @@
+---
+{}
diff --git a/hiera/data/node/partofme.yaml b/hiera/data/node/partofme.yaml
new file mode 100644
index 0000000..d9e1a25
--- /dev/null
+++ b/hiera/data/node/partofme.yaml
@@ -0,0 +1,2 @@
+---
+{}
diff --git a/hiera/data/node/tozt.yaml b/hiera/data/node/tozt.yaml
new file mode 100644
index 0000000..d9e1a25
--- /dev/null
+++ b/hiera/data/node/tozt.yaml
@@ -0,0 +1,2 @@
+---
+{}
diff --git a/hiera/hiera.yaml b/hiera/hiera.yaml
new file mode 100644
index 0000000..7434a25
--- /dev/null
+++ b/hiera/hiera.yaml
@@ -0,0 +1,7 @@
+---
+version: 5
+hierarchy:
+ - name: Node
+ path: node/%{facts.networking.hostname}.yaml
+ - name: Common
+ path: common.yaml
diff --git a/modules/base/files/puppet-tozt b/modules/base/files/puppet-tozt
index 9ad7f1b..be4d2ed 100644
--- a/modules/base/files/puppet-tozt
+++ b/modules/base/files/puppet-tozt
@@ -4,4 +4,4 @@ set -o pipefail
branch=${1:-master}
(cd /usr/local/share/puppet-tozt && sudo git pull && sudo git checkout "$branch" && sudo git reset --hard "origin/$branch")
-sudo puppet apply --show_diff --modulepath=/usr/local/share/puppet-tozt/modules /usr/local/share/puppet-tozt/manifests
+sudo puppet apply --show_diff --modulepath=/usr/local/share/puppet-tozt/modules --hiera_config=/usr/local/share/puppet-tozt/hiera/hiera.yaml /usr/local/share/puppet-tozt/manifests