Skip to content

Commit 15ad2ea

Browse files
add fail message to roles that are not available as oss version (#338)
To prevent the a strange error message that is not easy to understand for the basic user I added a check that fails for specific roles when the release type and version are not available for the specific role. --------- Co-authored-by: Thomas Widhalm <[email protected]>
1 parent 43f99c3 commit 15ad2ea

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

roles/elasticsearch/tasks/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
---
22

3+
- name: Check for versions
4+
ansible.builtin.fail:
5+
msg: "No OSS package with version later than 7 is available for Elasticsearch"
6+
when:
7+
- elasticstack_release | int > 7
8+
- elasticstack_variant == "oss"
9+
310
- name: Include global role
411
ansible.builtin.import_role:
512
name: netways.elasticstack.elasticstack

roles/kibana/tasks/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
---
22

3+
- name: Check for versions
4+
ansible.builtin.fail:
5+
msg: "No OSS package with version later than 7 is available for Kibana"
6+
when:
7+
- elasticstack_release | int > 7
8+
- elasticstack_variant == "oss"
9+
310
- name: Include global role
411
ansible.builtin.import_role:
512
name: netways.elasticstack.elasticstack

roles/repos/tasks/main.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
ansible.builtin.import_role:
55
name: netways.elasticstack.elasticstack
66

7-
- name: Check for versions
8-
ansible.builtin.fail:
9-
msg: "No OSS versions later than 7 are available"
10-
when:
11-
- elasticstack_release | int > 7
12-
- elasticstack_variant == "oss"
13-
147
- name: Import RedHat tasks
158
ansible.builtin.import_tasks: redhat.yml
169
when: ansible_os_family == 'RedHat'

0 commit comments

Comments
 (0)