-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy #17
Proxy #17
Conversation
@@ -53,7 +53,11 @@ def add_key | |||
end | |||
|
|||
def add_key_from_key_server | |||
command = "gpg --keyserver #{resource[:key_server]} --recv-keys #{resource[:key_id]}" | |||
if resource[:proxy].empty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my environment, I had to set this to .nil? With .empty? I received the following:
Debug: Executing 'gpg --list-keys --with-colons D39DC0E3'
Error: Could not set 'present' on ensure: undefined method empty?' for nil:NilClass at 13:/root/sysadmin-puppet/modules/rvm/manifests/gnupg_key.pp Error: Could not set 'present' on ensure: undefined method
empty?' for nil:NilClass at 13:/root/sysadmin-puppet/modules/rvm/manifests/gnupg_key.pp
Wrapped exception:
undefined method empty?' for nil:NilClass Error: /Stage[main]/Rvm::Gnupg_key/Gnupg_key[rvm_D39DC0E3]/ensure: change from absent to present failed: Could not set 'present' on ensure: undefined method
empty?' for nil:NilClass at 13:/root/sysadmin-puppet/modules/rvm/manifests/gnupg_key.pp
After setting to "if resource[:proxy].nil?" receive the below:
Debug: Executing 'gpg --list-keys --with-colons D39DC0E3'
Debug: Executing 'gpg --keyserver hkp://keys.gnupg.net --keyserver-options http-proxy=http://myproxy.company.com:80 --recv-keys D39DC0E3'
ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
puppet 3.8.7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work on this, minus the 1 note pertaining to ?empty ?nil on the resource it works great.
Is this PR ready to merge? I'd love proxy support |
We need proxy support... Ping |
sure ... i will release the new version this week, however let me test it properly on different environments. |
This works well in our environment on CentOS 7.2 |
I'm getting the error about empty? now as well. We recently switched to puppet 4, so maybe that's it. |
I think empty works in puppet 3 and nil works in puppet 4... |
@edestecd I hit this in 3.8.7 puppet with ruby 2.0.0 .. see above for error (seems the same from your description) with potential fix (we are running this diff with fix in our production env). From above comment: In my environment, I had to set this to .nil? With .empty? I received the following: Debug: Executing 'gpg --list-keys --with-colons D39DC0E3' After setting to "if resource[:proxy].nil?" receive the below: Debug: Executing 'gpg --list-keys --with-colons D39DC0E3' ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
|
No description provided.