From 249e18ec15f608a436e61d529ee23fba41653d92 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Fri, 16 Nov 2018 18:55:48 -0500 Subject: [PATCH] prep-fog-capture: Support RHEL8/python3 Signed-off-by: David Galloway --- tools/prep-fog-capture.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/prep-fog-capture.yml b/tools/prep-fog-capture.yml index 2035547..5353780 100644 --- a/tools/prep-fog-capture.yml +++ b/tools/prep-fog-capture.yml @@ -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: -- 2.39.5