Skip to content

Instantly share code, notes, and snippets.

@techdragon
Last active December 29, 2015 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techdragon/7691032 to your computer and use it in GitHub Desktop.
Save techdragon/7691032 to your computer and use it in GitHub Desktop.
Cant understand the cause of the error here.
local:
Data failed to compile:
----------
Malformed topfile (state declarations not formed as a list)
etc:
hosts:
salt: 10.10.10.10
minion: 10.20.20.20
{% if pillar['etc']['hosts'] %}
{% for host, ip in salt['pillar.get']('etc:hosts').items() %}
etc_hosts_entry_{{ host }}:
host.present:
- ip: {{ ip }}
- names:
- {{ host }}
{% endfor %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment