Created
December 5, 2013 08:48
-
-
Save quantonganh/7802125 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
{#- | |
Author: Quan Tong Anh <tonganhquan.net@gmail.com> | |
Maintainer: Quan Tong Anh <tonganhquan.net@gmail.com> | |
-#} | |
{% macro convert_hostname_to_ip(hostname) -%} | |
{% if salt['dig.A'](hostname) -%} | |
carbon = {{ salt['dig.A'](hostname)[0] }}:2003 | |
{% else -%} | |
carbon = {{ hostname }}:2003 | |
{%- endif %} | |
{%- endmacro %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment