From c80a55fe7d11ef3f91af0577c3690dc811679bbc Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Fri, 19 Feb 2021 02:22:32 -0500 Subject: [PATCH] 0.1.3-DEV-20210219-022129 ------------------------- * ADD: - add support for centos 8 * MODIFY: - update .gitlab-ci.yml so jobs will run on the correct ci host --- .gitlab-ci.yml | 2 +- tasks/main.yml | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 065e56c..389b480 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,7 @@ stages: ### BEGIN TEMPLATES ### .tags_template: &tags_template tags: - - zen-ci-workstation + - zen-ci .header_template: &header diff --git a/tasks/main.yml b/tasks/main.yml index 936268b..0348073 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -6,9 +6,16 @@ when: ansible_distribution == "Debian" +- name: set package and service for centos 8 + set_fact: + ntp_pkg : chrony + ntp_service : chronyd + when: ansible_distribution_major_version == "8" + + - name: install ntp if not present package: - name : ntp + name : "{{ ntp_pkg | default('ntp') }}" state : present @@ -22,7 +29,7 @@ notify: restart ntpd -- name: enable/start ntpd +- name: enable/start ntpd or chrony service: name: "{{ ntp_service }}" enabled: yes