]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-docker-common: Add support for openSUSE Leap distributions
authorMarkos Chandras <mchandras@suse.de>
Thu, 12 Oct 2017 14:36:14 +0000 (15:36 +0100)
committerMarkos Chandras <mchandras@suse.de>
Tue, 14 Nov 2017 10:51:23 +0000 (10:51 +0000)
Add support for the openSUSE Leap distributions.

Signed-off-by: Markos Chandras <mchandras@suse.de>
roles/ceph-docker-common/meta/main.yml
roles/ceph-docker-common/tasks/checks/check_ntp_redhat.yml [deleted file]
roles/ceph-docker-common/tasks/checks/check_ntp_rpm.yml [new file with mode: 0644]
roles/ceph-docker-common/tasks/main.yml
roles/ceph-docker-common/tasks/misc/ntp_redhat.yml [deleted file]
roles/ceph-docker-common/tasks/misc/ntp_rpm.yml [new file with mode: 0644]

index 66e2d4b47785c7ff2ecbe6e84756dbc08b8a9e15..50c0ab6992144d9cd7efa4c7f105a9bff955ce24 100644 (file)
@@ -11,6 +11,9 @@ galaxy_info:
     - name: EL
       versions:
         - 7
+    - name: opensuse
+      versions:
+        - 42.3
   categories:
     - system
 dependencies: []
diff --git a/roles/ceph-docker-common/tasks/checks/check_ntp_redhat.yml b/roles/ceph-docker-common/tasks/checks/check_ntp_redhat.yml
deleted file mode 100644 (file)
index 6f22c4a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- name: check ntp installation on redhat
-  command: rpm -q ntp
-  args:
-    warn: no
-  register: ntp_pkg_query
-  ignore_errors: true
-  check_mode: no
-  changed_when: false
-  when:
-    - ansible_os_family == 'RedHat'
-
-- name: install ntp on redhat
-  package:
-    name: ntp
-    state: present
diff --git a/roles/ceph-docker-common/tasks/checks/check_ntp_rpm.yml b/roles/ceph-docker-common/tasks/checks/check_ntp_rpm.yml
new file mode 100644 (file)
index 0000000..59f6f8c
--- /dev/null
@@ -0,0 +1,16 @@
+---
+- name: check ntp installation on redhat or suse
+  command: rpm -q ntp
+  args:
+    warn: no
+  register: ntp_pkg_query
+  ignore_errors: true
+  check_mode: no
+  changed_when: false
+  when:
+    - ansible_os_family in ['RedHat', 'Suse']
+
+- name: install ntp on redhat or suse
+  package:
+    name: ntp
+    state: present
index 195711107f67d6ab657158fbace3b04bfb60e742..12aac5d6c66dfb958f45b74f6af24c4a53027ba4 100644 (file)
     - ansible_os_family == 'RedHat'
     - ntp_service_enabled
 
-- name: include misc/ntp_redhat.yml
-  include: misc/ntp_redhat.yml
+- name: include misc/ntp_rpm.yml
+  include: misc/ntp_rpm.yml
   when:
     - not is_atomic
-    - ansible_os_family == 'RedHat'
+    - ansible_os_family in ['RedHat', 'Suse']
     - ntp_service_enabled
 
 - name: include misc/ntp_debian.yml
diff --git a/roles/ceph-docker-common/tasks/misc/ntp_redhat.yml b/roles/ceph-docker-common/tasks/misc/ntp_redhat.yml
deleted file mode 100644 (file)
index 332841b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
----
-- name: include ../checks/check_ntp_redhat.yml
-  include: ../checks/check_ntp_redhat.yml
-  when:
-    - ansible_os_family == 'RedHat'
-
-- name: start the ntp service
-  service:
-    name: ntpd
-    enabled: yes
-    state: started
-  when:
-    - ntp_pkg_query.rc == 0
diff --git a/roles/ceph-docker-common/tasks/misc/ntp_rpm.yml b/roles/ceph-docker-common/tasks/misc/ntp_rpm.yml
new file mode 100644 (file)
index 0000000..5384604
--- /dev/null
@@ -0,0 +1,13 @@
+---
+- name: include ../checks/check_ntp_rpm.yml
+  include: ../checks/check_ntp_rpm.yml
+  when:
+    - ansible_os_family in ['RedHat', 'Suse']
+
+- name: start the ntp service
+  service:
+    name: ntpd
+    enabled: yes
+    state: started
+  when:
+    - ntp_pkg_query.rc == 0