aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-06-30 23:35:47 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-06-30 23:35:47 -0300
commit96fa19991d4810590b71db73b5c6e5f2c69d9fbc (patch)
tree6d6cf13e800481b6b4320673a43c544526ac6f57
parent50d116ff974376404526097d6e996f6b1c9755de (diff)
downloadhydra-96fa19991d4810590b71db73b5c6e5f2c69d9fbc.tar.gz
hydra-96fa19991d4810590b71db73b5c6e5f2c69d9fbc.tar.bz2
Facts: filter transient states such as uptime
-rw-r--r--doc/todo.rst2
-rw-r--r--lib/hydra/deploy5
2 files changed, 5 insertions, 2 deletions
diff --git a/doc/todo.rst b/doc/todo.rst
index 489d4f1..4c4e0f5 100644
--- a/doc/todo.rst
+++ b/doc/todo.rst
@@ -5,7 +5,7 @@ TODO
- deploy:
- lockfile.
- check for sudo config at the remote site.
- - facts: filter transient states such as uptime.
- compile:
- per-node compiled file.
- backups: automatic definitions for per-node backup::users.
+- plugins support using lookup paths.
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