]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
roles: common: Support for openSUSE Leap
authorRicardo Dias <rdias@suse.com>
Fri, 1 Jul 2016 09:30:24 +0000 (10:30 +0100)
committerRicardo Dias <rdias@suse.com>
Mon, 5 Dec 2016 14:50:48 +0000 (14:50 +0000)
Signed-off-by: Ricardo Dias <rdias@suse.com>
roles/common/tasks/kerberos.yml
roles/common/tasks/main.yml
roles/common/tasks/zypper_systems.yml [new file with mode: 0644]

index c99106ee5cb6aedf5a0fca6c53d577a635667e40..f4b8453aec81fa81cd120e1bad601053cb9d9e52 100644 (file)
     state: present
   when: ansible_os_family == 'Debian'
 
+- name: Install Kerberos Packages (OpenSUSE Leap)
+  zypper:
+    name: krb5-client
+    state: present
+  when: ansible_os_family == 'Suse'
+
 - name: Add krb5 config file
   template:
     src: 'krb5.conf'
index e32fb6cb1801fa8d9f36de533fa4f0559d9a03c0..f4af1d3dd2c51c46a4c10b5f649b402eb688e540 100644 (file)
@@ -22,6 +22,9 @@
 - include: apt_systems.yml
   when: ansible_pkg_mgr == "apt"
 
+- include: zypper_systems.yml
+  when: ansible_pkg_mgr == "zypper"
+
 # configure Kerberos
 - include: kerberos.yml
   tags:
diff --git a/roles/common/tasks/zypper_systems.yml b/roles/common/tasks/zypper_systems.yml
new file mode 100644 (file)
index 0000000..0c74bba
--- /dev/null
@@ -0,0 +1,15 @@
+---
+
+- name: Get the current timezone
+  shell: 'timedatectl | grep -E "Time ?zone" | sed -e "s/.*: \(.*\) (.*/\1/"'
+  register: current_tz
+  changed_when: false
+  tags:
+    - timezone
+
+- name: Set the timezone
+  command: timedatectl set-timezone {{ timezone }}
+  when: current_tz.stdout|default("") != timezone
+  tags:
+    - timezone
+