From d13d17b1e08a99d97052ea1879f96719c9c85c35 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Thu, 26 Sep 2019 18:30:35 -0400 Subject: [PATCH] cobbler: Check for rhel8 or centos8 to set ansible_python_interpreter Signed-off-by: David Galloway --- .../templates/triggers/install/post/cephlab_ansible.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh b/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh index 40fc3d1..c19fe19 100644 --- a/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh +++ b/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh @@ -29,8 +29,9 @@ export ANSIBLE_HOST_KEY_CHECKING=False # Set ansible_python_interpeter var if RHEL8 # https://docs.ansible.com/ansible/2.7/reference_appendices/python_3_support.html -if [[ $(cobbler system dumpvars --name $2 | grep os_version | awk '{ print $3 }') == "rhel8" ]]; then - # Nagios packages aren't available in the RHEL8 beta image so we'll skip those tasks +os=$(cobbler system dumpvars --name $2 | grep os_version | awk '{ print $3 }') +if [ $os == "rhel8" -o $os == "centos8" ]; then + # Nagios packages aren't available in the CentOS/RHEL8 yet so we'll skip those tasks ANSIBLE_EXTRAVAR="-e ansible_python_interpreter=/usr/bin/python3 --skip-tags nagios" else ANSIBLE_EXTRAVAR="" -- 2.39.5