diff --git a/providers/hosted_repository.rb b/providers/hosted_repository.rb index 997dd26..72e810d 100644 --- a/providers/hosted_repository.rb +++ b/providers/hosted_repository.rb @@ -31,7 +31,7 @@ def load_current_resource action :create do unless repository_exists?(@current_resource.name) - Chef::Nexus.nexus(node).create_repository(new_resource.name, false, nil, nil, nil, nil) + Chef::Nexus.nexus(node).create_repository(new_resource.name, false, nil, nil, new_resource.policy, nil) set_publisher if new_resource.publisher new_resource.updated_by_last_action(true) end diff --git a/providers/proxy_repository.rb b/providers/proxy_repository.rb index 317e25b..d4babb5 100644 --- a/providers/proxy_repository.rb +++ b/providers/proxy_repository.rb @@ -31,7 +31,7 @@ def load_current_resource action :create do unless repository_exists?(@current_resource.name) - Chef::Nexus.nexus(node).create_repository(new_resource.name, true, new_resource.url, nil, nil, nil) + Chef::Nexus.nexus(node).create_repository(new_resource.name, true, new_resource.url, nil, new_resource.policy, nil) set_publisher if new_resource.publisher set_subscriber if new_resource.subscriber new_resource.updated_by_last_action(true) diff --git a/resources/hosted_repository.rb b/resources/hosted_repository.rb index a407fec..8a42da4 100644 --- a/resources/hosted_repository.rb +++ b/resources/hosted_repository.rb @@ -23,3 +23,4 @@ attribute :name, :kind_of => String, :name_attribute => true attribute :publisher, :kind_of => [TrueClass, FalseClass], :default => nil +attribute :policy, :kind_of => String, :default => nil diff --git a/resources/proxy_repository.rb b/resources/proxy_repository.rb index 72018c9..fcd39ed 100644 --- a/resources/proxy_repository.rb +++ b/resources/proxy_repository.rb @@ -23,6 +23,7 @@ attribute :name, :kind_of => String, :name_attribute => true attribute :url, :kind_of => String, :required => true +attribute :policy, :kind_of => String, :default => nil attribute :publisher, :kind_of => [TrueClass, FalseClass], :default => nil attribute :subscriber, :kind_of => [TrueClass, FalseClass], :default => nil attribute :preemptive_fetch, :kind_of => [TrueClass, FalseClass], :default => false