]> gitweb.fluxo.info Git - hydra.git/commitdiff
Deploy: run facter as root
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 24 Jun 2016 12:24:01 +0000 (09:24 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 24 Jun 2016 12:24:01 +0000 (09:24 -0300)
This gathers more info and also excludes information about the
regular user who's running it.

lib/hydra/deploy

index 7a8f2e332afe500a6439c9c2260944a828aaf27d..87cc8cf826a63f32c755842114c0ba78556adb88 100644 (file)
@@ -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
 }