On Wed, Aug 24, 2011 at 2:23 PM, jblaine <[email protected]> wrote:
> 2.7.3
> The heck? ${path} is expanding to the shell environment PATH when I
> reference it as a variable
> in my file resource. Isn't this supposed to be the "namevar" for file
> resources?
No, you don't have access to resource namevar unless it's within the
defined resource.
> err: /Stage[main]/Ldapclient::Config/File[/etc/ldap.conf]: Could not
> evaluate: Could not retrieve information from environment production
> source(s) puppet:///modules/ldapclient/RedHat/usr/bin:/bin:/usr/sbin:/sbin
> at /etc/puppet/modules/ldapclient/manifests/config.pp:9
> class ldapclient::config {
> case $operatingsystem {
> /(RedHat|CentOS|Fedora)/: {
> file { [ '/etc/openldap/ldap.conf', '/etc/ldap.conf' ]:
> source => "${ldapclient::params::fileroot}${path}",
> owner => "$ldapclient::params::ldapclient_user",
> mode => 0444,
> require => Class['ldapclient::install'],
> }
> }
> }
> }
define ldapclient::conf {
file { $name:
source => ${ldapclient::params::fileroot}/${name},
owner => $ldapclient::params::ldapclient_user,
mode => '0444',
require => Class['ldapclient::install'],
}
}
ldapclient::conf { [ '/etc/openldap/ldap.conf', '/etc/ldap.conf' ]: }
Nan
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.