Skip to content

Commit

Permalink
Added config variable use_ntp (#1271)
Browse files Browse the repository at this point in the history
* added config variable

* added when: use_ntp
  • Loading branch information
V-Brooks authored Oct 21, 2020
1 parent 4160ae3 commit 8b5c112
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config/core/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ m_timezone: "America/Chicago"

meza_server_log_db: meza_server_log

use_ntp: true

ntp_server: [0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org, 3.pool.ntp.org]

m_language: en
Expand Down
4 changes: 3 additions & 1 deletion src/roles/base/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,20 @@
state: installed
tags:
- latest
when: use_ntp

- name: Ensure NTP is running and enabled as configured.
service:
name: ntpd
state: started
enabled: yes
when: docker_skip_tasks is not defined or not docker_skip_tasks
when: use_ntp

- name: Copy the ntp.conf template file
template: src=ntp.conf.j2 dest=/etc/ntp.conf
notify:
- restart ntpd
when: use_ntp

# FIXME #809: PIP required first; has dependencies; needed on all hosts?
# Speed up encrypt/decrypt operations
Expand Down

0 comments on commit 8b5c112

Please sign in to comment.