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

Node Role - Forbid Scylla upgrade when not explicitly requested #140

Open
wants to merge 2 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
6 changes: 6 additions & 0 deletions ansible-scylla-node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# UPGRADE
# ==============================

# Skips role upgrade check. Useful if the role failed in the middle of an installation.
# Values:
# [default] false: Fail when Scylla is installed and the upgrade_version == False
# true: When upgrade_version == False, re-run the install process
skip_upgrade_check: false

# Upgrades Scylla version if a previous installation is detected
# Values:
# [default] false: don't check for upgrades
Expand Down
11 changes: 11 additions & 0 deletions ansible-scylla-node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
package_facts:
manager: auto

- name: Check whether Scylla is already installed
fail:
msg: >
Detected an existing Scylla installation.
Should you want to upgrade, set `upgrade_version' to True.
If you are recovering from a failed role run, set `skip_upgrade_check' to True.
when: >
not upgrade_version and not skip_upgrade_check and
( 'scylla-server' in ansible_facts.packages or
'scylla-enterprise-server' in ansible_facts.packages )

# Upgrade
- name: Upgrade Scylla
include_tasks: upgrade/main.yml
Expand Down