Created
July 24, 2013 14:23
-
-
Save toddlers/6071035 to your computer and use it in GitHub Desktop.
creating if else structure in puppet templates
for more info https://ask.puppetlabs.com/question/288/what-can-i-do-with-erb-templates-in-puppet/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if @colo == "a" then -%> | |
server server1 foo1.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
server server2 foo2.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
server server3 foo3.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
<% elsif @colo == "b" then -%> | |
server server1 foo1.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
server server2 foo2.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
server server3 foo3.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
<% elsif @colo == "c" then -%> | |
server server1 foo1.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
server server2 foo2.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
server server3 foo3.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
<% elsif @colo == "d" then -%> | |
server server1 foo1.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
server server2 foo2.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
<% end -%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment