From 96fa19991d4810590b71db73b5c6e5f2c69d9fbc Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 30 Jun 2016 23:35:47 -0300 Subject: Facts: filter transient states such as uptime --- lib/hydra/deploy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/hydra/deploy b/lib/hydra/deploy index 4c67cf8..3ef1dc0 100644 --- a/lib/hydra/deploy +++ b/lib/hydra/deploy @@ -244,7 +244,10 @@ function hydra_deploy_facts_collect { if [ "$1" == "local" ]; then $SUDO facter --yaml > $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml elif [ "$1" == "remote" ]; then - $HYDRA_CONNECT $FQDN sudo facter --yaml > $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml + $HYDRA_CONNECT $FQDN sudo facter --yaml | \ + grep -v -e "^ seconds" -e "^ hours" -e "^ days" -e "^ uptime" \ + -e "^ uptime" -e "^ system_uptime" -e "^ memoryfree" -e "^ swapfree_mb" \ + > $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml # Check result if [ "$?" != "0" ]; then -- cgit v1.2.3