Running the cookbook with the sysv init style on Chef 11.16.4, I got a template resolution error:
Chef::Exceptions::FileNotFound
------------------------------
Cookbook 'prometheus' (0.3.0) does not contain a file at any of these locations:
templates/ubuntu-12.04/ubuntu/prometheus.erb
templates/ubuntu/ubuntu/prometheus.erb
templates/default/ubuntu/prometheus.erb
This cookbook _does_ contain: ['prometheus.conf.erb','prometheus.pill.erb','sv-prometheus-run.erb','prometheus.erb']
You can see that it's doubling up the platform.
Changing the template source from "#{node['platform']}/prometheus.erb" to just prometheus.erb fixed it for me.
The current path seems to work on Chef 12, but I believe the changed version should as well. Chef automatically adds the platform path when resolving templates.
Running the cookbook with the sysv init style on Chef 11.16.4, I got a template resolution error:
You can see that it's doubling up the platform.
Changing the template source from
"#{node['platform']}/prometheus.erb"
to justprometheus.erb
fixed it for me.The current path seems to work on Chef 12, but I believe the changed version should as well. Chef automatically adds the platform path when resolving templates.