mg
0c016ea2b7
Merge branch 'master' into logrotate cv4 rasdaemon musterrolle rechte restic sanoid Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#39 Co-Authored-By: mg <mg@noreply.git.mgrote.net> Co-Committed-By: mg <mg@noreply.git.mgrote.net>
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
---
|
|
- name: mask systemd-timesyncd service
|
|
become: yes
|
|
systemd:
|
|
name: systemd-timesyncd
|
|
state: stopped
|
|
masked: yes
|
|
|
|
- name: mask ntp service
|
|
become: yes
|
|
systemd:
|
|
name: ntp
|
|
state: stopped
|
|
masked: yes
|
|
|
|
- name: install chrony packages
|
|
become: yes
|
|
ansible.builtin.package:
|
|
name:
|
|
- chrony
|
|
state: present
|
|
notify: restart_chrony
|
|
|
|
- name: copy chrony config
|
|
become: yes
|
|
ansible.builtin.template:
|
|
src: chrony.conf.j2
|
|
dest: /etc/chrony/chrony.conf
|
|
mode: 0755
|
|
notify: restart_chrony
|
|
|
|
- name: copy logrotate config
|
|
become: yes
|
|
ansible.builtin.template:
|
|
src: logrotate_chrony
|
|
dest: /etc/logrotate.d/chrony
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
|
|
- name: Create chrony driftfile folder
|
|
become: yes
|
|
file:
|
|
state: directory
|
|
path: "{{ ntp_chrony_driftfile_directory }}"
|
|
mode: 0755
|
|
owner: "{{ ntp_chrony_user }}"
|
|
group: "{{ ntp_chrony_group }}"
|
|
notify: restart_chrony
|
|
|
|
- name: set timezone to {{ ntp_chrony_timezone }}
|
|
become: yes
|
|
ansible.builtin.timezone:
|
|
name: "{{ ntp_chrony_timezone }}"
|