Skip to content

Commit

Permalink
added support for username and password
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk committed Apr 3, 2014
1 parent 7282923 commit fddd3f3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions attributes/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
default['yum']['main']['proxy'] = nil # /.*/
default['yum']['main']['proxy_password'] = nil # /.*/
default['yum']['main']['proxy_username'] = nil # /.*/
default['yum']['main']['username'] = nil # /.*/
default['yum']['main']['password'] = nil # /.*/
default['yum']['main']['recent'] = nil # /^\d+$/
default['yum']['main']['repo_gpgcheck'] = nil # [TrueClass, FalseClass]
default['yum']['main']['reset_nice'] = nil # [TrueClass, FalseClass]
Expand Down
2 changes: 2 additions & 0 deletions resources/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
attribute :proxy, :kind_of => String, :regex => /.*/, :default => nil
attribute :proxy_username, :kind_of => String, :regex => /.*/, :default => nil
attribute :proxy_password, :kind_of => String, :regex => /.*/, :default => nil
attribute :username, :kind_of => String, :regex => /.*/, :default => nil
attribute :password, :kind_of => String, :regex => /.*/, :default => nil
attribute :report_instanceid, :kind_of => [TrueClass, FalseClass], :default => nil
attribute :repositoryid, :kind_of => String, :regex => /.*/, :name_attribute => true
attribute :skip_if_unavailable, :kind_of => [TrueClass, FalseClass], :default => nil
Expand Down
6 changes: 6 additions & 0 deletions templates/default/main.erb
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ proxy_password=<%= @config.proxy_password %>
<% if @config.proxy_username %>
proxy_username=<%= @config.proxy_username %>
<% end %>
<% if @config.username %>
username=<%= @config.username %>
<% end %>
<% if @config.password %>
password=<%= @config.password %>
<% end %>
<% if @config.recent %>
recent=<%= @config.recent %>
<% end %>
Expand Down
6 changes: 6 additions & 0 deletions templates/default/repo.erb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ proxy_username=<%= @config.proxy_username %>
<% if @config.proxy_password %>
proxy_password=<%= @config.proxy_password %>
<% end %>
<% if @config.username %>
username=<%= @config.username %>
<% end %>
<% if @config.password %>
password=<%= @config.password %>
<% end %>
<% if @config.max_retries %>
retries=<%= @config.max_retries %>
<% end %>
Expand Down

0 comments on commit fddd3f3

Please sign in to comment.