Created
June 27, 2014 15:29
-
-
Save ksalman/29da2f77cafeeacb25e3 to your computer and use it in GitHub Desktop.
jinja error in winrepo state file
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
{% if grains['osarch'] == "64-bit" %} | |
{% set uninstaller = "C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe" %} | |
{% else %} | |
{% set uninstaller = "C:\Program Files\Mozilla Firefox\uninstall\helper.exe" %} | |
{% endif %} | |
Firefox: | |
26.0: | |
installer: 'salt://win/repo/bin/firefox/Firefox Setup 26.0.exe' | |
full_name: 'Mozilla Firefox 26.0 (x86 en-US)' | |
reboot: False | |
install_flags: ' /s ' | |
uninstaller: {{ uninstaller }} | |
uninstall_flags: ' /S' |
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
salt-run winrepo.genrepo | |
[ERROR ] An un-handled exception was caught by salt's global exception handler: | |
ScannerError: while scanning for the next token | |
found character '%' that cannot start any token | |
in "<string>", line 1, column 2: | |
{% if grains['osarch'] == "64-bit" %} | |
^ | |
Traceback (most recent call last): | |
File "/usr/bin/salt-run", line 10, in <module> | |
salt_run() | |
File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 95, in salt_run | |
client.run() | |
File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 357, in run | |
runner.run() | |
File "/usr/lib/python2.7/dist-packages/salt/runner.py", line 219, in run | |
self.opts['fun'], self.opts['arg'], self.opts) | |
File "/usr/lib/python2.7/dist-packages/salt/runner.py", line 126, in cmd | |
return self.functions[fun](*args, **kwargs) | |
File "/usr/lib/python2.7/dist-packages/salt/runners/winrepo.py", line 46, in genrepo | |
config = yaml.safe_load(slsfile.read()) or {} | |
File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 93, in safe_load | |
return load(stream, SafeLoader) | |
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 35, in get_single_node | |
if not self.check_event(StreamEndEvent): | |
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 143, in parse_implicit_document | |
_start | |
StreamEndToken): | |
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 116, in check_token | |
self.fetch_more_tokens() | |
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 257, in fetch_more_tokens | |
% ch.encode('utf-8'), self.get_mark()) | |
ScannerError: while scanning for the next token | |
found character '%' that cannot start any token | |
in "<string>", line 1, column 2: | |
{% if grains['osarch'] == "64-bit" %} | |
^ | |
Traceback (most recent call last): | |
File "/usr/bin/salt-run", line 10, in <module> | |
salt_run() | |
File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 95, in salt_run | |
client.run() | |
File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 357, in run | |
runner.run() | |
File "/usr/lib/python2.7/dist-packages/salt/runner.py", line 219, in run | |
self.opts['fun'], self.opts['arg'], self.opts) | |
File "/usr/lib/python2.7/dist-packages/salt/runner.py", line 126, in cmd | |
return self.functions[fun](*args, **kwargs) | |
File "/usr/lib/python2.7/dist-packages/salt/runners/winrepo.py", line 46, in genrepo | |
config = yaml.safe_load(slsfile.read()) or {} | |
File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 93, in safe_load | |
return load(stream, SafeLoader) | |
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 35, in get_single_node | |
if not self.check_event(StreamEndEvent): | |
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 143, in parse_implicit_document | |
_start | |
StreamEndToken): | |
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 116, in check_token | |
self.fetch_more_tokens() | |
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 257, in fetch_more_tokens | |
% ch.encode('utf-8'), self.get_mark()) | |
yaml.scanner.ScannerError: while scanning for the next token | |
found character '%' that cannot start any token | |
in "<string>", line 1, column 2: | |
{% if grains['osarch'] == "64-bit" %} | |
^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment