From 6542f3827dc1d675a2b129622b6b089a693ac0ca Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 25 Sep 2015 20:30:27 -0300 Subject: Deploy: secrets folder --- share/hydra/deploy | 7 +++++-- share/hydractl/deploy | 11 +++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/share/hydra/deploy b/share/hydra/deploy index 6b91480..940c17b 100755 --- a/share/hydra/deploy +++ b/share/hydra/deploy @@ -39,7 +39,7 @@ for node in $NODES; do # Sync repository to server # Exclude eventual keys and version control files - rsync -CrltDv --no-perms --exclude=keys --exclude=hiera --delete --rsync-path "sudo rsync" $HYDRA_FOLDER/puppet/ $node:/etc/puppet/ + rsync -CrltDv --no-perms --exclude=keys --exclude=hiera/secrets --delete --rsync-path "sudo rsync" $HYDRA_FOLDER/puppet/ $node:/etc/puppet/ # Setup custom facts FQDN="`$HYDRA_CONNECT $node facter fqdn`" @@ -54,7 +54,10 @@ for node in $NODES; do fi # Copy needed hiera YAMLs - # TODO + $HYDRA_CONNECT $node sudo mkdir -p $FOLDER/etc/puppet/secrets/{domain,location,node,role} + $HYDRA_CONNECT $node sudo cp $HYDRA_FOLDER/puppet/hiera/secrets/domain/$DOMAIN.yaml $FOLDER/etc/puppet/hiera/domain/ + $HYDRA_CONNECT $node sudo cp $HYDRA_FOLDER/puppet/hiera/secrets/location/$LOCATION.yaml $FOLDER/etc/puppet/hiera/location/ + $HYDRA_CONNECT $node sudo cp $HYDRA_FOLDER/puppet/hiera/secrets/location/$ROLE.yaml $FOLDER/etc/puppet/hiera/role/ # Run puppet $HYDRA_CONNECT $node <