Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决环境之前安装过 chronyd 服务,删除不干净导致的 Failed to execute operation: File exist… #1254

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions roles/chrony/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,7 +32,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服务
Expand Down