add ntpd to base
Signed-off-by: Ricky Elrod <codeblock@fedoraproject.org>
This commit is contained in:
parent
65342ef01d
commit
8a4ee97493
3 changed files with 57 additions and 0 deletions
24
roles/base/files/ntp/ntp.conf
Normal file
24
roles/base/files/ntp/ntp.conf
Normal file
|
@ -0,0 +1,24 @@
|
|||
## Set up restrictions for services.
|
||||
restrict default kod nomodify notrap nopeer noquery
|
||||
restrict -6 default kod nomodify notrap nopeer noquery
|
||||
restrict 127.0.0.1
|
||||
restrict -6 ::1
|
||||
|
||||
# setup a set of servers that we all look at.
|
||||
server 66.187.233.4 # [clock.redhat.com]
|
||||
server 192.43.244.18 # [time.nist.gov]
|
||||
server 128.118.25.5 # [otc1.psu.edu]
|
||||
server 204.152.184.72 # [clock.isc.org]
|
||||
|
||||
# [localhost]
|
||||
# Undisciplined Local Clock. This is a fake driver intended for backup
|
||||
# and when no outside source of synchronized time is available.
|
||||
server 127.127.1.0 # local clock
|
||||
fudge 127.127.1.0 stratum 10
|
||||
|
||||
# Key file containing the keys and key identifiers used when operating
|
||||
# with symmetric key cryptography.
|
||||
keys /etc/ntp/keys
|
||||
|
||||
# Watch drift
|
||||
driftfile /var/lib/ntp/drift
|
10
roles/base/files/ntp/step-tickers
Normal file
10
roles/base/files/ntp/step-tickers
Normal file
|
@ -0,0 +1,10 @@
|
|||
# [clock.redhat.com]
|
||||
66.187.233.4
|
||||
# [time.nist.gov]
|
||||
192.43.244.18
|
||||
# [otc1.psu.edu]
|
||||
128.118.25.5
|
||||
# [clock.isc.org]
|
||||
204.152.184.72
|
||||
# [loopback]
|
||||
127.127.1.0
|
|
@ -242,6 +242,29 @@
|
|||
- postfix
|
||||
- base
|
||||
- config
|
||||
|
||||
- name: install ntp.conf
|
||||
copy: src=ntp/ntp.conf dest=/etc/ntp.conf
|
||||
tags:
|
||||
- ntp
|
||||
- config
|
||||
- base
|
||||
|
||||
- name: install ntp step-tickers
|
||||
copy: src=ntp/step-tickers dest=/etc/ntp/step-tickers
|
||||
tags:
|
||||
- ntp
|
||||
- config
|
||||
- base
|
||||
|
||||
- name: Start ntpd (if the machine is not virtual)
|
||||
when: ansible_virtualization_role != 'guest'
|
||||
service: name=ntpd state=running enabled=true
|
||||
tags:
|
||||
- ntp
|
||||
- service
|
||||
- base
|
||||
|
||||
#
|
||||
# This task installs some common scripts to /usr/local/bin
|
||||
# scripts are under roles/base/files/common-scripts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue