From: Silvio Rhatto Date: Wed, 23 May 2018 19:58:53 +0000 (-0300) Subject: Use ansible at mass action X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=586ddc477b08fbc04f70f22a3ee2263a9df9dc45;p=hydra.git Use ansible at mass action --- 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