Allow defining a list of tools in webclip url via inventory variables

This commit is contained in:
Adam Goldsmith 2021-11-17 18:54:07 -05:00
parent 695a7ba8c4
commit 74e985c823
3 changed files with 14 additions and 3 deletions

6
hosts
View File

@ -1,7 +1,13 @@
# -*- mode: yaml; -*-
ipads:
hosts:
iPad2:
iPad3:
reservation_tools:
- 3d printer, Lulzbot Taz 6
- 3d printer, Lulzbot Mini
- Laser Cutter, GLS Hybrid
vars:
ansible_ssh_user: mobile
ansible_ssh_pass: alpine

View File

@ -18,9 +18,14 @@
- name: Install packages
command: apt-get install -y --force-yes net.angelxwind.mikoto libactivator com.rpetrich.monocle
- name: Copy webclip
become: false
template:
src: reservations_display.webclip/Info.plist
dest: /var/mobile/Library/WebClips/reservations_display.webclip/
- name: Copy webclip icon
become: false
copy:
src: reservations_display.webclip
dest: /var/mobile/Library/WebClips/
src: reservations_display.webclip/icon.png
dest: /var/mobile/Library/WebClips/reservations_display.webclip/
- name: Respring
command: killall SpringBoard

View File

@ -17,6 +17,6 @@
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleGray</string>
<key>URL</key>
<string>http://10.12.42.247:8080/</string>
<string>https://reservations.claremontmakerspace.org/{% if reservation_tools is defined %}?tool={{ reservation_tools | map('urlencode') | join(';') }}{% endif %}</string>
</dict>
</plist>