Skip to content

Instantly share code, notes, and snippets.

@jhrcz
Last active September 22, 2020 08:08
Show Gist options
  • Save jhrcz/8beea1a6a8abda31441f to your computer and use it in GitHub Desktop.
Save jhrcz/8beea1a6a8abda31441f to your computer and use it in GitHub Desktop.
combining tmux, tmux-cssh and ansible - cluster ssh alternative with ansible inventory, uses https://github.com/dennishafemann/tmux-cssh
#!/bin/bash
login=root
grp="$1"
shift
tmux-cssh -u $login -sc `ansible ${grp:-all} -i ${CSSH_ANSIBLE_INVENTORY:-hosts.ini} --list-hosts` "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment