-
-
Save Supermathie/ac5899acd60c74a7240c to your computer and use it in GitHub Desktop.
help with states
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
± |master ✗| → sudo salt 'win7-client1*' state.highstate | |
win7-client1.storagelab.netdirect.ca: | |
Data failed to compile: | |
---------- | |
Name windowsdomain:ad2012r2.storagelab.netdirect.ca in sls windows is not a dictionary | |
*change to dictionary* | |
michael@orchestrator:/srv/salt | |
± |master ✗| → sudo salt 'win7-client1*' state.highstate | |
win7-client1.storagelab.netdirect.ca: | |
Data failed to compile: | |
---------- | |
The state "windowsdomain:ad2012r2.storagelab.netdirect.ca" in sls windows is not formed as a list | |
---------- | |
The state "windowsdomain:ad2012r2.storagelab.netdirect.ca" in sls windows is not formed as a list |
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
windows: | |
file.managed: | |
- name: c:/salt/conf/minion.d/minion.conf | |
- template: jinja | |
- makedirs: true | |
{% if grains ['windowsdomain'] == 'zzz' %} | |
- source: salt://win/files/minion-zzz.conf | |
{% elif grains ['windowsdomain'] == 'ad2012r2.storagelab.netdirect.ca' %} | |
- source: salt://win/files/minion-ad2012r2-storagelab.conf | |
{% elif grains ['windowsdomain'] == 'ad2008r2.storagelab.netdirect.ca' %} | |
- source: salt://win/files/minion-ad2008r2-storagelab.conf | |
{% endif %} | |
grains.present: | |
- name: testenviron | |
{% if grains ['windowsdomain'] == 'zzz' %} | |
- value: zzz | |
{% elif grains ['windowsdomain'] == 'ad2012r2.storagelab.netdirect.ca' %} | |
- value: ad2012r2 | |
{% elif grains ['windowsdomain'] == 'ad2008r2.storagelab.netdirect.ca' %} | |
- value: ad2008r2 | |
{% endif %} |
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
base: | |
'os:Windows': | |
- match: grain | |
- windows | |
'os:Linux': | |
- match: grain | |
- linux |
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
minionconf: | |
'windowsdomain:ad2012r2.storagelab.netdirect.ca': | |
- match: grain | |
- c:/salt/conf/minion.d/minion.conf: | |
file.managed: | |
- source: salt://win/files/minion-ad2012r2.conf | |
- template: jinja | |
- makedirs: true | |
- testenviron: | |
grains.present: | |
- value: ad2012r2 | |
'windowsdomain:ad2008r2.storagelab.netdirect.ca': | |
- match: grain | |
- c:/salt/conf/minion.d/minion.conf: | |
file.managed: | |
- source: salt://win/files/minion-ad2008r2.conf | |
- template: jinja | |
- makedirs: true | |
- testenviron: | |
grains.present: | |
- value: ad2012r2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment