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,23 +1,28 @@
- name: Ensure directory for timesyncd custom configuration exists - name: Getting service facts to check for timesyncd
file: service_facts:
path: /etc/systemd/timesyncd.conf.d/ - when: "'systemd-timesyncd.service' in ansible_facts.services"
state: directory block:
owner: root - name: Ensure directory for timesyncd custom configuration exists
group: root file:
mode: u=rwx,g=rx,o=rx path: /etc/systemd/timesyncd.conf.d/
- name: Configure NTP settings in /etc/systemd/timesyncd.conf.d/vn-ntp.conf state: directory
copy: owner: root
dest: /etc/systemd/timesyncd.conf.d/vn-ntp.conf group: root
content: | mode: u=rwx,g=rx,o=rx
[Time] - name: Configure timesyncd service
NTP={{ time_server }} copy:
FallbackNTP={{ time_server_spain }} dest: /etc/systemd/timesyncd.conf.d/vn-ntp.conf
owner: root content: |
group: root [Time]
mode: u=rw,g=r,o=r NTP={{ time_server }}
notify: restart systemd-timesyncd FallbackNTP={{ time_server_spain }}
- name: Ensure systemd-timesyncd service is enabled and started owner: root
service: group: root
name: systemd-timesyncd mode: u=rw,g=r,o=r
enabled: yes notify: restart systemd-timesyncd
state: started - name: Ensure timesyncd service is enabled and started
when: "ansible_facts.services['systemd-timesyncd.service'].status == 'enabled'"
service:
name: systemd-timesyncd
enabled: yes
state: started

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