Skip to content

Commit

Permalink
Merge pull request #56 from paulrbr-fl/moar-compat
Browse files Browse the repository at this point in the history
fix: addon environment variables fetch for clever >= 1.5.0
  • Loading branch information
paulrbr-fl authored Oct 11, 2019
2 parents 78c6d04 + 424481c commit 417bbfa
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tasks/addon.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- name: Gather addon information for {{ addon.name }}
- name: Gather addon information for {{ addon.name }} (clever --version < 1.5.0)
shell: >
set -o pipefail &&
clever env | grep {{ addon.env_prefix }}
Expand All @@ -10,6 +10,21 @@
environment:
CONFIGURATION_FILE: "{{ clever_login_file }}"
changed_when: False
when: clever_returned_version.stdout is version('1.5.0', '<')

- name: Gather addon information for {{ addon.name }} (clever --version >= 1.5.0)
shell: >
set -o pipefail &&
clever env | grep {{ addon.env_prefix }}
| sed -e 's/{{ addon.env_prefix }}_//' -e 's/=/: /'
> {{ clever_app_confdir }}/{{ addon.name }}_env.yml
args:
chdir: "{{ clever_app_root }}"
executable: "bash"
environment:
CONFIGURATION_FILE: "{{ clever_login_file }}"
changed_when: False
when: clever_returned_version.stdout is version('1.5.0', '>=')

- name: Include addon var for {{ addon.name }}
include_vars:
Expand Down

0 comments on commit 417bbfa

Please sign in to comment.