saltstack/salt-states — Issue #3: Possible documentation bug for states.file.managed
Author: archtaku
Created: 2012-02-24 10:03:20+00:00
State: open

Salt version: 0.9.7

After spending a considerable amount of time tonight troubleshooting a file.managed state using the example [here](http://readthedocs.org/docs/salt/en/latest/ref/states/all/salt.states.file.html?highlight=states.file#file-management) as a guide, I finally took a look at the salt-states repo and noticed that the syntax is different.

If you look at the info on RTD, it tells you to define your "context" area like so:

- context:
custom_var: "override"

However, in the [LDAP example from salt-states](https://github.com/saltstack/salt-states/blob/master/qa/ldap/init.sls#L19) there is a difference. Here, it appears that curly braces and commas are needed, making it more of a python dictionary than actual YAML syntax.

The method from RTD never worked for me, but using the syntax from the salt-states repo did work.

Can anyone else reproduce the issue i am experiencing? In case it matters, the "context" section I was trying to define is within an if / elif jinja block, which itself is within a jinja for loop. I haven't tried it without the loop yet, so I don't know if being two levels deep in jinja flow control statements would have any impact. And it is 4am, so I am barely coherent enough to file this issue right now, let alone test things like this. :)

Will try to reproduce without the loop tomorrow.