From 96151a35d0fd2a5a5d95929f8c68324766b24f42 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 11 Mar 2020 16:30:05 +0000 Subject: [PATCH] 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 --- ansible/roles/prechecks/tasks/host_os_checks.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ansible/roles/prechecks/tasks/host_os_checks.yml b/ansible/roles/prechecks/tasks/host_os_checks.yml index 0538419215..1d49932e3f 100644 --- a/ansible/roles/prechecks/tasks/host_os_checks.yml +++ b/ansible/roles/prechecks/tasks/host_os_checks.yml @@ -9,8 +9,9 @@ - name: Checking host OS release or version fail: msg: >- - {{ ansible_distribution }} release {{ ansible_distribution_release }} is - not supported. Supported releases are: + {{ 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]