This is unofficial StackStorm pack with some simple but useful real world examples crafted in Actions
and Action Aliases
allowing you to run Ansible ad-hoc commands and Ansible Playbooks as ChatOps commands.
For complete Vagrant demo, see showcase-ansible-chatops repo.
Install st2 ansible integration pack (dependency):
st2 pack install ansible
Install this custom pack:
st2 pack install armab/st2_chatops_aliases
Full list of available commands (with real use case Slack screenshots):
!ansible <command>
- Run ansible command on local machine!status <hosts>
- Show status for hosts (ansible ping module)!show nginx stats on <hosts>
- Show sorted http status codes from nginx on hosts!show mysql processlist <hosts=db>
- Show MySQL processlist!service restart <service_name> on <hosts>
- Restart service on remote hosts!show version <package> on <hosts>
- Show package versions on hosts!update <package> on <hosts>
- Update package on remote hosts!cowsay <message>
- Draws a cow that says what you want
See action aliases
code for explanation.