chef-boneyard / push-jobs-cookbook

Development repository for Chef Cookbook push-jobs
https://supermarket.chef.io/cookbooks/push-jobs
Apache License 2.0
21 stars 43 forks source link

Bug in template when setting environment variables #79

Closed Knappek closed 6 years ago

Knappek commented 8 years ago

Cookbook version

2.4.2

Chef-client version

12.8.1

Platform Details

CentOS 7.1.1503. VM is running in Azure Cloud.

Scenario:

I try to configure push-jobs with a Squid proxy. For this I need to set the environment variables http_proxy and https_proxy. For this I need to set the following variables in /etc/chef/push-jobs-client.rb:

http_proxy 'http://<proxy_ip>:<proxy_port>'
http_proxy_user '<proxy_user>'
http_proxy_pass '<proxy_userpassword>'
https_proxy 'http://<proxy_ip>:<proxy_port>'
https_proxy_user '<proxy_user>'
https_proxy_pass '<proxy_userpassword>'

This is handled in the template here: https://github.com/chef-cookbooks/push-jobs/blob/master/templates/default/push-jobs-client.rb.erb#L5-L7.

But setting the node attribute https://github.com/chef-cookbooks/push-jobs/blob/master/attributes/default.rb#L29 accordingly does not use the env variables.

Steps to Reproduce:

The Problem is the "="-sign in this line: https://github.com/chef-cookbooks/push-jobs/blob/master/templates/default/push-jobs-client.rb.erb#L6.

If you remove this sign, eveything is working properly.

Actual Result:

If I start the push jobs client, I should at least see the connection to the Push Server in the Squid proxy logs, but I don't. If I remove the equal sign, I see the connection in the proxy logs.

Knappek commented 7 years ago

@jtimberman, @charlesjohnson , @christophermaier can you please look into it?

andreibelov commented 6 years ago

Same issue. After deleting "="-sign everything works well.

need to edit https://github.com/chef-cookbooks/push-jobs/blob/master/templates/push-jobs-client.rb.erb#L6