Howto specify a tuple in YAML

19,207 views
Skip to first unread message

Robert Fach

unread,
Aug 25, 2015, 11:55:00 AM8/25/15
to Salt-users
Hi,

is it possible to specify a tuple in a YAML configuration file? The goal is that salt accepts/creates the tuple in python, so that it can be passed as a parameter to a salt utility module (in my case salt/utils/etcd_utily.py). My goal is to pass in a tuple of host,port pairs.

So, the question is: Which YAML Configuration maps to ((HOST1,PORT1),(HOST2,PORT2),(HOST3,PORT3)) (in Python) ?

Thx,

Colton Myers

unread,
Sep 3, 2015, 4:48:49 PM9/3/15
to salt-...@googlegroups.com
The YAML safeloader doesn't support tuples, as far as I know. Unfortunately you'll have to pass in lists, I think.

--
Colton Myers
Core Engineer, SaltStack
@basepi on Twitter/Github/IRC

--
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+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Arnold Bechtoldt

unread,
Sep 4, 2015, 3:31:59 AM9/4/15
to salt-...@googlegroups.com
See also https://github.com/saltstack/salt/issues/13831.


Arnold

--
+arnoldbechtoldt • arnoldB@IRC • bechtoldt@GH • arbe.io
> <mailto:salt-users+...@googlegroups.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+...@googlegroups.com
> <mailto:salt-users+...@googlegroups.com>.
0xE2356889.asc
signature.asc
Reply all
Reply to author
Forward
0 new messages