From: David Galloway Date: Fri, 7 Sep 2018 17:32:10 +0000 (-0400) Subject: prep-fog-capture: Modify to work with RHEL8 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a50c181b74f65770b8ff614ba193809717e3640a;p=ceph-cm-ansible.git prep-fog-capture: Modify to work with RHEL8 Signed-off-by: David Galloway --- diff --git a/tools/prep-fog-capture.yml b/tools/prep-fog-capture.yml index 86bc241..0c38c59 100644 --- a/tools/prep-fog-capture.yml +++ b/tools/prep-fog-capture.yml @@ -58,7 +58,7 @@ - name: Unsubscribe RHEL command: subscription-manager unregister - when: '"Red Hat" in ansible_lsb.description' + when: ansible_distribution == "RedHat" failed_when: false # A file gets leftover when a testnode is registered with Satellite that caused @@ -67,7 +67,7 @@ file: path: /etc/rhsm/facts/katello.facts state: absent - when: '"Red Hat" in ansible_lsb.description' + when: ansible_distribution == "RedHat" - set_fact: ntp_service: ntp @@ -75,7 +75,11 @@ - set_fact: ntp_service: ntpd - when: ansible_os_family == "RedHat" + when: ansible_os_family == "RedHat" and ansible_distribution_major_version <= 7 + + - set_fact: + ntp_service: chronyd + when: ansible_os_family == "RedHat" and ansible_distribution_major_version >= 8 - name: "Stop {{ ntp_service }} service" service: @@ -88,6 +92,8 @@ # back to the correct time. So we'll force it in the captured OS images. - name: Force time synchronization using stepping command: "ntpdate -b {{ ntp_servers|join(' ') }}" + # Fix after RHEL8 GAs! + ignore_errors: true - name: "Start {{ ntp_service }} again" service: