summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-10-19 13:20:21 -0200
committerSilvio Rhatto <rhatto@riseup.net>2015-10-19 13:20:21 -0200
commit8b9c9827522a28d197c543faca52cdb6ea238d81 (patch)
tree2ca302d1a26dc94be21450c40885765c6d476766 /share
parent7fd68eec9d6925c868094d60eddfc4ca8d762ad2 (diff)
downloadhydra-8b9c9827522a28d197c543faca52cdb6ea238d81.tar.gz
hydra-8b9c9827522a28d197c543faca52cdb6ea238d81.tar.bz2
Misc fixes
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydra/newnode15
1 files changed, 10 insertions, 5 deletions
diff --git a/share/hydra/newnode b/share/hydra/newnode
index 7cb7ae4..16ca402 100755
--- a/share/hydra/newnode
+++ b/share/hydra/newnode
@@ -61,19 +61,24 @@ else
fi
# Copy YAML template
-mkdir -p $HYDRA_FOLDER/puppet/hiera/production/domain/$DOMAIN/node
-cp $YAML $HYDRA_FOLDER/puppet/hiera/production/domain/$DOMAIN/node/$NODE.$DOMAIN.yaml
+mkdir -p $HYDRA_FOLDER/puppet/hiera/node
+cp $YAML $HYDRA_FOLDER/puppet/hiera/node/$NODE.$DOMAIN.yaml
+
+# Setup secret YAML template
+mkdir $HYDRA_FOLDER/puppet/hiera/secrets/node
+echo "---" > $HYDRA_FOLDER/puppet/hiera/secrets/node/$NODE.$DOMAIN.yaml
# Copy node template
mkdir -p $HYDRA_FOLDER/puppet/manifests/nodes
cp $PP $HYDRA_FOLDER/puppet/manifests/nodes/$NODE.$DOMAIN.pp
# Edit the template
-sed -i -e "s/nodename/$NODE/g" $HYDRA_FOLDER/puppet/manifests/nodes/$NODE.pp
-sed -i -e "s/example.org/$DOMAIN/g" $HYDRA_FOLDER/puppet/manifests/nodes/$NODE.pp
+sed -i -e "s/nodename/$NODE/g" $HYDRA_FOLDER/puppet/manifests/nodes/$NODE.$DOMAIN.pp
+sed -i -e "s/example.org/$DOMAIN/g" $HYDRA_FOLDER/puppet/manifests/nodes/$NODE.$DOMAIN.pp
# Add to git
(
cd $HYDRA_FOLDER/puppet
- git add manifests/site.pp manifests/nodes/$NODE.pp hiera/production/domain/$DOMAIN/node/$NODE.$DOMAIN.yaml
+ git add manifests/site.pp manifests/nodes/$NODE.pp hiera/node/$NODE.$DOMAIN.yaml
+ git add manifests/site.pp manifests/nodes/$NODE.pp hiera/secrets/node/$NODE.$DOMAIN.yaml
)