-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Manage yumrepos via data #40
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand this correctly you are providing default repos for the respective OS. If this is true, this IMHO shouldn't be enabled by default. Just enabling the management of yum shouldn't touch the yumrepos at all.
@@ -27,6 +27,7 @@ | |||
default_facts.merge!(YAML.load(File.read(File.expand_path('../default_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_facts.yml', __FILE__)) | |||
default_facts.merge!(YAML.load(File.read(File.expand_path('../default_module_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_module_facts.yml', __FILE__)) | |||
c.default_facts = default_facts | |||
c.hiera_config = File.expand_path(File.join(__FILE__, '../fixtures/hiera.yaml')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this will be overriden by modulesync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as spec_helper.rb
goes, I've filed a modulesync_config PR (voxpupuli/modulesync_config#317).
bd8d391
to
4b0e6bd
Compare
@vinzent This latest version adds a parameter to toggle management of the OS repos, defaulting to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is complex, but does what's expected for people looking for this functionality.
manifests/init.pp
Outdated
# @param manage_os_default_repos [Boolean] | ||
# Whether or not to add an operating system's default repos to the `managed_repos` array. | ||
# | ||
# @note Currently only valid on CentOS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parameter is valid on other OSs, but os_default_repos
will provide no defaults for any OS other than CentOS 6/7. Perhaps say something like "currently only provides defaults for CentOS" on the os_default_repos
parameter instead?
This commit adds parameters to manage Yumrepo resources via data. The primary parameter, `repos`, is a hash of Yumrepo resources for digestion by an each loop similar to an old `create_resources()` call. It does nothing on its own, acting only as a source of data. The othe parameters control the behavior of the resource instantiation loop. The parameters `managed_repos`, `os_default_repos`, and `repo_exclusions` each take an array of key names from the `repos` hash. They are then combined to select a set of repos from the `repos` hash for instantiation. The formula takes one of the following two forms: `managed_repos` - `repo_exclusions` OR, if `manage_os_default_repos` is set to `true` `managed_repos` + `os_default_repos` - `repo_exclusions` Data is included for most of the CentOS default repositories, with the exception of the "archive" repos.
This commit makes the following fixups to the README file: * Bring header tags and titles in line with the Puppet, Inc. skeleton * Standardize on non-wrapped text * Clarifies documentation for `yum::versionlock` and `yum::install`
I've added a whole bunch of examples to the README. Hopefully they shed some light on why this is useful. |
This commit adds parameters to manage Yumrepo resources via data. The
primary parameter,
repos
, is simply a hash of Yumrepo resources fordigestion by an each loop similar to an old
create_resources()
call.It does nothing on its own, acting only as a source of data. The other
parameters control the behavior of the resource instantiation loop.
The parameters
managed_repos
,os_default_repos
, andrepo_exclusions
each take an array of key names from therepos
hash.They are then combined to select a set of repos from the
repos
hashfor instantiation. The formula takes one of the following two forms:
OR, if
manage_os_default_repos
is set totrue
Data is included for most of the CentOS default repositories, with the
exception of the "archive" repos.