refs #8280 fix timesync conditions, move grub to qemu

This commit is contained in:
Juan Ferrer 2024-12-10 15:25:40 +01:00
parent ffc7963fca
commit 67f01fd74c
4 changed files with 30 additions and 25 deletions

View File

@ -32,5 +32,3 @@
tags: bacula tags: bacula
- import_tasks: vn-repo.yml - import_tasks: vn-repo.yml
tags: vn-repo tags: vn-repo
- import_tasks: grub_startup.yml
tags: grub_startup

View File

@ -1,11 +1,15 @@
- name: Ensure directory for timesyncd custom configuration exists - name: Getting service facts to check for timesyncd
service_facts:
- when: "'systemd-timesyncd.service' in ansible_facts.services"
block:
- name: Ensure directory for timesyncd custom configuration exists
file: file:
path: /etc/systemd/timesyncd.conf.d/ path: /etc/systemd/timesyncd.conf.d/
state: directory state: directory
owner: root owner: root
group: root group: root
mode: u=rwx,g=rx,o=rx mode: u=rwx,g=rx,o=rx
- name: Configure NTP settings in /etc/systemd/timesyncd.conf.d/vn-ntp.conf - name: Configure timesyncd service
copy: copy:
dest: /etc/systemd/timesyncd.conf.d/vn-ntp.conf dest: /etc/systemd/timesyncd.conf.d/vn-ntp.conf
content: | content: |
@ -16,7 +20,8 @@
group: root group: root
mode: u=rw,g=r,o=r mode: u=rw,g=r,o=r
notify: restart systemd-timesyncd notify: restart systemd-timesyncd
- name: Ensure systemd-timesyncd service is enabled and started - name: Ensure timesyncd service is enabled and started
when: "ansible_facts.services['systemd-timesyncd.service'].status == 'enabled'"
service: service:
name: systemd-timesyncd name: systemd-timesyncd
enabled: yes enabled: yes

View File

@ -6,3 +6,5 @@
tags: autofs tags: autofs
- import_tasks: blacklist.yml - import_tasks: blacklist.yml
tags: blacklist tags: blacklist
- import_tasks: grub_startup.yml
tags: grub_startup