The documentation you're currently reading is for version 2.2.1. Click here to view documentation for the latest stable version.

Ansible Playbooks

Ansible playbooks and roles to install StackStorm.

Allows you to deploy and further configure StackStorm installation on local or remote machines with Ansible configuration management tool.

The advantage of using this method, comparing to our demonstrational curl | bash installer are repeatable, configurable and idempotent production-friendly StackStorm installations.

Playbooks source code is available as GitHub repository StackStorm/ansible-st2.

Supported platforms

  • Ubuntu Trusty (14.04)
  • Ubuntu Xenial (16.04)
  • RHEL6 / CentOS6
  • RHEL7 / CentOS7


At least 2GB of memory and 3.5GB of disk space is required, since StackStorm is shipped with RabbitMQ, PostgreSQL, Mongo, nginx and OpenStack Mistral.

Quick Start

Here are basic instructions to get started with a single node deployment and default configuration settings:

git clone
cd ansible-st2

ansible-playbook stackstorm.yml


Behind the scenes stackstorm.yml play composed of the following Ansible roles for a complete installation:

  • epel - Repository with extra packages for RHEL/CentOS.
  • mongodb - Main DB storage engine for StackStorm.
  • rabbitmq - Message broker for StackStorm.
  • postgresql - Main DB storage engine for StackStorm Mistral.
  • st2repos - Adds StackStorm PackageCloud repositories.
  • st2 - Install and configure StackStorm itself.
  • st2mistral - Install and configure StackStorm Mistral workflow engine.
  • nginx - Dependency for st2web.
  • st2web - Nice & shiny WebUI for StackStorm.
  • st2smoketests - Simple checks to know if StackStorm really works.

Example Play

Below is more advanced example to customize StackStorm deployment:

- name: Install StackStorm with all services on a single node
  hosts: all
    - mongodb
    - rabbitmq
    - postgresql
    - nginx

    - name: Install StackStorm Packagecloud repository
      role: st2repos
        st2_pkg_repo: stable

    - name: Install and configure st2
      role: st2
        st2_version: latest
        st2_auth_enable: yes
        st2_auth_username: demo
        st2_auth_password: demo
        st2_save_credentials: yes
        st2_system_user: stanley
        st2_system_user_in_sudoers: yes

    - name: Install and configure st2mistral
      role: st2mistral
        st2mistral_version: latest
        st2mistral_db: mistral
        st2mistral_db_username: mistral
        st2mistral_db_password: StackStorm

    - name: Install st2web
      role: st2web

    - name: Verify StackStorm Installation
      role: st2smoketests

Here is a full list of Variables.


Please refer to for updates and more detailed examples, descriptions and code. Additionally if you’re familiar with Ansible, found a bug, would like to propose a feature or pull request, - your contributions are very welcome!