From 526520778ac5f305e51171f6c4ab9b8fc0c33a15 Mon Sep 17 00:00:00 2001 From: Josh O'Brien Date: Wed, 30 Aug 2017 10:32:17 -0500 Subject: [PATCH] Allow opscode_pushy_server vip to be overridden Presently, a user cannot leverage push jobs with a highly available chef server configuration. By allowing a user to set the `opscode_pushy_server['vip']` this pull request allows users to override the default values assigned by Chef, allowing push jobs to be leveraged with highly available chef server configurations. As `opscode_pushy_server['vip'] defaults to `nil`, this should only affect users that have been instructed to make these changes explicitly. Signed-off-by: Josh O'Brien --- .../opscode-pushy-server/libraries/pushy_server.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omnibus/files/pushy-server-cookbooks/opscode-pushy-server/libraries/pushy_server.rb b/omnibus/files/pushy-server-cookbooks/opscode-pushy-server/libraries/pushy_server.rb index 433067ab..b271027d 100644 --- a/omnibus/files/pushy-server-cookbooks/opscode-pushy-server/libraries/pushy_server.rb +++ b/omnibus/files/pushy-server-cookbooks/opscode-pushy-server/libraries/pushy_server.rb @@ -59,7 +59,7 @@ def generate_config(node_name) case topology when "ha", "tier" PushJobsServer['opscode_pushy_server']['ha'] = (topology == 'ha') - PushJobsServer['opscode_pushy_server']['vip'] = node['private_chef']['backend_vips']['ipaddress'] + PushJobsServer['opscode_pushy_server']['vip'] ||= node['private_chef']['backend_vips']['ipaddress'] case node['private_chef']['servers'][node_name]['role'] when "backend" @@ -70,7 +70,7 @@ def generate_config(node_name) raise "I don't have a role for you! Use 'backend' or 'frontend'." end else - PushJobsServer['opscode_pushy_server']['vip'] = node['private_chef']['lb']['api_fqdn'] + PushJobsServer['opscode_pushy_server']['vip'] ||= node['private_chef']['lb']['api_fqdn'] end generate_hash end