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

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/WXMsH0KgtqAJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to