Feat: install epaper driver

This commit is contained in:
Bertrand Benjamin 2019-02-08 07:42:41 +01:00
parent cc4e16b795
commit 283b85ea3e
2 changed files with 47 additions and 0 deletions

View File

@ -14,6 +14,7 @@
- include: tasks/sudo.yml - include: tasks/sudo.yml
- include: tasks/ssh.yml - include: tasks/ssh.yml
- include: tasks/dotfiles.yml - include: tasks/dotfiles.yml
- include: tasks/epaper_driver.yml
handlers: handlers:
- name: restart sshd - name: restart sshd

46
tasks/epaper_driver.yml Normal file
View File

@ -0,0 +1,46 @@
---
- name: install required dependencies
apt:
name: "{{item}}"
state: present
update_cache: yes
with_items:
- git
- libfuse-dev
- fonts-liberation
- python-pil
- name: check if the epd-fuse service exists
command: systemctl status epd-fuse.service
check_mode: no
failed_when: False
changed_when: False
register: epd_fuse_service
- name: clone the embeddedartists gratis repository
git:
repo: https://github.com/embeddedartists/gratis.git
dest: /home/pi/gratis
- name: build the EPD driver and install the epd-fuse service
shell: >
COG_VERSION=V2 make rpi-epd_fuse &&
COG_VERSION=V2 make rpi-install
args:
chdir: /home/pi/gratis/PlatformWithOS
when: epd_fuse_service.rc != 0
- name: ensure the epd-fuse service is enabled and started
service:
name: epd-fuse
state: started
enabled: yes
- name: install the epd-clock service
copy:
src: epd-clock.service
dest: /etc/systemd/system/epd-clock.service
owner: root
group: root
mode: 0644