Added time sync
This commit is contained in:
parent
c541738372
commit
6e0a2f0e98
3 changed files with 25 additions and 0 deletions
10
states/systems/core/time/chrony.conf
Normal file
10
states/systems/core/time/chrony.conf
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
server 0.us.pool.ntp.org iburst
|
||||||
|
server 1.us.pool.ntp.org iburst
|
||||||
|
server 2.us.pool.ntp.org iburst
|
||||||
|
server 3.us.pool.ntp.org iburst
|
||||||
|
driftfile /var/lib/chrony.drift
|
||||||
|
leapsectz right/UTC
|
||||||
|
makestep 1.0 3
|
||||||
|
rtconutc
|
||||||
|
rtcsync
|
||||||
|
|
14
states/systems/core/time/init.sls
Normal file
14
states/systems/core/time/init.sls
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
chrony_pkg:
|
||||||
|
pkg.installed:
|
||||||
|
- name: chrony
|
||||||
|
|
||||||
|
/etc/chrony.conf:
|
||||||
|
file.managed:
|
||||||
|
- source: salt://systems/core/time/chrony.conf
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: 644
|
||||||
|
|
||||||
|
chronyd:
|
||||||
|
service.running:
|
||||||
|
- enable: true
|
|
@ -27,6 +27,7 @@
|
||||||
- systems.core.mount
|
- systems.core.mount
|
||||||
- systems.core.git
|
- systems.core.git
|
||||||
- systems.core.backup
|
- systems.core.backup
|
||||||
|
- systems.core.time
|
||||||
{%- if pillar['roles'] is defined -%}
|
{%- if pillar['roles'] is defined -%}
|
||||||
{%- if pillar['roles'] is not none -%}
|
{%- if pillar['roles'] is not none -%}
|
||||||
{%- for role in pillar['roles'] %}
|
{%- for role in pillar['roles'] %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue