aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/hydra/deploy14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/hydra/deploy b/lib/hydra/deploy
index 748263c..7a8f2e3 100644
--- a/lib/hydra/deploy
+++ b/lib/hydra/deploy
@@ -15,6 +15,9 @@ function hydra_deploy_setup {
# Fix puppet folder permissions
chmod 700 $HYDRA_FOLDER/puppet
+ # Ensure facts folder
+ mkdir -p $HYDRA_FOLDER/puppet/config/facts
+
if [ "$1" == "remote" ]; then
# Deploy in a remote host
if [ ! -z "$2" ]; then
@@ -196,3 +199,14 @@ function hydra_deploy_copy {
$DEPLOY_RSYNC "$RSYNC_PATH" $orig $dest
fi
}
+
+# Collects facts from a system
+function hydra_deploy_facts_collect {
+ echo "Collecting facts from remote system..."
+
+ if [ "$1" == "local" ]; then
+ 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
+ fi
+}