diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hydra/deploy | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/hydra/deploy b/lib/hydra/deploy index 7e2d40b..001c92f 100644 --- a/lib/hydra/deploy +++ b/lib/hydra/deploy @@ -244,12 +244,7 @@ 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 | \ - grep -v -e '^ *seconds' -e '^ *hours' -e '^ *days' -e '^ *uptime' \ - -e '^ *uptime' -e '^ *system_uptime' -e '^ *memoryfree' -e '^ *swapfree_mb' \ - -e '^ *memorysize' -e '^ *swapfree' -e '^ *seconds' -e '^ *hours' \ - -e '^ *days' -e '^ *uptime_' -e '^ *macaddress' \ - > $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml + $HYDRA_CONNECT $FQDN sudo facter --yaml > $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml # Check result if [ "$?" != "0" ]; then @@ -257,4 +252,11 @@ function hydra_deploy_facts_collect { return 1 fi fi + + # Remove transient info + sed -i -e '/^ *seconds:/d' -e '/^ *hours:/d' -e '/^ *days:/d' -e '/^ *uptime:/d' \ + -e '/^ *uptime:/d' -e '/^ *system_uptime:/d' -e '/^ *memoryfree/d' -e '/^ *swapfree_mb:/d' \ + -e '/^ *memorysize/d' -e '/^ *swapfree:/d' -e '/^ *seconds:/d' -e '/^ *hours:/d' \ + -e '/^ *days:/d' -e '/^ *uptime_/d' -e '/^ *macaddress:/d' \ + $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml } |