You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add attribute inspec_version to the configuration, for instance:
"inspec_version": "1.17.0"
Expected Result:
Gem is re-installed if not installed or has another version
Actual Result:
Gem is reinstalledd each chef-client run, even if it is already the configured version. The resource has no check for the installed version and always remove installed and install ne gem if version is specified.
Cookbook version
3.0.0
Chef-client version
12.9.29
Platform Details
RHEL 7.3
Scenario:
Install particular version of inspec gem
Steps to Reproduce:
Add attribute inspec_version to the configuration, for instance:
"inspec_version": "1.17.0"
Expected Result:
Gem is re-installed if not installed or has another version
Actual Result:
Gem is reinstalledd each chef-client run, even if it is already the configured version. The resource has no check for the installed version and always remove installed and install ne gem if version is specified.
Here is the output:
Recipe: audit::inspec
inspec_gem[inspec] action install[2017-05-02T12:45:04+02:00] INFO: Processing inspec_gem[inspec] action install (audit::inspec line 20)
chef_gem[remove all inspec versions] action remove[2017-05-02T12:45:04+02:00] INFO: Processing chef_gem[remove all inspec versions] action remove (/var/chef/cache/cookbooks/audit/resources/inspec_gem.rb line 41)
[2017-05-02T12:45:05+02:00] INFO: chef_gem[remove all inspec versions] removed
chef_gem[remove all train versions] action remove[2017-05-02T12:45:05+02:00] INFO: Processing chef_gem[remove all train versions] action remove (/var/chef/cache/cookbooks/audit/resources/inspec_gem.rb line 46)
[2017-05-02T12:45:05+02:00] INFO: chef_gem[remove all train versions] removed
chef_gem[inspec] action install[2017-05-02T12:45:05+02:00] INFO: Processing chef_gem[inspec] action install (/var/chef/cache/cookbooks/audit/resources/inspec_gem.rb line 32)
ERROR: SSL verification error at depth 0: self signed certificate (18)
ERROR: Certificate /C=US/O=YouCorp/OU=Operations/CN=clrv0000000070.ic.ing.net is not trusted
[2017-05-02T12:45:07+02:00] INFO: chef_gem[inspec] installed inspec at 1.17.0
chef_gem[remove all inspec versions] action remove[2017-05-02T12:45:07+02:00] INFO: Processing chef_gem[remove all inspec versions] action remove (/var/chef/cache/cookbooks/audit/resources/inspec_gem.rb line 41)
[2017-05-02T12:45:08+02:00] INFO: chef_gem[remove all inspec versions] removed
chef_gem[remove all train versions] action remove[2017-05-02T12:45:08+02:00] INFO: Processing chef_gem[remove all train versions] action remove (/var/chef/cache/cookbooks/audit/resources/inspec_gem.rb line 46)
[2017-05-02T12:45:09+02:00] INFO: chef_gem[remove all train versions] removed
chef_gem[inspec] action install[2017-05-02T12:45:09+02:00] INFO: Processing chef_gem[inspec] action install (/var/chef/cache/cookbooks/audit/resources/inspec_gem.rb line 32)
[2017-05-02T12:45:10+02:00] INFO: chef_gem[inspec] installed inspec at 1.17.0
[2017-05-02T12:45:10+02:00] INFO: loading handler from /var/chef/cache/cookbooks/audit/files/default/handler/audit_report
The text was updated successfully, but these errors were encountered: