kolla-ansible/ansible/roles/prechecks/tasks/host_os_checks.yml
Mark Goddard 96151a35d0 Host OS prechecks follow up
We only log the release in the 'Checking host OS release or version'
precheck, but we allow either the release or version to be included in
the list. For example, on CentOS 7:

    CentOS release Core is not supported. Supported releases are: 8

Include the version in the failure message too.

Change-Id: I0302cd4fc94a0c3a6aa1dbac7b9fedf37c11b81e
Related: blueprint improve-prechecks
2020-03-11 17:08:17 +00:00

20 lines
854 B
YAML

---
- name: Checking host OS distribution
fail:
msg: >-
Host OS distribution {{ ansible_distribution }} is not supported.
Supported distributions are: {{ host_os_distributions.keys() | join(', ') }}
when: ansible_distribution not in host_os_distributions
- name: Checking host OS release or version
fail:
msg: >-
{{ ansible_distribution }} release {{ ansible_distribution_release }}
version {{ ansible_distribution_version }} is not supported.
Supported releases are:
{{ host_os_distributions[ansible_distribution] | join(', ') }}
when:
- ansible_distribution_release not in host_os_distributions[ansible_distribution]
- ansible_distribution_version not in host_os_distributions[ansible_distribution]
- ansible_distribution_major_version not in host_os_distributions[ansible_distribution]