Hi,
thanks a lot for your remarks, Bo. However, I am a bit confused:
On 7. Aug 2017, at 10:31, Bo Maryniuk <
b...@maryniuk.net> wrote:
> The old syntax you can get back by setting "use_deprecated:
> modules.run" option in your config. But this will stop working two
> years later — enough time to migrate.
According to the 2017.7.0 release notes [1] and the 2017.7 docs [2], the new syntax must be explicitly enabled using `use_superseded` (opt-in vs. opt-out). I would also expect the old syntax to be deprecated at some point, but at the moment, no steps in that direction seem to have been taken.
> But then we thought: why not just stop all that thing
> and simply avoid by design? So the new syntax born. And it is actually
> much better, because:
>
> 1. It is pure Yaml, forget JSON-like inclusions with '{...}' things.
> 2. It is simpler, no need to use quotes on strings etc.
I fully agree that the new syntax is much more intuitive.
That being said, I don’t get the point about YAML vs. JSON: As far as I understand, the curly braces from the docs were just an alternative syntax for a YAML dictionary.
In the example I prepared for Joe, the "nicer" dictionary syntax (without curly braces) is used and that appears to work just fine.
> Basically, please read the manual carefully and change your
> 'module.run' calls accordingly.
> In case you still have questions, go ahead asking them. But I am sure
> they are likely because you didn't read manual properly. :-)
I think "carefully“ is the crucial point now: If you read the docs from top to bottom, you will probably get it.
However, if you expect the examples from the top (or anywhere else for that matter) to be copy/paste-able, you will run into problems since the note about `use_superseded` is buried at the bottom.
Additionally, the examples are kind of mixed with no clear distinction: It starts with some new-style code, then there is some old-style code after "With the previous module.run there are several differences" and after "Another option is to use the new version of module.run" the new version is used again, this time with the not about `use_superseded`.
I think some headings would help greatly here.
That the signature for `module.run` is completely missing [3] is also disadvantageous, but doesn’t make a huge difference.
[2]
https://docs.saltstack.com/en/2017.7/ref/states/all/salt.states.module.html
[3]
https://github.com/saltstack/salt/issues/42260