[Bug 744375] lint and tidy acl module



Comment # 2 on bug 744375 from Andrea Veri
As a side note for future patches: defined types cannot be included, that means
you should include them into a class and then reference them appropriately or
directly not include them within a class and call them in the form of
module_name::defined_type_name { $var1 => 'foo', $var2 => 'bar' }. In the above
patch calling a defined type was going to be painfully long: acl::acl::group as
you've defined it with 'acl::group' and not with just 'group' as it should be,
calling it was then a matter of 'acl:group'.

Another issue arises if you leave the manifest as it was before and include the
acl class on each of the defined type files (for gawk to be actually available)
and make use of multiple acl classes on the same manifest or node file. Puppet
won't be able to compile the manifest as the package resource in charge of
installing gawk will error out saying there are multiple package definitions
trying to install the same package name. The setup that should ideally work out
is including the acl subclasses within the acl class [1] and then including the
acl class as a whole on the node/manifest file you need the defined types to be
available in. From there you just reference the relevant defined type this way:
"acl::group::acl_group { $var1 => 'foo', $var2 => 'bar' }" with no way to hit a
duplicate defined resource error in case you will be including another
acl::group or acl::user entry.

Let me know what do you think ;)

[1]
https://infrastructure.gnome.org/browse/puppet/tree/modules/acl/manifests/init.pp


You are receiving this mail because:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]