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

Don't attempt to instantiate mutable configs from samples on >= 19.09. #82

Merged
merged 1 commit into from
Sep 25, 2019
Merged
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
18 changes: 18 additions & 0 deletions tasks/_inc_galaxy_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# Determine Galaxy version

# Currently only used by mutable config setup but placed in an include because it'll probably be used by more

- name: Collect Galaxy version file
slurp:
src: "{{ galaxy_server_dir }}/lib/galaxy/version.py"
register: __galaxy_version_file

- name: Determine Galaxy version
set_fact:
__galaxy_major_version: >-
{{
(__galaxy_version_file['content'] | b64decode).splitlines()
| select('match', 'VERSION_MAJOR\s*=.*') | first
| regex_replace('^[^\d]+([.\d]+).*', '\1')
}}
5 changes: 5 additions & 0 deletions tasks/mutable_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
- name: Mutable config setup
block:

- name: Ensure Galaxy version is set
include_tasks: _inc_galaxy_version.yml
when: __galaxy_major_version is undefined

- name: Create mutable configuration file directories
file:
path: "{{ item }}"
Expand All @@ -17,6 +21,7 @@
args:
creates: "{{ item.dest }}"
with_items: "{{ galaxy_mutable_configs }}"
when: __galaxy_major_version is version('19.09', '<')

- name: Template mutable configuration files
template:
Expand Down