Skip to content

Instantly share code, notes, and snippets.

@kedare
Created May 24, 2017 08:40
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 kedare/7564a9a02ead86701a888b313fb997c4 to your computer and use it in GitHub Desktop.
Save kedare/7564a9a02ead86701a888b313fb997c4 to your computer and use it in GitHub Desktop.
SaltStack issue
The error:
salt "bcn6-web-staging-1" state.apply windows.services.iis.sites
bcn6-web-staging-1:
Data failed to compile:
----------
Rendering SLS 'base:windows.services.iis.sites' failed: while parsing a block mapping
in "<unicode string>", line 3, column 1:
Create xxxstaging.com site:
^
expected <block end>, but found ','
in "<unicode string>", line 11, column 68:
... or {'name': 'xxxstaging.com', 'relative_physical_path': 'lod ...
^
ERROR: Minions returned with non-zero exit code
The sls:
{% for site in pillar["iis"]["sites"] %}
Create {{ site["name"] }} site:
win_iis.deployed:
- name: {{ site["name"] }}
- sourcepath: C:\inetpub\wwwroot\staging\{{ site["relative_physical_path"] }}
- apppool: {{ site["name"] }}
{% for binding in site["bindings"] %}
Create binding {{ binding }} for {{ site }}:
win_iis.create_binding:
- site: {{ site["name"] }}
- hostheader: {{ binding }}
- port: 80
- protocol: http
{% endfor %}
{% for application in site["applications"] %}
Create application {{ application["name"] }} for {{ site["name"] }}:
win_iis.create_app:
- name: {{ application["path"] }}
- site: {{ site["name"] }}
- sourcepath: C:\inetpub\wwwroot\staging\{{ application["relative_physical_path"] }}
{% endfor %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment