ansible/roles/i2c-clock/tasks/install.yml

37 lines
798 B
YAML
Raw Normal View History

2021-01-25 18:50:37 +00:00
---
- become: yes
block:
- name: install i2c-tools
become: yes
apt:
update_cache: yes
pkg:
- i2c-tools
2021-07-01 17:44:41 +00:00
- libraspberrypi-bin
- name: enable i2c-rtc dtoverlay
shell:
cmd: |
dtoverlay i2c-rtc
2021-01-25 18:50:37 +00:00
- name: enable automatic module load
copy:
src: etc/modules-load.d/rtc-ds1307.conf
dest: /etc/modules-load.d/rtc-ds1307.conf
- name: add systemd service
copy:
src: etc/systemd/system/rtc-i2c.service
dest: /etc/systemd/system/rtc-i2c.service
2021-07-01 17:44:41 +00:00
- name: disable systemd service
systemd:
daemon_reload: yes
name: rtc-i2c.service
enabled: no
2021-01-25 18:50:37 +00:00
- name: enable systemd service
systemd:
name: rtc-i2c.service
enabled: yes