aboutsummaryrefslogtreecommitdiff
path: root/share/hydra/newnode
diff options
context:
space:
mode:
Diffstat (limited to 'share/hydra/newnode')
-rwxr-xr-xshare/hydra/newnode8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/hydra/newnode b/share/hydra/newnode
index e5ab9a9..95829a1 100755
--- a/share/hydra/newnode
+++ b/share/hydra/newnode
@@ -44,7 +44,7 @@ fi
DOMAIN="`cat $HYDRA_FOLDER/config/domain`"
# Create node
-echo "import \"nodes/$NODE.pp\"" >> $NODES
+echo "import \"nodes/$NODE.$DOMAIN.pp\"" >> $NODES
# Set YAML template
if [ -e "$HYDRA_FOLDER/config/templates/node/nodo.example.org.yaml" ]; then
@@ -55,9 +55,9 @@ fi
# Set node template
if [ -e "$HYDRA_FOLDER/config/templates/node/nodo.pp" ]; then
- PP="$HYDRA_FOLDER/config/templates/node/nodo.pp"
+ PP="$HYDRA_FOLDER/config/templates/node/nodo.example.org.pp"
else
- PP="$APP_BASE/share/config/templates/node/nodo.pp"
+ PP="$APP_BASE/share/config/templates/node/nodo.example.org.pp"
fi
# Copy YAML template
@@ -66,7 +66,7 @@ cp $YAML $HYDRA_FOLDER/puppet/hiera/production/domain/$DOMAIN/node/$NODE.$DOMAIN
# Copy node template
mkdir -p $HYDRA_FOLDER/puppet/manifests/nodes
-cp $PP $HYDRA_FOLDER/puppet/manifests/nodes/$NODE.pp
+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