diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-09-19 10:55:43 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-09-19 10:55:43 -0300 |
commit | a7ca30e854f845f670c852a2edd5ef13656c774f (patch) | |
tree | 17036cff4f766f1cbe4b45ab80c492969bd78d5f /share/hydra | |
parent | 2bd9d5bbf6a41d4d47cd52d9ee9471a906b3849b (diff) | |
download | hydra-a7ca30e854f845f670c852a2edd5ef13656c774f.tar.gz hydra-a7ca30e854f845f670c852a2edd5ef13656c774f.tar.bz2 |
Removes bootless templates, adds node secret template
Diffstat (limited to 'share/hydra')
-rwxr-xr-x | share/hydra/newnode | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/share/hydra/newnode b/share/hydra/newnode index acd989f..b656930 100755 --- a/share/hydra/newnode +++ b/share/hydra/newnode @@ -43,39 +43,27 @@ elif [ -e "$HYDRA_FOLDER/puppet/config/node/$NODE.yaml" ]; then exit 1 fi -# Create node -#if [ -e "$NODES" ]; then -# #echo "import \"nodes/$NODE.pp\"" >> $NODES -#fi - # Set YAML template -if [ -e "$HYDRA_FOLDER/config/templates/node/nodo.example.org.yaml" ]; then - YAML="$HYDRA_FOLDER/config/templates/node/nodo.example.org.yaml" +if [ -e "$HYDRA_FOLDER/config/puppet/nodo.example.org.yaml" ]; then + YAML="$HYDRA_FOLDER/config/puppet/nodo.example.org.yaml" else - YAML="$APP_BASE/share/config/templates/node/nodo.example.org.yaml" + YAML="$APP_BASE/share/config/puppet/nodo.example.org.yaml" fi -# Set node template -#if [ -e "$HYDRA_FOLDER/config/templates/node/nodo.pp" ]; then -# PP="$HYDRA_FOLDER/config/templates/node/nodo.example.org.pp" -#else -# PP="$APP_BASE/share/config/templates/node/nodo.example.org.pp" -#fi - # Copy YAML template mkdir -p $HYDRA_FOLDER/puppet/config/node cp $YAML $HYDRA_FOLDER/puppet/config/node/$NODE.yaml +# Set secret YAML template +if [ -e "$HYDRA_FOLDER/config/puppet/secrets/nodo.example.org.yaml" ]; then + YAML="$HYDRA_FOLDER/config/puppet/secrets/nodo.example.org.yaml" +else + YAML="$APP_BASE/share/config/puppet/secrets/nodo.example.org.yaml" +fi + # Setup secret YAML template mkdir -p $HYDRA_FOLDER/puppet/config/secrets/node -echo "---" > $HYDRA_FOLDER/puppet/config/secrets/node/$NODE.yaml - -# Copy node template -#mkdir -p $HYDRA_FOLDER/puppet/manifests/nodes -#cp $PP $HYDRA_FOLDER/puppet/manifests/nodes/$NODE.pp - -# Edit the template -#sed -i -e "s/nodename.example.org/$NODE/g" $HYDRA_FOLDER/puppet/manifests/nodes/$NODE.pp +cp $YAML $HYDRA_FOLDER/puppet/config/secrets/node/$NODE.yaml # Add to git ( |