23 lines
684 B
YAML
23 lines
684 B
YAML
|
---
|
||
|
- hosts: zypper
|
||
|
tasks:
|
||
|
|
||
|
- name: "zypper module dependency (Py2 only)"
|
||
|
ansible.builtin.command: zypper -n install python-xml
|
||
|
args:
|
||
|
creates: /usr/lib*/python2.*/xml/dom/minidom.py
|
||
|
when: ansible_python.version.major|default(2) == 2
|
||
|
|
||
|
- name: Install Chrony
|
||
|
community.general.zypper: name=chrony state=latest
|
||
|
|
||
|
- name: Copy config file
|
||
|
ansible.builtin.copy: src=chrony.conf dest=/etc/chrony.conf mode=0644 owner=root group=root backup=yes
|
||
|
|
||
|
- name: Restart Chrony with new config
|
||
|
ansible.builtin.service: name=chronyd state=restarted
|
||
|
|
||
|
- name: Start Chrony at boot
|
||
|
ansible.builtin.service: name=chronyd enabled=yes
|
||
|
|