Hi
I am running into an issue where I am trying to use puppet to push out a new
ldap.conf and the variable i embedded in my template are not being populated
with the hostname of each client that I push the new ldap.conf file to. I
suspect I am calling the fact wrong but at this point I am not sure. Any
ideas are most appreciated.
I want to use the fqdn fact - the new ldap.conf is pushed to the host but
the fqdn variable is not populated with the hostname of the client. -
Thanks!
Here is my class
class ldap_dev_atl01 {
$fqdn = "$fqdn"
file { "/usr/share/ssl/certs/tucosi351_ca.crt":
mode => 644,
owner => root,
group => root,
source => "puppet://puppet/linux/ldap/tucosi351_ca.crt"
}
file {"ldap.conf":
name => "/etc/ldap.conf",
content =>
template("/var/lib/puppet/templates/ldap_dev_atl01.erb")
}
here is my template
host $hostname $hostname
base dc=ads,dc=mycompany,dc=com
ldap_version 3
pam_filter objectclass=posixAccount
pam_check_host_attr yes
pam_password md5
nss_base_passwd ou=People,dc=ads,dc=mycompany,dc=com?one?|(host=\2A)(host=<%
fqdn %>)
nss_base_shadow ou=People,dc=ads,dc=mycompany,dc=com?one?|(host=\2A)(host=<%
fqdn %>)
nss_base_group ou=Groups,dc=ads,dc=mycompany,dc=com?one?|(host=\2A)(host=<%
fqdn %>)
ssl start_tls
ssl on
tls_cacertdir /usr/share/ssl/certs/
tls_cacertfile /usr/share/ssl/certs/tucosi351_ca.crt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Hey Edward,
Try sticking a notice("fqdn is ${fqdn}.") at the top of that class,
and try again. If you see a message like "fqdn is .", then
you''re
probably seeing #1137 and/or #1147:
http://reductivelabs.com/trac/puppet/ticket/1137
http://reductivelabs.com/trac/puppet/ticket/1147
-sq
On Mar 21, 2008, at 4:21 PM, Edward Bailey wrote:
> Hi
>
> I am running into an issue where I am trying to use puppet to push
> out a new ldap.conf and the variable i embedded in my template are
> not being populated with the hostname of each client that I push the
> new ldap.conf file to. I suspect I am calling the fact wrong but at
> this point I am not sure. Any ideas are most appreciated.
>
> I want to use the fqdn fact - the new ldap.conf is pushed to the
> host but the fqdn variable is not populated with the hostname of
> the client. - Thanks!
>
> Here is my class
>
> class ldap_dev_atl01 {
>
> $fqdn = "$fqdn"
>
> file { "/usr/share/ssl/certs/tucosi351_ca.crt":
> mode => 644,
> owner => root,
> group => root,
> source => "puppet://puppet/linux/ldap/tucosi351_ca.crt"
> }
>
> file {"ldap.conf":
> name => "/etc/ldap.conf",
> content => template("/var/lib/puppet/templates/
> ldap_dev_atl01.erb")
> }
>
> here is my template
>
> host $hostname $hostname
>
> base dc=ads,dc=mycompany,dc=com
> ldap_version 3
>
> pam_filter objectclass=posixAccount
> pam_check_host_attr yes
> pam_password md5
>
> nss_base_passwd ou=People,dc=ads,dc=mycompany,dc=com?one?|(host=\2A)
> (host=<% fqdn %>)
> nss_base_shadow ou=People,dc=ads,dc=mycompany,dc=com?one?|(host=\2A)
> (host=<% fqdn %>)
> nss_base_group ou=Groups,dc=ads,dc=mycompany,dc=com?one?|(host=\2A)
> (host=<% fqdn %>)
>
> ssl start_tls
> ssl on
> tls_cacertdir /usr/share/ssl/certs/
> tls_cacertfile /usr/share/ssl/certs/tucosi351_ca.crt
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
thanks - i tried that and I see the fqdn of the server in syslog I did find my mistake - I needed the following in my template <%= fqdn %>) instead <% fqdn %>) Thanks again On Fri, Mar 21, 2008 at 7:31 PM, Sam Quigley <quigley@emerose.com> wrote:> > Hey Edward, > > Try sticking a notice("fqdn is ${fqdn}.") at the top of that class, > and try again. If you see a message like "fqdn is .", then you''re > probably seeing #1137 and/or #1147: > > http://reductivelabs.com/trac/puppet/ticket/1137 > http://reductivelabs.com/trac/puppet/ticket/1147 > > -sq > > > On Mar 21, 2008, at 4:21 PM, Edward Bailey wrote: > > > Hi > > > > I am running into an issue where I am trying to use puppet to push > > out a new ldap.conf and the variable i embedded in my template are > > not being populated with the hostname of each client that I push the > > new ldap.conf file to. I suspect I am calling the fact wrong but at > > this point I am not sure. Any ideas are most appreciated. > > > > I want to use the fqdn fact - the new ldap.conf is pushed to the > > host but the fqdn variable is not populated with the hostname of > > the client. - Thanks! > > > > Here is my class > > > > class ldap_dev_atl01 { > > > > $fqdn = "$fqdn" > > > > file { "/usr/share/ssl/certs/tucosi351_ca.crt": > > mode => 644, > > owner => root, > > group => root, > > source => "puppet://puppet/linux/ldap/tucosi351_ca.crt" > > } > > > > file {"ldap.conf": > > name => "/etc/ldap.conf", > > content => template("/var/lib/puppet/templates/ > > ldap_dev_atl01.erb") > > } > > > > here is my template > > > > host $hostname $hostname > > > > base dc=ads,dc=mycompany,dc=com > > ldap_version 3 > > > > pam_filter objectclass=posixAccount > > pam_check_host_attr yes > > pam_password md5 > > > > nss_base_passwd ou=People,dc=ads,dc=mycompany,dc=com?one?|(host=\2A) > > (host=<% fqdn %>) > > nss_base_shadow ou=People,dc=ads,dc=mycompany,dc=com?one?|(host=\2A) > > (host=<% fqdn %>) > > nss_base_group ou=Groups,dc=ads,dc=mycompany,dc=com?one?|(host=\2A) > > (host=<% fqdn %>) > > > > ssl start_tls > > ssl on > > tls_cacertdir /usr/share/ssl/certs/ > > tls_cacertfile /usr/share/ssl/certs/tucosi351_ca.crt > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---