Adding Ubuntu support in Ansible - chrony role 08/103508/4
authorJan Benedikt <j.benedikt@partner.samsung.com>
Wed, 11 Mar 2020 12:48:52 +0000 (13:48 +0100)
committerJan Benedikt <j.benedikt@partner.samsung.com>
Thu, 30 Apr 2020 07:24:13 +0000 (09:24 +0200)
Extending ansible playbooks of ubuntu support.
Change the order in role calls.
Chrony role was moved due to its absence in Ubuntu distribution.
Firstly is necessary to initialize package repository and after that install Chrony.

Issue-ID: OOM-1671
Signed-off-by: Jan Benedikt <j.benedikt@partner.samsung.com>
Change-Id: Icadf8e106fba4a369148db0959dcac07a79257c2

ansible/infrastructure.yml
ansible/roles/chrony/tasks/main.yml

index 7fdbd2e..2322c8b 100644 (file)
@@ -8,20 +8,20 @@
 - name: Setup infrastructure servers
   hosts: infrastructure
   roles:
-    - chrony
     - package-repository-check
     - certificates
     - docker
     - dns
     - vncserver
     - nginx
+    - chrony
     - nexus
 
 - name: Setup base for Kubernetes nodes
   hosts: kubernetes:!infrastructure
   roles:
-    - chrony
     - package-repository-check
+    - chrony
     - docker
   tasks:
     - include_role:
index 69a1158..ae95c8e 100644 (file)
@@ -1,4 +1,10 @@
 ---
+- name: Install Chrony - Ubuntu
+  package:
+    name: "chrony"
+    state: present
+  when: ansible_distribution in ["Ubuntu","Debian"]
+
 - name: Check if server mode
   set_fact:
     chrony_mode: 'server'