Ticket ID #195 ‐ Applying NTP Server to Clients - GriffinKat/group-a GitHub Wiki
Applying the NTP module to the nodes.
-
To apply the module to your nodes, add the following line to each node definition in(Management Server) /etc/puppetlabs/code/environment/production/manifests/site.pp:
include ntp_service
Then, run the Puppet agent on each machine using the command:
sudo /opt/puppetlabs/puppet/bin/puppet agent --server=mgmt-a --no-daemonize --verbose --onetime
Below is the screenshot of the application of the module on all the servers.
-
Testing the NTP Configuration
To verify that your NTP configuration is working, follow these steps:
-
Verify the NTP Service is Running
Check the status of the NTP service on both the server and clients:
sudo systemctl status ntp
-
Check NTP Synchronization
Use the ntpq -p command to check synchronization:
ntpq -p
Use the following command to check the synchronization status:
ntpstat
-
Verify Time Accuracy
Check the system time on both the server and clients:
date
Management Server(Master)
Apps Server(Node)
Backup Server(Node)
Database Server(Node)
NOTE: Ensure the times are consistent (within milliseconds).