puppet apply
to set up a machine without having a central master
/etc/profile.d
directory, I think.
<% @slaves.each do |slave| -%>
<%= slave %>
<% end -%>
node default {
$hdfs_port="9000"
$hdfs_hostname="usmbdevspark01"
$slaves = ['usmbdevspark01', 'usmbdevspark02', 'usmbdevspark03', 'usmbdevspark04']
include apachespark
}
usmbdevspark01
usmbdevspark02
usmbdevspark03
usmbdevspark04
<% @slaves.each do |slave| -%>
<%= slave %>
<%- end -%>
You can use file_line
and match
to do that
match: Specifies a regular expression to run against existing lines in the file; if a match is found, it is replaced rather than adding a new line. A regex comparison is performed against the line value, and if it does not match, an exception is raised. Valid options: String containing a regex. Default: Undefined.