use double quotes in your source attribute :

|source =>"puppet:///modules/repo/rhel-${::lsbdistrelease}_64.repo",
|


On 25/07/14 09:22, Vikas Kumar wrote:

Hi Jose,

I tried this, didn't worked for me :(

|
'6':{
        file {'/etc/yum.repos.d/RHEL-6.4.repo':
ensure=>present,
        mode =>'0644',
        owner =>'root',
group=>'root',
source =>'puppet:///modules/repo/rhel-${::lsbdistrelease}_64.repo',
}
|

Got this message in the log file.

|
FriJul2512:51:12+05302014/Stage[main]/Repo::Rhel/File[/etc/yum.repos.d/RHEL-6.4.repo](err):Couldnotevaluate:Couldnotretrieve information fromenvironment production source(s)puppet:///modules/repo/rhel-${::lsbdistrelease}_64.repo
|

This is the file on the server.

|
# ls -l /etc/puppet/modules/repo/files/rhel-6.4_64.repo
-rw-r--r--1root root 205Jul2412:09/etc/puppet/modules/repo/files/rhel-6.4_64.repo
#
|

Have I made a mistake anywhere ?

Thanks in advance.


Regards,
Vikas
On Friday, 25 July 2014 17:03:34 UTC+10, Jose Luis Ledesma wrote:

    If you interpolate variable you have to use " instead of '.
    So it should be
    source => "puppet:///modules/repo/rhel-${::lsbdistrelease}_64.repo",

    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+unsubscr...@googlegroups.com <mailto:puppet-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f23af645-db50-4f84-bd42-544cd1e4dec4%40googlegroups.com <https://groups.google.com/d/msgid/puppet-users/f23af645-db50-4f84-bd42-544cd1e4dec4%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.


--
Johan De Wit

Open Source Consultant

Red Hat Certified Engineer              (805008667232363)
Puppet Certified Professional 2013/2014 (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
_________________________________________________________

Next Events:
Linux Training | https://www.open-future.be/linux-training-8-till-12th-september
Puppet Introduction Course | 
https://www.open-future.be/puppet-introduction-course-15th-september
Puppet Fundamentals Training | https://www.open-future.be/puppet-fundamentals-training-16-till-18th-september Zabbix Certified Specialist | https://www.open-future.be/zabbix-certified-specialisttraining-22-till-24th-september
Zabbix Certified Professional | 
https://www.open-future.be/zabbix-certified-professional-training-25-till-26th-september
Subscribe to our newsletter | http://eepurl.com/BUG8H

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53D20DA9.2010504%40open-future.be.
For more options, visit https://groups.google.com/d/optout.

Reply via email to