]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
prep-fog-capture: Modify to work with RHEL8 411/head
authorDavid Galloway <dgallowa@redhat.com>
Fri, 7 Sep 2018 17:32:10 +0000 (13:32 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Fri, 7 Sep 2018 17:32:10 +0000 (13:32 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
tools/prep-fog-capture.yml

index 86bc241b508170635b0f181cde0d10e841415e31..0c38c59797153695c88ba4f9a9843b89c3d4efde 100644 (file)
@@ -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
 
   - 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: