diff --git a/README.md b/README.md index f649ce4c..e25cbc79 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ Below is the list of variables you can redefine in your playbook to customize st | `st2_packs` | `[ st2 ]` | List of packs to install. This flag does not work with a `--python3` only pack. | `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. | **st2web** +| `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`. | `st2web_ssl_certificate` | `null` | String with custom SSL certificate (`.crt`). If not provided, self-signed certificate will be generated. | `st2web_ssl_certificate_key` | `null` | String with custom SSL certificate secret key (`.key`). If not provided, self-signed certificate will be generated. | `st2web_nginx_config` | `null` | String with a custom nginx configuration file (`st2.conf`). If not provided, the default st2.conf will be used. diff --git a/roles/StackStorm.st2smoketests/tasks/main.yml b/roles/StackStorm.st2smoketests/tasks/main.yml index a7c74217..e8eb3e05 100644 --- a/roles/StackStorm.st2smoketests/tasks/main.yml +++ b/roles/StackStorm.st2smoketests/tasks/main.yml @@ -38,6 +38,7 @@ url: https://localhost/ validate_certs: no changed_when: no + when: st2web_version is defined and st2web_version tags: - smoke-tests diff --git a/roles/StackStorm.st2web/defaults/main.yml b/roles/StackStorm.st2web/defaults/main.yml index babac1de..a8d06619 100644 --- a/roles/StackStorm.st2web/defaults/main.yml +++ b/roles/StackStorm.st2web/defaults/main.yml @@ -10,3 +10,6 @@ st2web_ssl_certificate_key: null # String with a custom nginx configuration file to replace st2.conf. If not provided, the default st2.conf will be used. st2web_nginx_config: null + +# StackStorm version to install. `present` to install available package, `latest` to get automatic updates or pin it to numeric version like `2.2.0`. +st2web_version: 'latest' diff --git a/roles/StackStorm.st2web/meta/main.yml b/roles/StackStorm.st2web/meta/main.yml index fbc177c6..2e11b0d8 100644 --- a/roles/StackStorm.st2web/meta/main.yml +++ b/roles/StackStorm.st2web/meta/main.yml @@ -20,4 +20,3 @@ galaxy_info: dependencies: - role: StackStorm.nginx - role: StackStorm.st2repo - - role: StackStorm.st2 diff --git a/roles/StackStorm.st2web/tasks/main.yml b/roles/StackStorm.st2web/tasks/main.yml index e84d422f..621dfd2c 100644 --- a/roles/StackStorm.st2web/tasks/main.yml +++ b/roles/StackStorm.st2web/tasks/main.yml @@ -20,7 +20,7 @@ retries: 5 delay: 3 until: _task is succeeded - when: st2_version == "latest" + when: st2web_version == "latest" tags: st2web, skip_ansible_lint - name: Install present {{ st2web_package_name }} package, no auto-update @@ -32,21 +32,21 @@ retries: 5 delay: 3 until: _task is succeeded - when: st2_version == "present" + when: st2web_version == "present" tags: st2web - name: Install pinned {{ st2web_package_name }} package become: yes package: - name: "{{ st2web_package_name }}{{ '-' if ansible_facts.pkg_mgr == 'yum' else '=' }}{{ st2_version }}-{{ st2web_revision }}" + name: "{{ st2web_package_name }}{{ '-' if ansible_facts.pkg_mgr == 'yum' else '=' }}{{ st2web_version }}-{{ st2web_revision }}" state: present register: _task retries: 5 delay: 3 until: _task is succeeded when: - - st2_version != "latest" - - st2_version != "present" + - st2web_version != "latest" + - st2web_version != "present" tags: st2web - name: Configure SSL certificate for st2web UI