]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
cobbler: Check for rhel8 or centos8 to set ansible_python_interpreter 473/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 26 Sep 2019 22:30:35 +0000 (18:30 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 26 Sep 2019 22:30:35 +0000 (18:30 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh

index 40fc3d12cea1b674cf2d43ec1a83a799fb814ac0..c19fe1903a6e188b60db6f63cf4beedf7d0a02e4 100644 (file)
@@ -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=""