Define variable for additional printer admin group
Add a new variable `printer_admin_group` to specify additional CUPS admin group. When set to `role-teacher`, teachers will have the ability to add and remove printers.
This commit is contained in:
parent
aa990c388b
commit
e52c01615c
3 changed files with 495 additions and 491 deletions
2
roles/lmn_printer/defaults/main.yml
Normal file
2
roles/lmn_printer/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
printer_admin_group: ""
|
|
@ -34,10 +34,10 @@
|
|||
- name: Allow group role-teacher to manage printers
|
||||
ansible.builtin.lineinfile:
|
||||
dest: /etc/cups/cups-files.conf
|
||||
line: 'SystemGroup root lpadmin role-teacher'
|
||||
line: "SystemGroup root lpadmin {{ printer_admin_group }}"
|
||||
regexp: '^SystemGroup'
|
||||
state: present
|
||||
when: "'teacherlaptop' in group_names"
|
||||
when: printer_admin_group | length
|
||||
|
||||
- name: Disable cups-browsed
|
||||
ansible.builtin.systemd:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue