roles/common: Use systemd's timedatectl for time stuff
Debian 8 and Ubuntu 16.04 use systemd, so we can make use of its NTP stuff rather than using the standalone `ntp` package.
This commit is contained in:
parent
91f97577c8
commit
06034a8b8b
@ -8,6 +8,15 @@
|
|||||||
# lineinfile: dest=/etc/hosts insertafter=^127.0.0.1 line='127.0.1.1 {{ inventory_hostname }}'
|
# lineinfile: dest=/etc/hosts insertafter=^127.0.0.1 line='127.0.1.1 {{ inventory_hostname }}'
|
||||||
# tags: hostname
|
# tags: hostname
|
||||||
|
|
||||||
|
- name: Set timezone
|
||||||
|
when: timezone is defined
|
||||||
|
command: /usr/bin/timedatectl set-timezone {{ timezone }}
|
||||||
|
tags: timezone
|
||||||
|
|
||||||
|
- name: Enable NTP
|
||||||
|
command: /usr/bin/timedatectl set-ntp on
|
||||||
|
tags: ntp
|
||||||
|
|
||||||
- include: packages_Ubuntu.yml
|
- include: packages_Ubuntu.yml
|
||||||
when: ansible_distribution == 'Ubuntu'
|
when: ansible_distribution == 'Ubuntu'
|
||||||
tags: packages
|
tags: packages
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
- name: Install base packages
|
- name: Install base packages
|
||||||
apt: pkg={{ item }}
|
apt: pkg={{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- ntp
|
|
||||||
- git
|
- git
|
||||||
- tmux
|
- tmux
|
||||||
- iotop
|
- iotop
|
||||||
|
Loading…
Reference in New Issue
Block a user