roles/common: Use systemd module instead of "service"
This was new in Ansible 2.2 but I didn't notice until now. All of our servers are running distributions with systemd so let's just use this.
This commit is contained in:
@ -8,9 +8,9 @@
|
||||
command: /usr/bin/timedatectl set-timezone {{ timezone }}
|
||||
tags: timezone
|
||||
|
||||
- name: Enable systemd's NTP client
|
||||
- name: Start and enable systemd's NTP client
|
||||
when: ansible_service_mgr == 'systemd'
|
||||
service: name=systemd-timesyncd enabled=yes
|
||||
systemd: name=systemd-timesyncd state=started enabled=yes
|
||||
|
||||
- name: Uninstall ntp on modern Ubuntu/Debian
|
||||
apt: name=ntp state=absent update_cache=yes
|
||||
|
Reference in New Issue
Block a user