]> gitweb.fluxo.info Git - hydra.git/commitdiff
Use ansible at mass action
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 23 May 2018 19:58:53 +0000 (16:58 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 23 May 2018 19:58:53 +0000 (16:58 -0300)
share/hydra/mass

index 871468c66d3ecd5b86b69b6c7383e08f30ae7656..b66956b4746d6c74a6f7d80bf1d5ea2f6b979f54 100755 (executable)
@@ -42,6 +42,12 @@ function mass_mussh {
   mussh -H $TMPWORK -c "sudo $COMMAND"
 }
 
+# Issue commands with ansible
+function mass_ansible {
+  hydra_install_package ansible
+  ansible -i $TMPWORK all -f 1 --sudo -a "$COMMAND"
+}
+
 # Set nodes
 function mass_set_nodes {
   hydra_set_tmpfile nodes
@@ -91,5 +97,5 @@ fi
 # Execute commands in hosts
 echo "Issuing $COMMAND on multiple nodes..."
 mass_exec_localhost
-mass_pssh
+mass_ansible
 hydra_unset_tmpfile $TMPWORK