diff --git a/site-cookbooks/kosmos_postgresql/libraries/helpers.rb b/site-cookbooks/kosmos_postgresql/libraries/helpers.rb index 7d3c397..18e245d 100644 --- a/site-cookbooks/kosmos_postgresql/libraries/helpers.rb +++ b/site-cookbooks/kosmos_postgresql/libraries/helpers.rb @@ -1,7 +1,7 @@ class Chef class Recipe def postgresql_primary - postgresql_primary = search(:node, "role:postgresql_primary AND chef_environment:#{node.chef_environment}").first + postgresql_primary = search(:node, "role:postgresql_primary").first unless postgresql_primary.nil? primary_ip = ip_for(postgresql_primary)