I'm trying to write my first puppet template, but I am running into some 
issues. The following is my template:

*# Managed by Puppet*
*CONFIG_FILE=/etc/rabbitmq/rabbitmq*
*<% if @rabbitmq_port != 'UNSET' -%>*
*NODE_PORT=<%= @rabbitmq_port %>*
*<% end -%>*
*<% if @rabbitmq_address != 'UNSET' -%>*
*NODE_IP_ADDRESS=<%= @rabbitmq_address %>*
*<% end -%>*

This is a pretty simply template, but the issue I'm seeing is that 
"NODE_PORT=" & "NODE_IP_ADDRESS=" is always printed into the config file 
regardless if the variables are set to UNSET or not. What I'm wanting to do 
is not print NODE_PORT= or NODE_IP_ADDRESS= if the matching variable is 
equal to UNSET.

Output of configuration file when rabbitmq_port and rabbitmq_address are 
set to UNSET:

*# Managed by Puppet*
*CONFIG_FILE=/etc/rabbitmq/rabbitmq*
*NODE_PORT=*
*NODE_IP_ADDRESS=*
*
*
Any help would be appreciated!

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to