Hi,
I would like to know if I can use a File attribute inside a template. Is it possible?
Example:
A class with:
file { "/ssl/certificate.crt":
source => "puppet:///modules/apache/certificate.crt",
owner => root,
group => apache,
mode => 440,
require => Class["apache::install"],
}
file { "/conf/apache/apache-system1.conf":
ensure => present,
content => template("apache/apache-system1.conf.erb"),
require => [Class["apache::install"], File["/ssl/certificate.crt"]],
notify => Class["apache::service::system1"],
}
On my template I want to have a line like this:
SSLCertificateFile /ssl/certificate.crt
using puppet file attribute directly(like this below that does not work obviously):
SSLCertificateFile <%= File["/ssl/certificate.cfg"].name %>
Thanks,
Wagner Sartori Junior