Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed st2web dependency on st2 module #279

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Copy link
Member

@arm4b arm4b Dec 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also list the st2web_revision var in the README as well? This looks like oversight from the past.

| `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.
Expand Down
1 change: 1 addition & 0 deletions roles/StackStorm.st2smoketests/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
url: https://localhost/
validate_certs: no
changed_when: no
when: st2web_version is defined and st2web_version
tags:
- smoke-tests

Expand Down
3 changes: 3 additions & 0 deletions roles/StackStorm.st2web/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Copy link
Member

@arm4b arm4b Dec 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the st2web_version variable added before the st2web_revision above to make them logically aligned as we have in other Ansible roles like st2 and st2chatops.

1 change: 0 additions & 1 deletion roles/StackStorm.st2web/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ galaxy_info:
dependencies:
- role: StackStorm.nginx
- role: StackStorm.st2repo
- role: StackStorm.st2
10 changes: 5 additions & 5 deletions roles/StackStorm.st2web/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down