playbook split + added ntp
This commit is contained in:
parent
3230e28bc6
commit
3b8eec9981
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- name: restart systemd-timesyncd
|
||||
service: name=systemd-timesyncd state=restarted
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
|
||||
- name: Add LibreSchool signing key
|
||||
apt_key:
|
||||
url: http://repo.libreschool.org/libreschool.asc
|
||||
state: present
|
||||
|
||||
- name: Add LibreSchool repository
|
||||
apt_repository:
|
||||
repo: deb http://repo.libreschool.org/ubuntu {{ ansible_distribution_release }} main
|
||||
state: present
|
||||
|
||||
- name: Update repositories cache and install "libreschool-client" package
|
||||
apt:
|
||||
name: libreschool-client
|
||||
update_cache: yes
|
|
@ -5,22 +5,8 @@
|
|||
register: esmith
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Add LibreSchool signing key
|
||||
apt_key:
|
||||
url: http://repo.libreschool.org/libreschool.asc
|
||||
state: present
|
||||
- include: libreschool_repo.yml
|
||||
|
||||
- name: Add LibreSchool repository
|
||||
apt_repository:
|
||||
repo: deb http://repo.libreschool.org/ubuntu {{ ansible_distribution_release }} main
|
||||
state: present
|
||||
- include: required_packages.yml
|
||||
|
||||
- name: Update repositories cache and install "libreschool-client" package
|
||||
apt:
|
||||
name: libreschool-client
|
||||
update_cache: yes
|
||||
|
||||
- name: Installing common required packages
|
||||
apt:
|
||||
name: [ 'debconf', 'debconf-utils' ]
|
||||
state: latest
|
||||
- include: ntp.yml
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
|
||||
# TODO: check for other distro, maybe we should first check if we have systemd,
|
||||
# and if so, we have to properly configure it. If we don't have systemd,
|
||||
# we have to install and configure ntpd
|
||||
|
||||
- name: Remove NTP package as we use systemd
|
||||
apt:
|
||||
name: [ 'ntp' ]
|
||||
state: absent
|
||||
|
||||
- name: Setup NTP server
|
||||
ini_file:
|
||||
path: /etc/systemd/timesyncd.conf
|
||||
section: Time
|
||||
option: NTP
|
||||
value: "{{ esmith.SystemName }}.{{ esmith.DomainName }}"
|
||||
notify: restart systemd-timesyncd
|
||||
|
||||
- name: Setup Fallback NTP server
|
||||
ini_file:
|
||||
path: /etc/systemd/timesyncd.conf
|
||||
section: Time
|
||||
option: FallbackNTP
|
||||
value: pool.ntp.org
|
||||
notify: restart systemd-timesyncd
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
|
||||
- name: Installing common required packages
|
||||
apt:
|
||||
name: [ 'debconf', 'debconf-utils' ]
|
||||
state: latest
|
||||
|
Loading…
Reference in New Issue