diff options
Diffstat (limited to 'share/hydra/mass')
-rwxr-xr-x | share/hydra/mass | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/share/hydra/mass b/share/hydra/mass index 3b1ed2d..b368ec0 100755 --- a/share/hydra/mass +++ b/share/hydra/mass @@ -16,6 +16,11 @@ # License along with this program. If not, see # <http://www.gnu.org/licenses/>. +# Issue commands with ansible +function mass_ansible { + HYDRA=$HYDRA ansible $ROLE -i $DIRNAME/inventory --sudo -a "$COMMAND" +} + # Issue commands with pssh function mass_pssh { hydra_check_command parallel-ssh @@ -53,6 +58,7 @@ source $APP_BASE/lib/hydra/functions || exit 1 hydra_config_load # Command line arguments +DIRNAME="`dirname $0`" BASENAME="`basename $0`" COMMAND="$*" @@ -66,7 +72,8 @@ if [ "$BASENAME" == "mass-update" ]; then elif [ "$BASENAME" == "mass-upgrade" ]; then COMMAND="DEBIAN_FRONTEND=noninteractive hydractl upgrade clean" elif [ "$BASENAME" == "mass-web" ]; then - set_nodes web + ROLE="web" + set_nodes $ROLE fi # Execute commands in hosts |