Created
June 8, 2015 22:34
-
-
Save sygibson/6b13b147a31b4f3fc7e8 to your computer and use it in GitHub Desktop.
jinja template for public/cluster network
This file contains 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
# first network returned will be the "public" network | |
{% set public = salt['network.subnets']()[0] -%} | |
{% if public -%} | |
public network = {{ public }} | |
{% else -%} | |
# if for some reason not defined as a salt grain - throw default | |
public network = UNDEFINED | |
{% endif -%} | |
# second network if exists is the "cluster" network | |
{% set cluster = salt['network.subnets']()[1] -%} | |
{% if cluster -%} | |
cluster network = {{ cluster }} | |
{% else -%} | |
# if not defined, set it to the "public" network | |
cluster network = {{ public }} | |
{% endif -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment