From 283b85ea3ef7f35af35deadd28a0b52412b03e80 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Fri, 8 Feb 2019 07:42:41 +0100 Subject: [PATCH] Feat: install epaper driver --- rpi3.yml | 1 + tasks/epaper_driver.yml | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 tasks/epaper_driver.yml diff --git a/rpi3.yml b/rpi3.yml index 1a064d6..e13f6c3 100644 --- a/rpi3.yml +++ b/rpi3.yml @@ -14,6 +14,7 @@ - include: tasks/sudo.yml - include: tasks/ssh.yml - include: tasks/dotfiles.yml + - include: tasks/epaper_driver.yml handlers: - name: restart sshd diff --git a/tasks/epaper_driver.yml b/tasks/epaper_driver.yml new file mode 100644 index 0000000..733a657 --- /dev/null +++ b/tasks/epaper_driver.yml @@ -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 +