Configure the ntpd.conf file and bump version
This commit is contained in:
parent
b1aa50a717
commit
7046e193e0
|
@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [6.9.1] - 2021-07-19
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Configure the ntpd.conf file
|
||||||
|
|
||||||
## [6.9.0] - 2021-05-06
|
## [6.9.0] - 2021-05-06
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# EvoBSD 6.9.0
|
# EvoBSD 6.9.1
|
||||||
|
|
||||||
EvoBSD is an ansible project used for customising OpenBSD hosts
|
EvoBSD is an ansible project used for customising OpenBSD hosts
|
||||||
used by Evolix.
|
used by Evolix.
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
ntpd_servers:
|
ntpd_servers: "ntp.evolix.net"
|
||||||
- "ntp.evolix.net"
|
|
||||||
|
|
||||||
general_alert_email: "root@localhost"
|
general_alert_email: "root@localhost"
|
||||||
general_technical_realm: "example.com"
|
general_technical_realm: "example.com"
|
||||||
|
|
|
@ -31,3 +31,8 @@
|
||||||
command: mount -u -o noatime /home
|
command: mount -u -o noatime /home
|
||||||
args:
|
args:
|
||||||
warn: false
|
warn: false
|
||||||
|
|
||||||
|
- name: reload ntp
|
||||||
|
service:
|
||||||
|
name: ntpd
|
||||||
|
state: restarted
|
||||||
|
|
|
@ -10,3 +10,4 @@
|
||||||
- include: newsyslog.yml
|
- include: newsyslog.yml
|
||||||
- include: cron.yml
|
- include: cron.yml
|
||||||
- include: fstab.yml
|
- include: fstab.yml
|
||||||
|
- include: ntp.yml
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
- name: Retrieve ntpd.conf content
|
||||||
|
command: cat ntpd.conf
|
||||||
|
args:
|
||||||
|
chdir: /etc/
|
||||||
|
register: ntpd_conf
|
||||||
|
tags:
|
||||||
|
- ntp
|
||||||
|
|
||||||
|
- name: Empty ntpd.conf before customizing it
|
||||||
|
file:
|
||||||
|
path: /etc/ntpd.conf
|
||||||
|
state: absent
|
||||||
|
when: ntpd_conf.stdout is not regex("^server ntp.evolix.net$")
|
||||||
|
tags:
|
||||||
|
- ntp
|
||||||
|
|
||||||
|
- name: Customize ntpd conf
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/ntpd.conf
|
||||||
|
line: "server {{ ntpd_servers }}"
|
||||||
|
create: yes
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
mode: '0644'
|
||||||
|
notify:
|
||||||
|
- reload ntp
|
||||||
|
tags:
|
||||||
|
- ntp
|
|
@ -3,8 +3,7 @@
|
||||||
## Edit and uncomment to overwrite the default values ##
|
## Edit and uncomment to overwrite the default values ##
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
# ntpd_servers:
|
# ntpd_servers: "pool.ntp.org"
|
||||||
# - "ntp.evolix.net"
|
|
||||||
#
|
#
|
||||||
# general_alert_email: "root@localhost"
|
# general_alert_email: "root@localhost"
|
||||||
# general_technical_realm: "example.com"
|
# general_technical_realm: "example.com"
|
||||||
|
|
Loading…
Reference in New Issue