Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: Config create resources pattern #37

Merged

Conversation

lamawithonel
Copy link

@lamawithonel lamawithonel commented Jan 20, 2017

This is a PR to address #36.

@lamawithonel lamawithonel force-pushed the config_create_resources_pattern branch from 54f13cc to 28b0c8f Compare January 20, 2017 20:05
@lamawithonel lamawithonel changed the title WIP: Config create resources pattern Config create resources pattern Jan 20, 2017
@lamawithonel lamawithonel force-pushed the config_create_resources_pattern branch 3 times, most recently from 1e14259 to b9b6edb Compare January 20, 2017 20:28
This commit sets the data provider to Hiera.  A previous update added
the `hiera.yaml` file and `/data` directories, but they have not
actually been used.  It went unnoticed, because they were empty.  Fixing
this allows future changes to use the module data system.
@lamawithonel lamawithonel force-pushed the config_create_resources_pattern branch 4 times, most recently from 8a9abf3 to caa7c54 Compare January 23, 2017 22:27
This commit implements the `create_resources()` pattern for
`Yum::Config` defined types using Puppet 4 features.  The
`create_resources()` pattern takes a Hash of resource names and their
attributes and iterates over them to declare a set of resources.
Because this pattern allows virtually any `yum.conf(5)` option to be
passed to the module, this commit also removes most of the default
`Yum::Config` resources.  The only exception is `installonly_limit`,
which is retained for resource dependency resolution with
`Exec['package-cleanup_oldkernels']`, however the default value was
modified to match the upstream default.

In addition to standard `key => { hash_of_attributes }`, the new
parameter interface also accepts a more streamlined `key => value`
syntax.  Further, values defined as a Boolean will be converted to
Strings, either `0` or `1`.
@lamawithonel lamawithonel force-pushed the config_create_resources_pattern branch from caa7c54 to 2247439 Compare January 26, 2017 15:49
Copy link

@cmentzer cmentzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@bastelfreak bastelfreak merged commit d286606 into voxpupuli:master Feb 1, 2017
@traylenator traylenator added backwards-incompatible enhancement New feature or request and removed enhancement New feature or request labels Jun 12, 2017
@traylenator traylenator changed the title Config create resources pattern BREAKING: Config create resources pattern Jun 14, 2017
@traylenator traylenator added the enhancement New feature or request label Jun 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants