diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-02-15 21:40:00 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-02-15 21:40:00 +0100 |
commit | aa3a3b386680887232942e36e91559e214362a06 (patch) | |
tree | 2d982878fea14da8519e8e43a16dacb63a15e960 | |
parent | ac7419f50e71c147eb7c60ff69527cb783fc67c4 (diff) | |
download | puppet.KATH-aa3a3b386680887232942e36e91559e214362a06.tar.gz puppet.KATH-aa3a3b386680887232942e36e91559e214362a06.tar.bz2 puppet.KATH-aa3a3b386680887232942e36e91559e214362a06.zip |
site.pp: Assure that CUPS Browse Polling works on Debian Edu 11. Esp. an extra apparmor rule in usr.sbin.cups-browsed profile is required.
-rw-r--r-- | code/environments/production/manifests/site.pp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/code/environments/production/manifests/site.pp b/code/environments/production/manifests/site.pp index 4b04202..3e2ec9b 100644 --- a/code/environments/production/manifests/site.pp +++ b/code/environments/production/manifests/site.pp @@ -173,9 +173,15 @@ class debianeducacert_2_cacerts { class cups_browsed_polling { + file { '/etc/apparmor.d/local/usr.sbin.cups-browsed': + content => "/etc/cups/cups-browsed-debian-edu.conf r,\n", + } + ~> exec { '/usr/bin/systemctl restart apparmor.service': refreshonly => true } + ~> exec { '/usr/bin/systemctl restart cups-browsed.service': refreshonly => true } + 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']], + subscribe => [File_line['cups-browsed-create-remote-cups-printers'], 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, } @@ -185,6 +191,13 @@ class cups_browsed_polling { refreshonly => true, } + file_line { 'cups-browsed-create-remote-cups-printers': + path => '/etc/cups/cups-browsed.conf', + ensure => present, + line => "CreateRemoteCUPSPrinterQueues Yes", + match => '^CreateRemoteCUPSPrinterQueues.*', + } + file_line { 'cups-browsed-no-remote-protos': path => '/etc/cups/cups-browsed.conf', ensure => present, |