Skip to content

Instantly share code, notes, and snippets.

@tszpinda
Created August 4, 2016 14:09
Show Gist options
  • Save tszpinda/9af669f3c9c58fba43a55cc581bc24a5 to your computer and use it in GitHub Desktop.
Save tszpinda/9af669f3c9c58fba43a55cc581bc24a5 to your computer and use it in GitHub Desktop.
ansible bits
ansible web -i hosts -m lineinfile -a 'dest='~/.bashrc' regexp='^' line="alias l=\"ls -l\"" state=present'
ansible web -i hosts -m shell -a 'ps auwx|egrep tomcat|egrep -v egrep'|egrep FAIL || echo '[PASS]'
version=10233
ansible webapps -i hosts -m shell -a "curl localhost:8080/who.jsp|egrep $version"|egrep FAIL || echo '[PASS]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment