import yaml
with open("defaults.yaml", 'r') as stream:
try:
print(yaml.load(stream))
except yaml.YAMLError as exc:
print(exc)
The only differences you're likely to notice are:
* No access to Jinja filters. In practice this doesn't matter because
you'll have Python instead. ;-)
* Since you're also not using YAML you won't have the implicit,
source-order (top-down) execution order. We have a custom YAML parser
that keeps track of the order that it parses .sls files. Without that
you'll need to use requisites everywhere to enforce ordering.
On Wed, Jun 7, 2017 at 9:59 AM, Herbert Fischer
<herbert.fischer@crossengage.io> wrote:
> Hi,
>
> I am heavily considering writing my states in py renderers because of python
> flexibility, but I am afraid that some stuff might not work the same as with
> the default jinja renderer.
>
> I wish to be able to load yamls, merge stuff with pillar, etc.
>
> What SaltStack has available by default for this matters? Do I need to
> import python modules for this stuff? Can I?
>
> best,
>
> Herbert
>
> --
>
> --
> You received this message because you are subscribed to the Google Groups
> "Salt-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to salt-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/salt-users/CALbgzt_KksxWNeyXuKiXDVx_g5W1dNAJmsV%3DNS%3D_dAk5AvSDqg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CABsXarGsHWcQDyMr8%3DGTdpxHz28snDSt7UY%2ByK9wVJG%2B3dkAfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
>> > email to salt-users+unsubscribe@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/salt-users/CALbgzt_KksxWNeyXuKiXDVx_g5W1dNAJmsV%3DNS%3D_dAk5AvSDqg%40mail.gmail.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Salt-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to salt-users+unsubscribe@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/salt-users/CABsXarGsHWcQDyMr8%3DGTdpxHz28snDSt7UY%2ByK9wVJG%2B3dkAfw%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Herbert Fischer | Senior IT Architect
> CrossEngage GmbH | Bertha-Benz Straße 5 | 10557 Berlin
>
> E-Mail: herbert...@crossengage.io
> Web: www.crossengage.io
>
> Amtsgericht Berlin-Charlottenburg | HRB 169537 B
> Geschäftsführer: Dr. Markus Wübben, Manuel Hinz | USt-IdNr.: DE301504202
>
> --
> You received this message because you are subscribed to the Google Groups
> "Salt-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to salt-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
>
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CABsXarGRoGQ5JBytS5FTJ57ZMNOjrNES6jEwgyX32T1y5VbKOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.