Skip to content

Commit

Permalink
Merge pull request #82 from galaxyproject/mutable-configs-19.09
Browse files Browse the repository at this point in the history
Don't attempt to instantiate mutable configs from samples on >= 19.09.
  • Loading branch information
natefoo authored Sep 25, 2019
2 parents a0e11c1 + e5f4ac1 commit b48eabe
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
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

0 comments on commit b48eabe

Please sign in to comment.