Created
September 5, 2015 20:49
-
-
Save anonymous/23ef205e353a7ee14ec1 to your computer and use it in GitHub Desktop.
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 users = pillar.get("all_users", {}) %} | |
{% for user in users.get('user_list', {}).items() %} | |
/var/www/html/{{user}}: | |
file.recurse: | |
- source: salt://stacks/program | |
- dir_mode: 777 | |
{% endfor %} | |
causes this error : | |
Rendering SLS stacks failed, render error: while parsing a block mapping | |
in "<unicode string>", line 4, column 1: | |
/var/www/html/('libary', {'cust_ ... | |
^ | |
expected <block end>, but found ',' | |
in "<unicode string>", line 4, column 48: | |
... 'libary', {'cust_name': 'libary', 'stacks_pass': 'password', 'st ... | |
^ | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2002, in render_state | |
rendered_sls=mods | |
File "/usr/lib/python2.7/dist-packages/salt/template.py", line 69, in compile_template | |
ret = render(input_data, env, sls, **render_kwargs) | |
File "/usr/lib/python2.7/dist-packages/salt/renderers/yaml.py", line 43, in render | |
data = load(yaml_data, Loader=get_yaml_loader(argline)) | |
File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 71, in load | |
return loader.get_single_data() | |
File "/usr/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data | |
node = self.get_single_node() | |
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node | |
document = self.compose_document() | |
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 55, in compose_document | |
node = self.compose_node(None, None) | |
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node | |
node = self.compose_mapping_node(anchor) | |
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 127, in compose_mapping_node | |
while not self.check_event(MappingEndEvent): | |
File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event | |
self.current_event = self.state() | |
File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 439, in parse_block_mapping_key | |
"expected <block end>, but found %r" % token.id, token.start_mark) | |
ParserError: while parsing a block mapping | |
in "<unicode string>", line 4, column 1: | |
/var/www/html/('libary', {'cust_ ... | |
^ | |
expected <block end>, but found ',' | |
in "<unicode string>", line 4, column 48: | |
... 'libary', {'cust_name': 'libary', 'stacks_pass': 'password', 'st ... | |
Pillar Data : | |
all_users: | |
user_list: | |
ubuntu: | |
user_name: ubuntu | |
group_name: ubuntu | |
cust_name: stacks | |
stacks_admin: admin | |
stacks_pass: password | |
libary: | |
user_name: ubuntu | |
group_name: ubuntu | |
cust_name: libary | |
stacks_admin: admin | |
stacks_pass: password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment