diff options
author | Thom May <thom@may.lt> | 2017-08-25 10:10:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-25 10:10:06 +0100 |
commit | a945d8fbcd1792a6c42837bc0bee981a8f9d8475 (patch) | |
tree | 699e5e0eafbb3cc7756ab377de8d95432ed6595b | |
parent | ce06d947971624275f7138a4c9b2f1ea0b4b65be (diff) | |
parent | 1ffa1998d66df9aa6c85be6d9d195470d7340278 (diff) | |
download | chef-a945d8fbcd1792a6c42837bc0bee981a8f9d8475.tar.gz |
Merge pull request #6348 from chef/zypper_repo_fix
Auto import gpg keys in zypper_repository
-rw-r--r-- | lib/chef/provider/zypper_repository.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/zypper_repository.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/zypper_repository.rb b/lib/chef/provider/zypper_repository.rb index 83d3f9982e..805741706b 100644 --- a/lib/chef/provider/zypper_repository.rb +++ b/lib/chef/provider/zypper_repository.rb @@ -57,7 +57,7 @@ class Chef end action :refresh do - declare_resource(:execute, "zypper refresh #{escaped_repo_name}") do + declare_resource(:execute, "zypper#{' --gpg-auto-import-keys' if new_resource.gpgautoimportkeys} refresh #{escaped_repo_name}") do only_if "zypper lr #{escaped_repo_name}" end end diff --git a/lib/chef/resource/zypper_repository.rb b/lib/chef/resource/zypper_repository.rb index 11db8642b2..69a96b42cf 100644 --- a/lib/chef/resource/zypper_repository.rb +++ b/lib/chef/resource/zypper_repository.rb @@ -39,6 +39,7 @@ class Chef property :mode, default: "0644" property :refresh_cache, [true, false], default: true property :source, String, regex: /.*/ + property :gpgautoimportkeys, [true, false], default: true default_action :create allowed_actions :create, :remove, :add, :refresh |