summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Benedikt <j.benedikt@partner.samsung.com>2020-03-11 13:48:52 +0100
committerJan Benedikt <j.benedikt@partner.samsung.com>2020-04-30 09:24:13 +0200
commit0182fdb6dff2df0d7629ce5801ace446595f7575 (patch)
tree82a88f43a59eefeee5b266de25831ee8d3480152
parentd0dbbca45c18a09dddf714453ca2c88bcd7a49f0 (diff)
Adding Ubuntu support in Ansible - chrony role
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
-rw-r--r--ansible/infrastructure.yml4
-rw-r--r--ansible/roles/chrony/tasks/main.yml6
2 files changed, 8 insertions, 2 deletions
diff --git a/ansible/infrastructure.yml b/ansible/infrastructure.yml
index 7fdbd2e1..2322c8bb 100644
--- a/ansible/infrastructure.yml
+++ b/ansible/infrastructure.yml
@@ -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:
diff --git a/ansible/roles/chrony/tasks/main.yml b/ansible/roles/chrony/tasks/main.yml
index 69a11587..ae95c8e7 100644
--- a/ansible/roles/chrony/tasks/main.yml
+++ b/ansible/roles/chrony/tasks/main.yml
@@ -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'