Chef and multi-node-ec2 tutorial
I'm learning chef and following the opscode chef tutorials through,
specifically the EC2 multi-node one. I am struggling to understand what it
means in a specific section.
In section 10, it says:
Next, we need to drop configuration files for Redis, specifically, we need
the hostname. We can leverage Chef search for this:
redis_server = search(:node, 'role:redis').first
template "#{node['my_app']['root']}/shared/config/redis.yml" do
source 'config/redis.yml.erb'
owner node['apache']['user']
group node['apache']['group']
mode '0755'
variables(
:host => redis_server['ec2']['local_ipv4']
)
end
And then, Add the associated template in
templates/default/config/redis.yml.erb:
# This file was created by Chef for <%= node['fqdn'] %>
# Do NOT modify this file by hand!
host: "<%= @host %>"
Obviously I understand the latter, but what does it mean: "drop
configuration files for Redis"?
Am I supposed to be running something as a command or does that need to go
in my recipes file?
No comments:
Post a Comment