Skip to content

Commit

Permalink
Add OSP13 constraints
Browse files Browse the repository at this point in the history
This change adds constraints around the generate-environment-vars.yml
playbook executed at the end of setup.sh. The assumption is that the
playbook will exit setup if the version of OSP detected is not OSP13.

Signed-off-by: Nathan Pawelek <[email protected]>
  • Loading branch information
Nathan Pawelek committed Aug 1, 2019
1 parent 1157fb9 commit 64cd439
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions playbooks/generate-environment-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,18 @@
vars_files:
- vars/main.yml
tasks:
- name: Check OSP
stat:
path: "/etc/rhosp-release"
register: osp_check
- name: check for OSP and validate version
block:
- name: Check OSP
stat:
path: "/etc/rhosp-release"
register: osp_check

- name: Register /etc/rhosp-release version
shell: cat /etc/rhosp-release | tr -dc '0-9.'
register: osp_version
when:
- osp_check.stat.exists | bool

- name: Check OSA
stat:
Expand All @@ -75,6 +83,8 @@
var_location: "{{ all_var_location['osp'] }}"
when:
- osp_check.stat.exists | bool
- osp_version is defined
- osp_version.stdout is version('13.0.0', '>=')

- name: Setup exit
block:
Expand Down

0 comments on commit 64cd439

Please sign in to comment.