Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ansible-scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
ansible-scripts
Commits
ed4929e9
Commit
ed4929e9
authored
11 months ago
by
Jonas Leder
Browse files
Options
Downloads
Patches
Plain Diff
extend chrony playbook to set custom ntp server
parent
668386a2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
linux/debian/files/chrony.conf.j2
+47
-0
47 additions, 0 deletions
linux/debian/files/chrony.conf.j2
linux/debian/install-chrony.yml
+22
-12
22 additions, 12 deletions
linux/debian/install-chrony.yml
with
69 additions
and
12 deletions
linux/debian/files/chrony.conf.j2
0 → 100644
+
47
−
0
View file @
ed4929e9
# Welcome to the chrony configuration file. See chrony.conf(5) for more
# information about usable directives.
# Include configuration files found in /etc/chrony/conf.d.
confdir /etc/chrony/conf.d
# Use Debian vendor zone.
server {{ ntp_server }}
# Use time sources from DHCP.
sourcedir /run/chrony-dhcp
# Use NTP sources found in /etc/chrony/sources.d.
sourcedir /etc/chrony/sources.d
# This directive specify the location of the file containing ID/key pairs for
# NTP authentication.
keyfile /etc/chrony/chrony.keys
# This directive specify the file into which chronyd will store the rate
# information.
driftfile /var/lib/chrony/chrony.drift
# Save NTS keys and cookies.
ntsdumpdir /var/lib/chrony
# Uncomment the following line to turn logging on.
#log tracking measurements statistics
# Log files location.
logdir /var/log/chrony
# Stop bad estimates upsetting machine clock.
maxupdateskew 100.0
# This directive enables kernel synchronisation (every 11 minutes) of the
# real-time clock. Note that it can't be used along with the 'rtcfile' directive.
rtcsync
# Step the system clock instead of slewing it if the adjustment is larger than
# one second, but only in the first three clock updates.
makestep 1 3
# Get TAI-UTC offset and leap seconds from the system tz database.
# This directive must be commented out when using time sources serving
# leap-smeared time.
leapsectz right/UTC
\ No newline at end of file
This diff is collapsed.
Click to expand it.
linux/debian/install-chrony.yml
+
22
−
12
View file @
ed4929e9
-
name
:
Install Chrony NTP Daemon
-
name
:
Install Chrony NTP Daemon
hosts
:
all
hosts
:
all
vars
:
ntp_server
:
ptbtime1.ptb.de
tasks
:
tasks
:
-
name
:
install chrony
-
name
:
install chrony
apt
:
apt
:
name
:
chrony
name
:
chrony
update_cache
:
yes
update_cache
:
yes
-
name
:
stop service
ansible.builtin.systemd
:
name
:
chrony
state
:
stopped
-
name
:
copy config file
template
:
src
:
files/chrony.conf.j2
dest
:
/etc/chrony/chrony.conf
-
name
:
start service
-
name
:
start service
ansible.builtin.systemd
:
ansible.builtin.systemd
:
name
:
chrony
name
:
chrony
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment