Created
August 7, 2017 13:14
-
-
Save anonymous/a2039207eec88da9879efc39d4b86715 to your computer and use it in GitHub Desktop.
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
{% set default = ['192.168.1.1'] %} | |
{% set gateway = salt.network.default_route().0.gateway %} | |
{% set lookup_table = ( | |
'192.168.111.10', ['192.168.111.10'], | |
'10.120.16.254', ['10.120.11.207', '10.120.11.141' ] | |
) | |
%} | |
{% if lookup_table[gateway] is defined %} | |
{% server = lookup_table[gateway] %} | |
{% else %} | |
{% server = default %} | |
{% endif%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment