Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erlang tuples can't be specified #3

Open
ajsalminen opened this issue Oct 29, 2015 · 2 comments
Open

Erlang tuples can't be specified #3

ajsalminen opened this issue Oct 29, 2015 · 2 comments

Comments

@ajsalminen
Copy link

There is no way to define a tuple at least via YAML for the jinja2 templates. I didn't see a clear way to add this either as there is only the one sequence type in YAML.

In my case I resorted to adding a way (see this commit) to pass a string as is and without quoting if it's started with "", a character which cannot exist unescaped in Erlang strings. It of course breaks the 1-to-1 mapping but I feel like it could be useful in other cases as well. Would that be something you'd be willing to incorporate into the template?

@jtyr
Copy link
Contributor

jtyr commented Oct 29, 2015

This issue was discussed here: picotrading/ansible-rabbitmq#1
Please test it and let me know if it works for you.

@ajsalminen
Copy link
Author

Yes, that would work. Seems like the same solution applied to a slightly different problem.

Is the ":" a better character choice than the "" that I proposed? I chose it purely because it cannot be in an erlang string without being escaped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants