-
Notifications
You must be signed in to change notification settings - Fork 1
/
printers.yml
77 lines (71 loc) · 1.77 KB
/
printers.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
- name: Printers
hosts: physical
become: true
tasks:
- name: CUPS
pacman: name={{item}}
with_items:
- cups
- cups-pdf
- cups-pk-helper
notify:
- reload
- cups daemon
- name: CUPS daemon
service:
name: org.cups.cupsd
state: started
enabled: yes
- name: CUPS files config
lineinfile:
dest: /etc/cups/cups-files.conf
line: '{{item.key}} {{item.val}}'
regexp: '^{{item.key}} '
with_items:
- { key: SystemGroup, val: 'sys root wheel' }
- { key: AccessLog, val: syslog }
- { key: ErrorLog, val: syslog }
- { key: PageLog, val: syslog }
notify:
- cups daemon
- cfg perms
- name: CUPS daemon config
copy:
content: |
MaxLogSize 0
LogLevel debug
Listen localhost:631
Listen /run/cups/cups.sock
Browsing on
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface Yes
<Location />
Order deny,allow
</Location>
<Policy default>
JobPrivateAccess all
JobPrivateValues none
SubscriptionPrivateAccess all
SubscriptionPrivateValues none
<Limit All>
Order deny,allow
</Limit>
</Policy>
dest: /etc/cups/cupsd.conf
owner: root
group: lp
mode: 0644
notify:
- cups daemon
- cfg perms
handlers:
- name: reload
command: systemctl daemon-reload
- name: cups daemon
service:
name: org.cups.cupsd
state: restarted
- name: cfg perms
become: no
shell: 'set-all-facl -u /etc/cups/cups*.conf'