diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-05-23 16:58:53 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-05-23 16:58:53 -0300 |
commit | 586ddc477b08fbc04f70f22a3ee2263a9df9dc45 (patch) | |
tree | e1a9ec27e71775d9411dcd19dc042459db8e4abb | |
parent | e925984f4e858d5e17b60615e992314cdaf50ba4 (diff) | |
download | hydra-586ddc477b08fbc04f70f22a3ee2263a9df9dc45.tar.gz hydra-586ddc477b08fbc04f70f22a3ee2263a9df9dc45.tar.bz2 |
Use ansible at mass action
-rwxr-xr-x | share/hydra/mass | 8 |
1 files changed, 7 insertions, 1 deletions
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 |