解决环境之前安装过 chronyd 服务,删除不干净导致的 Failed to execute operation: File exists 问题

pull/1282/head
Roach57 2023-04-04 15:02:24 +08:00 committed by jmgao
parent 099d13983b
commit 72395be1ac
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
- name: apt 卸载 ntp
shell: 'apt remove -y ntp'
when: 'ansible_distribution in ["Ubuntu","Debian"]'
when: 'ansible_distribution in ["Ubuntu","Debian"]'
ignore_errors: true
- name: yum 卸载 ntp
@ -30,7 +30,7 @@
when: 'inventory_hostname != groups.chrony[0]'
- name: 开机启用chronyd服务
shell: systemctl enable chronyd
shell: systemctl disable chronyd && systemctl enable chronyd
ignore_errors: true
- name: 开启chronyd服务