<% if $use_app == "False" %>
Be aware of the double equal signs
On 06/04/2013 12:58 PM, AVE1810 wrote:
I would like to use condition in a template with puppet 3.x.
In my params.pp :
$domain=test.org
$use_app = True
In my manifest :
class myapp::config {
require params
file { "/opt/myapp/config/app.conf":
mode => '0644',
content => template("myapp/app.conf.erb"),
}
}
In my template file :
<% if $use_app = "False" %>
--domain=<%= scope['myapp::params::domain'] %>
<% end %>
The condition desn't work. My config file app.conf always have the
line --domain inserted when I run puppet.
Any ideas ?
Thanks
--
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
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
_________________________________________________________
--
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.