summaryrefslogtreecommitdiff
path: root/code/environments/production/manifests/site.pp
diff options
context:
space:
mode:
Diffstat (limited to 'code/environments/production/manifests/site.pp')
-rw-r--r--code/environments/production/manifests/site.pp7
1 files changed, 7 insertions, 0 deletions
diff --git a/code/environments/production/manifests/site.pp b/code/environments/production/manifests/site.pp
index a8560f7..ad872fc 100644
--- a/code/environments/production/manifests/site.pp
+++ b/code/environments/production/manifests/site.pp
@@ -154,12 +154,19 @@ class ldapservercert_renewal {
}
class cups_browsed_polling {
+
exec { 'cups-browsed-reload':
command => '/usr/sbin/service cups-browsed restart',
subscribe => [File_line['cups-browsed-poll-ipp-intern'], File_line['cups-browsed-queue-naming'], File_line['cups-browsed-no-remote-protos'], File_line['cups-browsed-no-local-protos']],
refreshonly => true,
}
+ exec { 'cups-delete-dead-printers':
+ command => '/usr/bin/bash -c "LANG=C lpstat -a | grep \"not accepting requests\" | cut -d \" \" -f1 | while read printer; do lpadmin -x \$printer; done"',
+ subscribe => File_line['cups-browsed-no-remote-protos'],
+ refreshonly => true,
+ }
+
file_line { 'cups-browsed-no-remote-protos':
path => '/etc/cups/cups-browsed.conf',
ensure => present,