Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

More options should be configurable #77

Open
XaaT opened this issue Nov 29, 2018 · 12 comments
Open

More options should be configurable #77

XaaT opened this issue Nov 29, 2018 · 12 comments
Milestone

Comments

@XaaT
Copy link

XaaT commented Nov 29, 2018

First, thanks to making this module available.

I've edited manifests/init.pp and templates/cupsd.conf.erb to add configurable options like root_location_allow & deny for <Location /admin> [and /admin/conf, /admin/log, ...] (and also JobPrivateValues but i see there is nice pullrequest headed to the master, thx)

My case : i want to set up some cups servers in my work environment. I need to set many options in cupsd.conf and there is a lack of configurable options in this module.

I can't commit my changes because i haven't edited spec/classes/init_spec.rb to make it clean.

@leoarnold
Copy link
Owner

There is some work in progress on this in a side branch:

<Policy <%= policy %>>
JobPrivateAccess <%= config['JobPrivateAccess'] %>
JobPrivateValues <%= config['JobPrivateValues'] %>
SubscriptionPrivateAccess <%= config['SubscriptionPrivateAccess'] %>
SubscriptionPrivateValues <%= config['SubscriptionPrivateValues'] %>
<% config['Limit'].each do |actions, restrictions| -%>
<% next if actions == 'All' -%>
<%= " <Limit #{actions.join(' ')}>" %>
<% restrictions.each do |k, v| -%>
<%= " #{k} #{v}" %>
<% end -%>
</Limit>
<% end -%>
<Limit All>
<% config['Limit']['All'].each do |k, v| -%>
<%= " #{k} #{v}" %>
<% end -%>
</Limit>
</Policy>

When you look at the entire file, you will see the vast amount of conditional logic required - and there's (yet) no good way to unit test this template. Therefore, options will come, but it will take a while.

@leoarnold leoarnold added this to the 2.2.0 milestone Mar 10, 2019
@wiene
Copy link

wiene commented Mar 11, 2019

I also miss more configurable options, e. g. like MaxClients, MaxRequestSize, SystemGroup and browsing settings.

@leoarnold
Copy link
Owner

@wiene Just out of curiosity: Do you actually customize those settings. If so, what's the use case?

@wiene
Copy link

wiene commented Mar 16, 2019

@leoarnold, we are running a central CUPS server which is used by many desktops which only run CUPS clients getting their information via /etc/cups/client.conf. In such an environment the default value of MaxClients (100) is too small to handle all the clients. We use MaxRequestSize to prevent users from filling up /var/spool/cups with print files of ridiculous sizes. SystemGroup is used to specify a group of people allowed to perform administrative tasks.

@leoarnold
Copy link
Owner

@wiene Your suggested features will be available in version 2.1.0 which might ship as soon as today

@XaaT Your suggested features are scheduled for version 2.2.0 with no certain release date yet.

@leoarnold
Copy link
Owner

@wiene The SystemGroup directive is actually from cups-files.conf which is currently not under management by this module, but I am sure you already solved this with a file or augeas resource. So for now, I did not add that, but the other two are in.

@XaaT I noticed you also referred to <Location [path]> in your issue and I am happy to announce that these will already be available in version 2.1.0.

@wiene
Copy link

wiene commented Mar 25, 2019

@leoarnold I just tried the new options and they work like a charm. Many thanks!

@XaaT
Copy link
Author

XaaT commented Mar 26, 2019

@leoarnold many thanks

@olifre
Copy link

olifre commented Apr 8, 2019

I'd also love to be able to configure PageLogFormat. Currently, it's explicitly set to being empty, which forcefully disables the page log (that is the default on newer cups versions, but not the default on older versions).

@leoarnold
Copy link
Owner

@olifre All logging directives are now available in v2.2.0. BTW: I was surprised to find out on the man page cupsd.conf(5) that the PageLogFormat directive is deprecated.

@olifre
Copy link

olifre commented Apr 23, 2019

All logging directives are now available in v2.2.0.

Thanks, I can confirm the ones which I used are working well, and especially PageLogFormat now logs by default. Thanks!

BTW: I was surprised to find out on the man page cupsd.conf(5) that the PageLogFormat directive is deprecated.

That's indeed very surprising. Searching through the upstream repo, I only find this was moved to the deprecated section as part of apple/cups@7c7347a#diff-5fd263051ec60d5ec6a16f84d269e8c5 without explanation. Strange.

@arlt
Copy link

arlt commented Sep 18, 2020

@leoarnold There are several open requests regarding configuration options. e.g.

... and i would add SSLOptions to the list (to be able to set MinTLS1.2).

How about a config hash instead of (or in addition to) the single options for _directives.erb?
man cupsd.conf shows many options. I think it would be the best to switch to (or add) a config hash...

And a last note: This module saved us so much time - many thanks!
With a little converter (export from Windows domain) it manages all Linux printer queues automatically.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants