Skip to content

Commit

Permalink
Add VueScan-installing Ansible role.
Browse files Browse the repository at this point in the history
  • Loading branch information
damiendart committed Dec 16, 2024
1 parent 723519b commit 5a152e7
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions playbook-provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- 'syncthing'
- 'tailscale'
- 'virtualbox'
- 'vuescan'
- 'webserver'
vars:
webserver__vhosts_cleanup: '{{ cli__website_cleanup | default(False) }}'
Expand Down
18 changes: 18 additions & 0 deletions roles/vuescan/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file was written by Damien Dart, <[email protected]>. This is
# free and unencumbered software released into the public domain. For
# more information, please refer to the accompanying "UNLICENCE" file.

---

# VueScan releases are available at
# <https://www.hamrick.com/alternate-versions.html>.
vuescan__vuescan_package_checksum: 'sha256:96674ee595fb6ec7a047da9d653de49eff7c04474c3412a8007c23a8eb301b72'


# The following variables will have host-specific and/or sensitive
# values and must be defined elsewhere (in an inventory, playbook, at
# runtime, etc).

# A string containing the directory where downloaded files are stored to
# prevent unnecessary downloading when tasks are rerun.
vuescan__download_cache_directory: '{{ undef() }}'
6 changes: 6 additions & 0 deletions roles/vuescan/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file was written by Damien Dart, <[email protected]>. This is
# free and unencumbered software released into the public domain. For
# more information, please refer to the accompanying "UNLICENCE" file.

---
dependencies: []
26 changes: 26 additions & 0 deletions roles/vuescan/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This file was written by Damien Dart, <[email protected]>. This is
# free and unencumbered software released into the public domain. For
# more information, please refer to the accompanying "UNLICENCE" file.

---
- name: 'Ensure download cache directory exists'
ansible.builtin.file:
path: '{{ vuescan__download_cache_directory }}'
group: 'root'
mode: '0777'
owner: 'root'
state: 'directory'

- name: 'Ensure the VueScan Debian package is downloaded'
ansible.builtin.get_url:
checksum: '{{ vuescan__vuescan_package_checksum }}'
dest: '{{ vuescan__download_cache_directory }}/vuex6498.deb'
group: 'root'
mode: 0755
owner: 'root'
url: 'https://www.hamrick.com/files/vuex6498.deb'

- name: 'Ensure VueScan is installed'
ansible.builtin.apt:
deb: '{{ vuescan__download_cache_directory }}/vuex6498.deb'
state: 'present'

0 comments on commit 5a152e7

Please sign in to comment.