diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-02 10:26:54 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-02 10:26:54 -0700 |
commit | bef110cb38d25308d8334557bfe12dcdeace66b8 (patch) | |
tree | fbf593e4b4c47310dd48484c035b0bb5b370ae8f /lib/chef/application.rb | |
parent | 3945739ebb631226101a9754fbc6d0479063a8b9 (diff) | |
download | chef-bef110cb38d25308d8334557bfe12dcdeace66b8.tar.gz |
Chef-13: turn on zypper gpg checks by defaultlcg/zypper-gpg
Adds a gpg_check property to the resource to turn them off on a
per-resource basis. The global config is also preserved. The
global config will warn once if you have it set to turn off
gpg checks. The per-resource property will not warn (presumably
you know you're doing something bad when you turn it off).
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/application.rb')
-rw-r--r-- | lib/chef/application.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/application.rb b/lib/chef/application.rb index 86078300c2..eba0d48e57 100644 --- a/lib/chef/application.rb +++ b/lib/chef/application.rb @@ -48,6 +48,7 @@ class Chef configure_chef configure_logging configure_encoding + emit_warnings end # Get this party started @@ -79,6 +80,10 @@ class Chef end end + def emit_warnings + Chef::Log.warn "Chef::Config[:zypper_check_gpg] is set to false which disables security checking on zypper packages" unless Chef::Config[:zypper_check_gpg] + end + # Parse configuration (options and config file) def configure_chef parse_options |