From 586ddc477b08fbc04f70f22a3ee2263a9df9dc45 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 23 May 2018 16:58:53 -0300 Subject: Use ansible at mass action --- share/hydra/mass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/hydra/mass b/share/hydra/mass index 871468c..b66956b 100755 --- a/share/hydra/mass +++ b/share/hydra/mass @@ -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 -- cgit v1.2.3