-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scylla-node: implement a default repository selection
Let's set a Scylla repository to the one that corresponds to Scylla version that needs to be installed according to a scylla_version value in case a repository is not explicitly specified. Fixes #290 Signed-off-by: Vlad Zolotarov <[email protected]>
- Loading branch information
1 parent
c702398
commit 89c5875
Showing
3 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
- name: Split {{ scylla_version_to_install }} | ||
set_fact: | ||
_split_version: "{{ scylla_version_to_install.split('.') }}" | ||
|
||
- name: Check that {{ scylla_version_to_install }} has a valid format | ||
fail: | ||
msg: "scylla_version resolved to {{ scylla_version_to_install }} and it can't be used with undefined scylla_deb_repos. See README.md for more details." | ||
when: (_split_version|length < 2) | ||
|
||
- name: Set default repository for a Debian host | ||
block: | ||
- name: Set temporary fact | ||
set_fact: | ||
_scylla_repo_default: "http://downloads.scylladb.com/deb/ubuntu/scylla-{{ _split_version[0] }}.{{ _split_version[1] }}.list" | ||
|
||
- name: Set scylla_deb_repos | ||
set_fact: | ||
scylla_deb_repos: [ "{{ _scylla_repo_default }}" ] | ||
when: ansible_os_family|lower == 'debian' and scylla_deb_repos is not defined | ||
|
||
- name: Set default repository for a RedHat host | ||
block: | ||
- name: Set temporary fact | ||
set_fact: | ||
_scylla_repo_default: "http://downloads.scylladb.com/rpm/centos/scylla-{{ _split_version[0] }}.{{ _split_version[1] }}.repo" | ||
|
||
- name: Set scylla_rpm_repos | ||
set_fact: | ||
scylla_rpm_repos: [ "{{ _scylla_repo_default }}" ] | ||
when: ansible_os_family|lower == 'redhat' and scylla_rpm_repos is not defined | ||
|