Home > Puppet > Puppet: conditional statements examples on templates

Puppet: conditional statements examples on templates

Last edited by on 4 December 2013 at 1:11

Some conditional statements that you can use on puppet templates:

[cce]<% if @hostname == ("kvm01") then -%>
... ... ...
<% end -%>
<% if @hostname != ("kvm01") then -%>
... ... ...
<% end -%>[/cce]
[cce]<% if @hostname == ("goldrake01" or "goldrake02") then -%>
... ... ... 
<% end -%>[/cce]
Categories: Puppet
  1. No comments yet.
  1. No trackbacks yet.