mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-24 22:23:29 +02:00
29 lines
781 B
YAML
29 lines
781 B
YAML
![]() |
---
|
||
|
|
||
|
- when:
|
||
|
- ansible_virtualization_role == 'guest'
|
||
|
- ansible_virtualization_type == 'kvm'
|
||
|
block:
|
||
|
- name: Configure ptp_kvm to be loaded
|
||
|
copy: content=ptp_kvm dest=/etc/modules-load.d/ptp_kvm.conf
|
||
|
register: ntp_ptp_kvm_mod
|
||
|
|
||
|
- name: Load ptp_kvm
|
||
|
service: name=systemd-modules-load state=restarted
|
||
|
when: ntp_ptp_kvm_mod.changed
|
||
|
tags: ntp
|
||
|
|
||
|
- when: ansible_virtualization_role != 'guest' or ansible_virtualization_type != 'kvm'
|
||
|
file: path=/etc/modules-load.d/ptp_kvm.conf state=absent
|
||
|
tags: ntp
|
||
|
|
||
|
- name: Check if /dev/ptp_kvm exists
|
||
|
stat: path=/dev/ptp_kvm
|
||
|
register: ntp_ptp_kvm_dev
|
||
|
tags: ntp
|
||
|
|
||
|
- name: Deploy chrony configuration
|
||
|
template: src=chrony.conf.j2 dest={{ ntp_chrony_conf }}
|
||
|
notify: restart chrony
|
||
|
tags: ntp
|