Antidot SAS
2012-Apr-17 20:57 UTC
[Puppet Users] function template: use of variable ''$string'' = BUG?
Hi everyone, I am using puppet setup with gem: ------------------------------------------------------ root@linux-install:/tmp# facter |egrep -i "pupp|lsbdistdescription" lsbdistdescription => Debian GNU/Linux 6.0.4 (squeeze) puppetversion => 2.7.9 root@linux-install:/tmp# gem list puppet *** LOCAL GEMS *** puppet (2.7.9) ------------------------------------------------------ I think I found a bug but was not able to see if it was declared, here is the puppet file: root@linux-install:/tmp# cat test.pp $string = ''A bug? '' $test_var = ''test'' file { ''/tmp/bug'': path => ''/tmp/bug'', ensure => present, content => template(''test.erb''), } root@linux-install:/tmp# cat /etc/puppet/templates/test.erb # puppet file # Here is a sample Here is a value: <%= test_var %> root@linux-install:/tmp# puppet apply test.pp notice: /Stage[main]//File[/tmp/bug]/ensure: created notice: Finished catalog run in 0.21 seconds root@linux-install:/tmp# cat /tmp/bug A bug? root@linux-install:/tmp# Is that normal? Bug? Regards, JM -- 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.
Antidot SAS
2012-Apr-19 11:42 UTC
[Puppet Users] Re: function template: use of variable ''$string'' = BUG?
Hi, A little love about my bug? Am I the only one with this problem or are we thousand :D ? On Tue, Apr 17, 2012 at 10:57 PM, Antidot SAS <antidotsas@gmail.com> wrote:> Hi everyone, > > > > I am using puppet setup with gem: > ------------------------------------------------------ > root@linux-install:/tmp# facter |egrep -i "pupp|lsbdistdescription" > > > lsbdistdescription => Debian GNU/Linux 6.0.4 (squeeze) > puppetversion => 2.7.9 > root@linux-install:/tmp# gem list puppet > > *** LOCAL GEMS *** > > puppet (2.7.9) > ------------------------------------------------------ > > I think I found a bug but was not able to see if it was declared, here is > the puppet file: > > root@linux-install:/tmp# cat test.pp > $string = ''A bug? > '' > > > $test_var = ''test'' > > file { ''/tmp/bug'': > path => ''/tmp/bug'', > ensure => present, > content => template(''test.erb''), > } > root@linux-install:/tmp# cat /etc/puppet/templates/test.erb > # puppet file > # Here is a sample > Here is a value: <%= test_var %> > root@linux-install:/tmp# puppet apply test.pp > > > notice: /Stage[main]//File[/tmp/bug]/ensure: created > notice: Finished catalog run in 0.21 seconds > root@linux-install:/tmp# cat /tmp/bug > > > A bug? > root@linux-install:/tmp# > > > Is that normal? Bug? > > > Regards, > JM > >-- 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.
R.I.Pienaar
2012-Apr-19 11:59 UTC
Re: [Puppet Users] Re: function template: use of variable ''$string'' = BUG?
----- Original Message -----> From: "Antidot SAS" <antidotsas@gmail.com> > To: "puppet-users" <puppet-users@googlegroups.com> > Sent: Thursday, April 19, 2012 12:42:02 PM > Subject: [Puppet Users] Re: function template: use of variable ''$string'' = BUG? > > Hi, > > > A little love about my bug? Am I the only one with this problem or > are we thousand :D ?Yes, this is a bug if you just dont use $string it goes away, can you file a bug at projects.puppetlabs.com? Quick one liner to reproduce: % FACTER_string="foo" puppet -e ''notice(inline_template("<%= Time.now %>"))'' notice: Scope(Class[main]): foo -- 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.