From: Silvio Rhatto Date: Fri, 24 Jun 2016 12:24:01 +0000 (-0300) Subject: Deploy: run facter as root X-Git-Tag: 0.2.4~125 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=8c5dbc6258cfee9685eccc391ed505d9e8d5eca1;p=hydra.git Deploy: run facter as root This gathers more info and also excludes information about the regular user who's running it. --- diff --git a/lib/hydra/deploy b/lib/hydra/deploy index 7a8f2e3..87cc8cf 100644 --- a/lib/hydra/deploy +++ b/lib/hydra/deploy @@ -205,8 +205,8 @@ function hydra_deploy_facts_collect { echo "Collecting facts from remote system..." if [ "$1" == "local" ]; then - facter --yaml > $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml + $SUDO facter --yaml > $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml elif [ "$1" == "remote" ]; then - $HYDRA_CONNECT $FQDN facter --yaml > $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml + $HYDRA_CONNECT $FQDN sudo facter --yaml > $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml fi }