diff options
-rwxr-xr-x | share/hydra/deploy | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy index 5904f5d..0c01623 100755 --- a/share/hydra/deploy +++ b/share/hydra/deploy @@ -32,13 +32,20 @@ fi for node in $NODES; do echo "Deploying to $node..." + # Saner defaults + $HYDRA_CONNECT $node sudo mkdir -p /etc/puppet + $HYDRA_CONNECT $node sudo chown -R root. /etc/puppet + $HYDRA_CONNECT $node sudo chmod -R 640 /etc/puppet + # Sync repository to server - rsync -rlptD --delete --remote-rsync "sudo rsync" $HYDRA_FOLDER/puppet/ $node:/etc/puppet/ + # Exclude eventual keys and version control files + rsync -CrltDv --no-perms --exclude=keys --delete --remote-rsync "sudo rsync" $HYDRA_FOLDER/puppet/ $node:/etc/puppet/ # Run puppet $HYDRA_CONNECT $node <<EOF ##### BEGIN REMOTE SCRIPT ##### sudo chown -R root. /etc/puppet + sudo chmod -R 640 /etc/puppet sudo puppet apply /etc/puppet/manifests/nodes/\$(facter fqdn).pp ##### END REMOTE SCRIPT ####### EOF |