I'm getting the following error on my app server when trying to deploy
after creating a web_tools instance.
** [out ::
app01.mydomain.com] nginx: [emerg] open()
"/etc/nginx/rubber/tools.conf" failed (2: No such file or directory)
in /etc/nginx/nginx.conf:60
From my instance-production.yml file (I've :
- !ruby/object:Rubber::Configuration::InstanceItem
name: webtools
domain:
mydomain.com
roles:
- !ruby/object:Rubber::Configuration::RoleItem
name: web_tools
options: {}
- !ruby/object:Rubber::Configuration::RoleItem
name: resque_web
options: {}
- !ruby/object:Rubber::Configuration::RoleItem
name: collectd
options: {}
- !ruby/object:Rubber::Configuration::RoleItem
name: monit
options: {}
instance_id: i-8d3ea8eb
image_type: m1.small
image_id: ami-3c994355
security_groups:
- myapp_production_default
- myapp_production_web_tools
- myapp_production_webtools
- myapp_production_resque_web
- myapp_production_collectd
- myapp_production_monit
- !ruby/object:Rubber::Configuration::InstanceItem
name: app01
domain:
mydomain.com
roles:
- !ruby/object:Rubber::Configuration::RoleItem
name: app
options: {}
- !ruby/object:Rubber::Configuration::RoleItem
name: passenger_nginx
options: {}
- !ruby/object:Rubber::Configuration::RoleItem
name: collectd
options: {}
- !ruby/object:Rubber::Configuration::RoleItem
name: monit
options: {}
instance_id: i-79b47a1f
image_type: m1.small
image_id: ami-3c994355
security_groups:
- myapp_production_default
- myapp_production_app01
- myapp_production_app
- myapp_production_passenger_nginx
- myapp_production_collectd
- myapp_production_monit
Obviously the tools config information isn't being copied to the app
servers (which I assume is the correct and desired behavior).
I understand that this is the code that is adding the config:
<% if rubber_instances.for_role('web_tools').first %>
include /etc/nginx/rubber/tools.conf;
<% end %>
But that seems like it is just checking if ANY web_tools roles exist,
rather than checking if this particular instance has that role.
Am I missing something, or is this a bug that I just need to fix by
changing the above mentioned check? If it's a bug, what is the ideal
way of changing the code to ensure that it only happens on the
appropriate box?
Thanks,
Chris