0.1.0-DEV-20200429-233815
------------------------- * INITIAL: - initial commit for zen_ntp ansible role
This commit is contained in:
25
tasks/main.yml
Normal file
25
tasks/main.yml
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
# tasks file for zen_ntp
|
||||
|
||||
- name: install ntp if not present
|
||||
package:
|
||||
name : ntp
|
||||
state : present
|
||||
|
||||
|
||||
- name: deploy {{ ntp_conf_file }}
|
||||
template:
|
||||
src: templates/ntp_conf.j2
|
||||
dest: "{{ ntp_conf_file }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
notify: restart ntpd
|
||||
|
||||
|
||||
- name: enable/start ntpd
|
||||
service:
|
||||
name: ntpd
|
||||
enabled: yes
|
||||
state: started
|
||||
when: ansible_distribution_major_version == "7" and ansible_virtualization_type != "docker"
|
Reference in New Issue
Block a user