0.1.1-DEV-20200430-003350

--------------------------
    * ADD:
      - add exceptions for service name if dist == Debian
This commit is contained in:
Chris Hammer 2020-04-30 00:34:02 -04:00
parent ca675d8829
commit 4b842d6fce
3 changed files with 11 additions and 3 deletions

View File

@ -5,6 +5,9 @@
ntp_conf_revision : "20200429-232122"
ntp_service: ntpd
ntp_node_type : server

View File

@ -2,6 +2,6 @@
# handlers file for zen_ntp
- name: restart ntpd
service:
name : ntpd
name : "{{ ntp_service }}"
state: restarted
when: ansible_virtualization_type != "docker"

View File

@ -1,5 +1,10 @@
---
# tasks file for zen_ntp
- name: set service name for debian if required
set_fact:
ntp_service: ntp
when: ansible_distribution == "Debian"
- name: install ntp if not present
package:
@ -19,7 +24,7 @@
- name: enable/start ntpd
service:
name: ntpd
name: "{{ ntp_service }}"
enabled: yes
state: started
when: ansible_distribution_major_version == "7" and ansible_virtualization_type != "docker"
when: ansible_virtualization_type != "docker"