huh!formatting borked----rewind "template[/etc/init.d/redis\#{server_name}]" do
source "redis.init.erb"
cookbook_name "role_redisserver"
endOn Fri, Jun 20, 2014 at 11:38 AM, Ranjib Dey < " target="_blank"> > wrote:tryrewind "template [/etc/init.d/redis6379]" dosource "redis.init.erb"
cookbook_name "role_redisserver"
endOn Fri, Jun 20, 2014 at 11:04 AM, < " target="_blank"> > wrote:Hi,
I am working with the redisio cookbook, and I would like to overwrite the init
script template with my own. I see this:
redisio/providers/install.rb:
template "/etc/init.d/redis#{server_name}" do
source 'redis.init.erb'
cookbook 'redisio'
owner 'root'
group 'root'
mode '0755'
variables({
:name => server_name,
:bin_path => bin_path,
:job_control => current['job_control'],
:port => current['port'],
:address => current['address'],
:user => current['user'],
:configdir => current['configdir'],
:piddir => piddir,
:requirepass => current['requirepass'],
:shutdown_save => current['shutdown_save'],
:platform => node['platform'],
:unixsocket => current['unixsocket'],
:ulimit => descriptors
})
only_if { current['job_control'] == 'initd' }
end
when I use:
rewind :template => "/etc/init.d/redis\#{server_name}" do
source "redis.init.erb"
cookbook_name "role_redisserver"
end
or
rewind :template => "/etc/init.d/redis6379" do
source "redis.init.erb"
cookbook_name "role_redisserver"
end
I keep getting the error:
Chef::Exceptions::ResourceNotFound
----------------------------------
Cannot find a resource matching template[/etc/init.d/redis#{server_name}] (did
you define it first?)
Is there a way to overwrite this template with it not being referenced in a
recipe?
Thanks in advance,
Geoff
Archive powered by MHonArc 2.6.16.