0.1.1-DEV-20200430-003350
-------------------------- * ADD: - add exceptions for service name if dist == Debian
This commit is contained in:
parent
ca675d8829
commit
4b842d6fce
@ -5,6 +5,9 @@
|
|||||||
ntp_conf_revision : "20200429-232122"
|
ntp_conf_revision : "20200429-232122"
|
||||||
|
|
||||||
|
|
||||||
|
ntp_service: ntpd
|
||||||
|
|
||||||
|
|
||||||
ntp_node_type : server
|
ntp_node_type : server
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
# handlers file for zen_ntp
|
# handlers file for zen_ntp
|
||||||
- name: restart ntpd
|
- name: restart ntpd
|
||||||
service:
|
service:
|
||||||
name : ntpd
|
name : "{{ ntp_service }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
when: ansible_virtualization_type != "docker"
|
when: ansible_virtualization_type != "docker"
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
---
|
---
|
||||||
# tasks file for zen_ntp
|
# 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
|
- name: install ntp if not present
|
||||||
package:
|
package:
|
||||||
@ -19,7 +24,7 @@
|
|||||||
|
|
||||||
- name: enable/start ntpd
|
- name: enable/start ntpd
|
||||||
service:
|
service:
|
||||||
name: ntpd
|
name: "{{ ntp_service }}"
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
when: ansible_distribution_major_version == "7" and ansible_virtualization_type != "docker"
|
when: ansible_virtualization_type != "docker"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user