Skip to content

Commit

Permalink
(PUP-8730) Yumrepo Parameters: report_instanceid and fastestmirror_en…
Browse files Browse the repository at this point in the history
…abled

Update the Yumrepo type to include support for the parameters report_instanceid and fastestmirror_enabled.
Both parameters are defined by default on Amazon Linux AMIs and docker images.
report_instanceid is a valid requirement.
fastestmirror_enabled is defined in Amazon Linux, and supported by Chef already, but I am not convinced it does anything. I haven't yet found any applicable yum or fastestmirror plugin source code that consumes this parameter.
  • Loading branch information
Zordrak committed May 15, 2018
1 parent 53c88ad commit ae4254d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/puppet/type/yumrepo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -427,4 +427,22 @@
newvalues(/.*/, :absent)
sensitive true
end

newproperty(:report_instanceid) do
desc "Determines if yum reports an AWS instanceid and region as a URL parameter when downloading packages.
#{YUM_BOOLEAN_DOC}
#{ABSENT_DOC}"

newvalues(YUM_BOOLEAN, :absent)
munge(&munge_yum_bool)
end

newproperty(:fastestmirror_enabled) do
desc "Determines if the fastestmirror plugin is enabled for this repository.
#{YUM_BOOLEAN_DOC}
#{ABSENT_DOC}"

newvalues(YUM_BOOLEAN, :absent)
munge(&munge_yum_bool)
end
end

0 comments on commit ae4254d

Please sign in to comment.