reformat cups role

This commit is contained in:
Pig Monkey 2020-11-25 14:42:50 -08:00
parent c7af7ef697
commit 7d18859c3b

View file

@ -11,20 +11,29 @@
state: present
- name: Add a print admin group
group: name=printadmin state=present
group:
name: printadmin
state: present
- name: Allow the print admin group to administer CUPS
lineinfile: dest=/etc/cups/cups-files.conf
regexp=^SystemGroup
state=present
line="SystemGroup sys root printadmin"
lineinfile:
dest: /etc/cups/cups-files.conf
regexp: SystemGroup
state: present
line: "SystemGroup sys root printadmin"
notify:
- restart cups
- name: Add the user to the print and print admin groups
user: name={{ user.name }} groups=printadmin,lp append=yes
user:
name: "{{ user.name }}"
groups: printadmin,lp
append: yes
tags:
- user
- name: Enable and start CUPS
service: name=cups.service enabled=yes state=started
service:
name: cups.service
enabled: yes
state: started