Greetings.
When defining a "file" resource, why does the ${name} variable sometimes expand
to the filename being maintained, and sometimes to the module name?
Examples (in a module which, for simplicity, we will call "apache") ...
file { '/etc/httpd/conf/httpd.conf' :
ensure => file ,
source => "puppet:///modules/${module_name}${name}" ,
}
Here $name expands to "/etc/httpd/conf/httpd.conf", so "source" expands to
"puppet:///modules/apache/etc/httpd/conf/httpd.conf".
file { '/etc/httpd/conf.d/ssl.conf' :
ensure => file ,
content => template ( "${module_name}{$name}.erb" ) ,
}
Here $name expands to "apache", so the filename passed to template() is
"apacheapache.erb", rather than the expected and desired value
"apache/etc/httpd/conf.d/ssl.conf.erb".
Why does $name expand differently in these cases, and where did I miss this in
the documentation?
--
John Simpson <[email protected]>
Unix System/VM Developer and Engineering Operations, Voalte
+1 (941) 312-2830 x148
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.