Created
October 24, 2014 08:58
-
-
Save johanek/9bba906ea4889af6cfe8 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
In [1]: import salt.config | |
In [2]: import salt.loader | |
In [3]: import salt.renderers.yaml | |
In [4]: | |
In [4]: content = open('test.sls').read() | |
In [5]: __opts__ = salt.config.minion_config('minion.conf') | |
In [6]: __salt__ = salt.loader.minion_mods(__opts__) | |
In [7]: salt.renderers.yaml.render(content) | |
--------------------------------------------------------------------------- | |
NameError Traceback (most recent call last) | |
<ipython-input-7-eee27486c830> in <module>() | |
----> 1 salt.renderers.yaml.render(content) | |
/usr/local/lib/python2.7/site-packages/salt/renderers/yaml.pyc in render(yaml_data, saltenv, sls, argline, **kws) | |
63 data = {} | |
64 else: | |
---> 65 if isinstance(__salt__, dict): | |
66 if 'config.get' in __salt__: | |
67 if __salt__['config.get']('yaml_utf8', False): | |
NameError: global name '__salt__' is not defined |
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
file_root: . | |
file_client: local |
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
something: | |
file: | |
- managed | |
- source: salt://test/path | |
- owner: root | |
- group: root | |
- mode: 0644 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment