After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744375 - lint and tidy acl module
lint and tidy acl module
Status: RESOLVED FIXED
Product: sysadmin
Classification: Infrastructure
Component: Apprentices
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Sysadmins
GNOME Sysadmins
Depends on:
Blocks:
 
 
Reported: 2015-02-12 08:38 UTC by matanya
Modified: 2015-04-07 15:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lint acl module (3.56 KB, patch)
2015-02-12 08:38 UTC, matanya
none Details | Review

Description matanya 2015-02-12 08:38:50 UTC
Created attachment 296660 [details] [review]
lint acl module

This change corrects the module layout, fix syntax and lint issues.
Comment 1 Andrea Veri 2015-04-07 13:54:43 UTC
Merged. Thanks!
Comment 2 Andrea Veri 2015-04-07 15:48:07 UTC
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