Updated the `defaults/main.yml`, `handlers/main.yml`, and `tasks/main.yml` files to add NTP server configuration and a backup of the original `ntp.conf` file. This ensures that the system uses AD DCs as time sources and maintains a backup for future reference.
17 lines
313 B
YAML
17 lines
313 B
YAML
# handlers/main.yml
|
|
- name: Restart networking if required
|
|
service:
|
|
name: networking
|
|
state: restarted
|
|
when: ansible_service_mgr == "systemd"
|
|
|
|
- name: Restart systemd-resolved
|
|
service:
|
|
name: systemd-resolved
|
|
state: restarted
|
|
|
|
- name: Restart ntp
|
|
service:
|
|
name: ntp
|
|
state: restarted
|