diff options
Diffstat (limited to 'share/hydractl/deploy')
-rwxr-xr-x | share/hydractl/deploy | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/share/hydractl/deploy b/share/hydractl/deploy index b488698..191b060 100755 --- a/share/hydractl/deploy +++ b/share/hydractl/deploy @@ -23,12 +23,6 @@ hydra_config_load # Parameters FOLDER="$1" -# Set sudo config -local sudo device rsync -if [ "`whoami`" != 'root' ]; then - sudo="sudo" -fi - # Dispatch if [ ! -z "$FOLDER" ]; then echo "Deploying to $FOLDER..." @@ -43,15 +37,22 @@ if [ ! -z "$FOLDER" ]; then # Copy hiera configuration hydra_hiera_copy - # Run puppet - $DEPLOY_APPLY + # Check if puppet is installed + if [ ! -e "$FOLDER/usr/bin/puppet" ]; then + $DEPLOY_COMMAND apt-get install puppet -y + fi + + # Run puppet, overriding FQDN + FACTER_domain=$DOMAIN FACTER_hostname=$HOSTNAME FACTER_fqdn=$HOSTNAME.$DOMAIN $DEPLOY_APPLY elif [ -e "$HYDRA_FOLDER/puppet/manifests/nodes/$FQDN.pp" ]; then echo "Deploying to localhost..." # Setup deploy environment hydra_deploy_setup - # TODO: override FQDN and DOMAIN + # Check if puppet is installed + hydra_install_package puppet + # Run puppet $DEPLOY_APPLY fi |