Created
October 3, 2014 20:40
-
-
Save renoirb/ff677cd0bb3643c34fc6 to your computer and use it in GitHub Desktop.
Use Salt Stack publish to generate hosts entries
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 saltProvidedData = salt['publish.publish']('*', 'grains.item', 'host,ipaddr') -%} | |
{% for a, iter in saltProvidedData.items() -%} | |
{{ iter.get('ipaddr') }} {{ iter.get('host') }}.staging.wpdn {{ iter.get('host') }} | |
{% endfor -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment