]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
prep-fog-capture: Support RHEL8/python3 423/head
authorDavid Galloway <dgallowa@redhat.com>
Fri, 16 Nov 2018 23:55:48 +0000 (18:55 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Fri, 16 Nov 2018 23:55:48 +0000 (18:55 -0500)
Signed-off-by: David Galloway <dgallowa@redhat.com>
tools/prep-fog-capture.yml

index 2035547faf48db2d888619b0067d80336d031b03..5353780f939279048d8f0395e0d59166849b6312 100644 (file)
@@ -7,8 +7,23 @@
 - hosts:
     - testnodes
   become: true
+  gather_facts: false
   tasks:
 
+  # (Missing in RHEL8)
+  - name: Check for /usr/bin/python
+    shell: echo marco
+    register: polo
+    ignore_errors: true
+
+  - name: Set ansible_python_interpreter=/usr/bin/python3
+    set_fact:
+      ansible_python_interpreter: /usr/bin/python3
+    when: polo.rc != 0
+
+  # Now that we know where python is, we can gather_facts
+  - setup:
+
   # We need to leave /.cephlab_rc_local or else each FOG reimage would tell Cobbler to run ceph-cm-ansible
   - name: Remove lock files and udev rules
     file: