diff options
-rw-r--r-- | lib/chef/provider/support/yum_repo.erb | 6 | ||||
-rw-r--r-- | lib/chef/resource/yum_repository.rb | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/chef/provider/support/yum_repo.erb b/lib/chef/provider/support/yum_repo.erb index 6f1325573d..f60d8688da 100644 --- a/lib/chef/provider/support/yum_repo.erb +++ b/lib/chef/provider/support/yum_repo.erb @@ -61,6 +61,9 @@ keepalive=1 <% if @config.metadata_expire %> metadata_expire=<%= @config.metadata_expire %> <% end %> +<% if @config.metalink %> +metalink=<%= @config.metalink %> +<% end %> <% if @config.mirrorlist %> mirrorlist=<%= @config.mirrorlist %> <% end %> @@ -112,6 +115,9 @@ sslclientkey=<%= @config.sslclientkey %> <% unless @config.sslverify.nil? %> sslverify=<%= ( @config.sslverify ) ? 'true' : 'false' %> <% end %> +<% if @config.throttle %> +throttle=<%= @config.throttle %> +<% end %> <% if @config.timeout %> timeout=<%= @config.timeout %> <% end %> diff --git a/lib/chef/resource/yum_repository.rb b/lib/chef/resource/yum_repository.rb index 54a0a96aad..012a74908a 100644 --- a/lib/chef/resource/yum_repository.rb +++ b/lib/chef/resource/yum_repository.rb @@ -24,7 +24,8 @@ class Chef resource_name :yum_repository provides :yum_repository - # http://linux.die.net/man/5/yum.conf + # http://linux.die.net/man/5/yum.conf as well as + # http://dnf.readthedocs.io/en/latest/conf_ref.html property :baseurl, [String, Array], regex: /.*/ property :clean_headers, [TrueClass, FalseClass], default: false # deprecated property :clean_metadata, [TrueClass, FalseClass], default: true @@ -44,6 +45,7 @@ class Chef property :make_cache, [TrueClass, FalseClass], default: true property :max_retries, [String, Integer] property :metadata_expire, String, regex: [/^\d+$/, /^\d+[mhd]$/, /never/] + property :metalink, String, regex: /.*/ property :mirror_expire, String, regex: [/^\d+$/, /^\d+[mhd]$/] property :mirrorexpire, String, regex: /.*/ property :mirrorlist_expire, String, regex: [/^\d+$/, /^\d+[mhd]$/] @@ -65,6 +67,7 @@ class Chef property :sslclientkey, String, regex: /.*/ property :sslverify, [TrueClass, FalseClass] property :timeout, String, regex: /^\d+$/ + property :throttle, [String, Integer] property :username, String, regex: /.*/ default_action :create |