74 lines
1.4 KiB
YAML
74 lines
1.4 KiB
YAML
---
|
|
- name: install sane
|
|
apt:
|
|
name:
|
|
- sane-utils
|
|
- sane-airscan
|
|
- avahi-daemon
|
|
state: present
|
|
tags:
|
|
- packages
|
|
|
|
# AirSane: https://github.com/SimulPiscator/AirSane
|
|
# $ cd githu/
|
|
# $ git clone https://github.com/SimulPiscator/AirSane
|
|
# $ mkdir ~/tmp/airscan
|
|
# $ cd ~/tmp/airscan
|
|
# $ cmake ~/github/AirScan
|
|
# $ make
|
|
# $ sudo make install
|
|
# $ sudo systemctl enable airsaned
|
|
# $ sudo systemctl start airsaned
|
|
#
|
|
# Check http://${hostname}:8090/
|
|
- name: install build dependencies for AirSane
|
|
apt:
|
|
name:
|
|
- libsane-dev
|
|
- libjpeg-dev
|
|
- libpng-dev
|
|
- libavahi-client-dev
|
|
- libusb-dev
|
|
- libusb-1.0-0-dev
|
|
- cmake
|
|
- g++
|
|
state: present
|
|
tags:
|
|
- packages
|
|
|
|
- name: saned config files
|
|
template:
|
|
src: "{{ item }}.j2"
|
|
dest: /etc/sane.d/{{ item }}
|
|
with_items:
|
|
- saned.conf
|
|
- net.conf
|
|
- dll.conf
|
|
loop_control:
|
|
label: "{{ item }}"
|
|
notify:
|
|
- restart saned
|
|
- systemctl daemon-reload
|
|
|
|
- name: saned systemd units
|
|
copy:
|
|
src: "{{ item }}"
|
|
dest: "/etc/systemd/system/{{ item }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
with_items:
|
|
- saned.socket
|
|
- saned@.service
|
|
notify:
|
|
- systemctl daemon-reload
|
|
|
|
- name: start and enable systemd units
|
|
service:
|
|
name: "{{ item }}"
|
|
enabled: true
|
|
state: started
|
|
with_items:
|
|
- avahi-daemon.service
|
|
- saned.socket
|