You have to use {}. So it should be something like
source => "puppet:///modules/${::hostname}/${::hostname}.mydomain.com.key",
I've used :: too to avoid looking at the local scope.
Regards
--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAOZy0e%3Dx%2BcFLjW%3D-H54cttNLV77bhdbNwSg0%3DLNWH7pSoiT3CQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
Ups. Looking it again you forgot to set the module name in the puppet://
So the {} is not needed although I think is a good practice
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAF_B3ddA0pWg-C%3DWRGGo77TZBHsdfzjLd9fT4K9g-kMYZ4%3D%3DMg%40mail.gmail.com.
Hey all,
Yup! You caught it. Managed to notice this as well, so forgive the intrusion on your day.
But I was missing the module name.
file { "/etc/pki/tls/certs/$hostname.mydomain.com.crt":notify => Service["bacula-fd"],owner => "root",group => "root",mode => 04000,require => Package["bacula-client","bacula-common"],source => "puppet:///modules/bacula/$hostname/$hostname.mydomain.com.crt",
}
That actually works! But thanks for the tip on using {} in my variables. I'll start using that now.
Thanks,Tim
On Wed, Jan 29, 2014 at 12:33 PM, José Luis Ledesma <joseluis...@gmail.com> wrote:
Ups. Looking it again you forgot to set the module name in the puppet://
So the {} is not needed although I think is a good practice
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAOZy0ekwLjQNkREhVa%2B3a81biNaMZQ8qdHEngwWicTQMkF2GCw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
-- Johan De Wit Open Source Consultant Red Hat Certified Engineer (805008667232363) Puppet Certified Professional 2013 (PCP0000006) _________________________________________________________ Open-Future Phone +32 (0)2/255 70 70 Zavelstraat 72 Fax +32 (0)2/255 70 71 3071 KORTENBERG Mobile +32 (0)474/42 40 73 BELGIUM http://www.open-future.be _________________________________________________________
Upcoming Events:
Puppet Fundamentals Training | http://www.open-future.be/puppet-fundamentals-training-4-till-6th-february
Puppet Introduction Course | http://www.open-future.be/puppet-introduction-course-7th-february
Zabbix Certified Training | http://www.open-future.be/zabbix-certified-training-10-till-12th-february
Zabbix for Large Environments Training | http://www.open-future.be/zabbix-large-environments-training-13-till-14th-february
Subscribe to our newsletter: http://eepurl.com/BUG8H
just start using ${variable} when used in a string (double quoted) . and also use explicit scoping. It is a very good habit and you will only benefit from it.
( and everybody else, including you, reading your code)
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52E9662D.9030900%40open-future.be.