This gathers more info and also excludes information about the
regular user who's running it.
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
}