Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.