diff --git a/packer/ansible/roles/inkscape/files/inkscape-silhouette b/packer/ansible/roles/inkscape/files/inkscape-silhouette index 6b1d818..8afe49a 160000 --- a/packer/ansible/roles/inkscape/files/inkscape-silhouette +++ b/packer/ansible/roles/inkscape/files/inkscape-silhouette @@ -1 +1 @@ -Subproject commit 6b1d81884cd2df50ee78a248b8c3a219695bd38c +Subproject commit 8afe49a2a52bb13bb2a34331e7c9625fb05529bf diff --git a/packer/ansible/roles/inkscape/tasks/silhouette.yml b/packer/ansible/roles/inkscape/tasks/silhouette.yml index 243de63..001291b 100644 --- a/packer/ansible/roles/inkscape/tasks/silhouette.yml +++ b/packer/ansible/roles/inkscape/tasks/silhouette.yml @@ -1,7 +1,9 @@ --- -- name: install python-usb +- name: install python-usb and usbip apt: - name: python-usb + name: + - python-usb + - usbip state: present - name: copy files @@ -10,8 +12,29 @@ dest: /usr/share/inkscape/extensions owner: root group: root - mode: "0644" loop: - sendto_silhouette.inx - sendto_silhouette.py - silhouette + +- name: usbip.sh should be executable + file: + dest: "/usr/share/inkscape/extensions/silhouette/usbip.sh" + owner: root + group: root + mode: "0755" + +- name: add lp group to guest account + lineinfile: + path: /etc/guest-account/groups + line: lp + create: yes + +- name: add sudoers config + copy: + content: "%lp ALL=(root) NOPASSWD:/usr/share/inkscape/extensions/silhouette/usbip.sh\n" + dest: /etc/sudoers.d/silhouette + owner: root + group: root + mode: "0644" + diff --git a/packer/ansible/roles/windowmanager/files/guest-account.sh b/packer/ansible/roles/windowmanager/files/guest-account.sh index 968fa5c..bedde26 100644 --- a/packer/ansible/roles/windowmanager/files/guest-account.sh +++ b/packer/ansible/roles/windowmanager/files/guest-account.sh @@ -23,7 +23,7 @@ fi # read list of supplementary groups of the guest account from file if [ -f /etc/guest-account/groups ]; then - GROUPS="$(cat /etc/guest-account/groups)" + GROUPS="$(awk '{ if (NR==1) printf "%s", $0; else printf ",%s", $0; } END { print "" }' /etc/guest-account/groups)" fi is_system_user ()