{"id":13752734,"url":"https://github.com/StackStorm/ansible-st2","last_synced_at":"2025-05-09T20:34:13.628Z","repository":{"id":31836839,"uuid":"35403824","full_name":"StackStorm/ansible-st2","owner":"StackStorm","description":"Ansible Roles and Playbooks to deploy StackStorm","archived":false,"fork":false,"pushed_at":"2024-02-23T16:34:49.000Z","size":1005,"stargazers_count":100,"open_issues_count":20,"forks_count":72,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-04-03T03:11:13.518Z","etag":null,"topics":["ansible","ansible-playbooks","ansible-roles","automation","configuration-management","deployment","devops","st2","stackstorm"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/StackStorm/stackstorm/","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StackStorm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"community_bridge":"stackstorm"}},"created_at":"2015-05-11T05:22:48.000Z","updated_at":"2024-04-12T09:40:28.000Z","dependencies_parsed_at":"2024-07-29T09:44:51.119Z","dependency_job_id":null,"html_url":"https://github.com/StackStorm/ansible-st2","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fansible-st2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fansible-st2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fansible-st2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fansible-st2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StackStorm","download_url":"https://codeload.github.com/StackStorm/ansible-st2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253321733,"owners_count":21890453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-playbooks","ansible-roles","automation","configuration-management","deployment","devops","st2","stackstorm"],"created_at":"2024-08-03T09:01:10.210Z","updated_at":"2025-05-09T20:34:11.399Z","avatar_url":"https://github.com/StackStorm.png","language":"Jinja","readme":"# Ansible-st2\n\n[Ansible](https://www.ansible.com/) roles and playbooks to deploy [StackStorm](https://github.com/stackstorm/st2).\n\n\u003e [StackStorm](http://stackstorm.com/) is event-driven automation platform written in Python.  With over [50+ integrations](https://github.com/StackStorm/st2contrib/tree/master/packs) like GitHub, Docker, Nagios, NewRelic, AWS, Ansible it allows you to wire together your existing infrastructure into complex Workflows with auto-remediation and many more.  Aka IFTTT orchestration for Ops.\n\n[![E2E Tests](https://github.com/StackStorm/ansible-st2/actions/workflows/e2e.yaml/badge.svg)](https://github.com/StackStorm/ansible-st2/actions/workflows/e2e.yaml)\n[![Repository deb/rpm](https://img.shields.io/badge/Repository-deb/rpm-blue.svg)](https://packagecloud.io/StackStorm/stable/)\n[![Join our community Slack](https://img.shields.io/badge/slack-stackstorm-success.svg?logo=slack)](https://stackstorm.com/community-signup)\n\n## Supported platforms\n\n* Ubuntu Focal (20.04)\n* RHEL 7 and CentOS 7\n* RHEL 8 and Rocky Linux 8\n\n\u003e If you are using the provided [`Vagrantfile`](Vagrantfile), note that it uses Focal by default.\n\n\u003e In order to access StackStorm Web UI, please do not forget to ensure that the http and https ports are allowed by the firewall.\n\n## Requirements\n\nA supported version of [Ansible](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html) and its dependencies.\nAt least 2 GB of memory and 3.5 GB of disk space is required, since StackStorm is shipped with RabbitMQ, Mongo, Redis and nginx.\n\n## Installation\n\n```sh\n# Deploy StackStorm\nansible-playbook stackstorm.yml\n```\n\n## Variables\n\nBelow is the list of variables which you can redefine in your playbook, or inventory, to customize the StackStorm deployment:\n\n| Variable                 | Default       | Description  |\n| ------------------------ | ------------- | ------------ |\n| **st2repo**\n| `st2repo_name`           | `stable`      | StackStorm PackageCloud repository to install. [`stable`](https://packagecloud.io/StackStorm/stable/), [`unstable`](https://packagecloud.io/StackStorm/unstable/), [`staging-stable`](https://packagecloud.io/StackStorm/staging-stable/), [`staging-unstable`](https://packagecloud.io/StackStorm/staging-unstable/)\n| **st2**\n| `st2_version`            | `latest`      | StackStorm version to install. `present` to install available package, `latest` to get automatic updates, or pin it to numeric version like `2.2.0` or with revision like `2.2.0-1`\n| `st2_config`             | `{}`          | Hash with StackStorm configuration settings to set in [`st2.conf`](https://github.com/StackStorm/st2/blob/master/conf/st2.conf.sample) ini file.\n| `st2_system_user`        | `stanley`     | System user from which st2 will execute local/remote shell actions.\n| `st2_system_user_in_sudoers` | `yes`| Add `st2_system_user` to the sudoers (recommended for most `st2` features to work).\n| `st2_ssh_key_file`       | `/home/{{st2_system_user}}/.ssh/{{st2_system_user}}_rsa` | Path to `st2_system_user` SSH private key. It will be autogenerated by default.\n| `st2_auth_enable`        | `yes`         | Enable StackStorm standalone authentication.\n| `st2_auth_username`      | `testu`       | Username used by StackStorm standalone authentication.\n| `st2_auth_password`      | `testp`       | Password used by StackStorm standalone authentication.\n| `st2_save_credentials`   | `yes`         | Save credentials for local CLI in `/root/.st2/config` file.\n| `st2_rbac_enable`        | `no`          | Enable RBAC. |\n| `st2_rbac`               | [See `st2_rbac` variable in role defaults](roles/st2/defaults/main.yml) | RBAC roles and assignments. This is a dictionary with three keys `roles`, `assignments`, and `mappings` (based on LDAP group membership). `roles`, `assignments`, and `mappings` are arrays. Each element in the array follows the exact YAML schema for [roles](https://docs.stackstorm.com/rbac.html#user-permissions), [assignments](https://docs.stackstorm.com/rbac.html#defining-user-role-assignments) defined in ST2 documentation. [mappings](https://docs.stackstorm.com/rbac.html#automatically-granting-roles-based-on-ldap-group-membership) are slightly different, they use a `name` and a `mapping` key, see [./roles/StackStorm.st2/defaults/main.yml](./roles/StackStorm.st2/defaults/main.yml) for an example.\n| `st2_ldap_enable`        | `no`          | Enable LDAP authentication backend. |\n| `st2_ldap`               | [See `st2_ldap` variable in role defaults](roles/st2/defaults/main.yml) | Settings for LDAP authentication backend. `st2_ldap` is a dictionary and has one item `backend_kwargs`. `backend_kwargs` should be provided as exactly listed in ST2 documentation for [LDAP configuration](https://docs.stackstorm.com/authentication.html#ldap).\n| `st2_packs`              | `[ st2 ]`     | List of packs to install. This flag does not work with a `--python3` only pack.\n| `st2_python_packages`    | `[ ]`         | List of python packages to install into the `/opt/stackstorm/st2` virtualenv. This is needed when deploying alternative auth or coordination backends which depend on Python modules to make them work.\n| **st2web**\n| `st2web_version`     | `latest`      | st2web version to install. `present` to install available package, `latest` to get automatic updates, or pin it to numeric version like `2.2.0` or with revision like `2.2.0-1`.\n| `st2web_ssl_certificate`     | `null` | String with custom SSL certificate (`.crt`). If not provided, self-signed certificate will be generated.\n| `st2web_ssl_certificate_key` | `null` | String with custom SSL certificate secret key (`.key`). If not provided, self-signed certificate will be generated.\n| `st2web_nginx_config`     | `null` | String with a custom nginx configuration file (`st2.conf`). If not provided, the default st2.conf will be used.\n| **st2chatops**\n| `nodejs_major_version`   | `14`          | The default fits st2chatops version \u003e= 3.5.0.\n| `st2chatops_version`     | `latest`      | st2chatops version to install. `present` to install available package, `latest` to get automatic updates, or pin it to numeric version like `2.2.0` or with revision like `2.2.0-1`.\n| `st2chatops_st2_api_key` |               | st2 API key to be updated in st2chatops.env using \"st2 apikey create -k\" in a task\n| `st2chatops_hubot_adapter` |             | Hubot Adapter to be used for st2chatops. Default is `shell`, but should be changed to one of the [`supported adapters`](`https://github.com/StackStorm/ansible-st2/blob/master/roles/st2chatops/vars/main.yml`).[**Required**]\n| `st2chatops_config`      | `{ }`         | Based on adapter in `st2chatops_hubot_adapter`, provide hash for the adapter settings, to update [`st2chatops.env`](https://github.com/StackStorm/st2chatops/blob/master/st2chatops.env). For example, for `Slack` hubot adapter: `st2chatops_config:` `HUBOT_SLACK_TOKEN: xoxb-CHANGE-ME-PLEASE`\n| `st2chatops_version`     | `latest`      | st2chatops version to install. Use `latest` to get automatic updates or pin it to numeric version like `2.2.0`.\n\n## Examples\n\nInstall latest `stable` StackStorm with all its components on local machine:\n\n```sh\nansible-playbook --inventory localhost, --connection local stackstorm.yml\n```\n\nTo install StackStorm on a remote machine named `stackstorm.example.com`, create and reference an inventory:\n\n```sh\necho \"stackstorm.example.com\" \u003e inventory\nansible-playbook --inventory inventory stackstorm.yml\n```\n\n\u003e Keeping the `latest` version is useful to update StackStorm by re-running the playbook, since it will reinstall (upgrade) st2 when there is new version available.\n\nThis is default behavior. If you do not want updates, consider pinning specific version and revision numbers.\n\nInstall a specific version of st2 with pinned revision number:\n\n```sh\nansible-playbook stackstorm.yml --extra-vars \"st2_version=2.2.0 st2_revision=8\"\n```\n\n## Installing behind a proxy\n\nIf you are installing from behind a proxy, you can use environment variables `http_proxy`, `https_proxy`, and `no_proxy` in the playbook. For the st2smoketests, you will need to disable proxy for localhost.\n\n```yaml\nenvironment:\n  http_proxy: http://proxy.example.net:3128\n  https_proxy: http://proxy.example.net:3128\n  no_proxy: 127.0.0.1,localhost\n```\n\n## Development\n\nThere are a few requirements when developing on `ansible-st2`.\n\nThese are the platforms we must support (must pass end-to-end testing):\n\n* Ubuntu Focal (20.04)\n* CentOS 7\n* Rocky Linux 8\n* RHEL 7 (via AWS)\n* RHEL 8 (via AWS)\n\nThe playbooks and roles must support Ansible idempotence.\nThat is, re-running the `stackstorm.yml` playbook must end with the result `changed=0.*failed=0` (provided that versions and revisions are pinned).\n\nFor local development, there is a [Vagrantfile](Vagrantfile) available.\nBy default, the following command will set up an ubuntu20 box (`ubuntu/focal64`):\n\n```sh\nvagrant up\n```\n\nOther supported distributions:\n\n```sh\nvagrant up ubuntu20\nvagrant up centos7\nvagrant up rockylinux8\n```\n\n## Other installation methods\n\nYou may be interested in other methods to deploy StackStorm:\n\n* Configuration Management\n  * [Puppet Module](https://github.com/stackstorm/puppet-st2)\n\n* Manual Instructions\n  * [Ubuntu Bionic (18.04)](https://docs.stackstorm.com/install/u18.html)\n  * [Ubuntu Focal (20.04)](https://docs.stackstorm.com/install/u20.html)\n  * [RHEL 8 / Rocky Linux 8](https://docs.stackstorm.com/install/rhel8.html)\n  * [RHEL 7 / CentOS 7](https://docs.stackstorm.com/install/rhel7.html)\n\n## Getting help\n\nIf you encounter any problems, our community is ready to help, feel free to:\n\n* Ask questions in our [public Slack channel](https://stackstorm.com/community-signup)\n* Report [issues](https://github.com/StackStorm/ansible-st2/issues), provide [feature requests](https://github.com/StackStorm/ansible-st2/pulls), or just give this project a ✮ star\n\nYour questions, comments, and contributions are more than welcome and greatly appreciated!\n","funding_links":["https://funding.communitybridge.org/projects/stackstorm"],"categories":["stackstorm"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStackStorm%2Fansible-st2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStackStorm%2Fansible-st2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStackStorm%2Fansible-st2/lists"}