diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-09-20 19:18:00 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-09-20 19:18:00 -0300 |
commit | 4dcf76261952adb273578c9fe798ffa9d33101b2 (patch) | |
tree | f2a4eba30face33d4e99f4d43487765df3411019 /share/hydra/mass | |
parent | 91581c1ed778b5dccd472201cc14be2eaca6b1a4 (diff) | |
download | hydra-4dcf76261952adb273578c9fe798ffa9d33101b2.tar.gz hydra-4dcf76261952adb273578c9fe798ffa9d33101b2.tar.bz2 |
Initial changes for ansible integration
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 |