How to provide a [item1, item2] list as argument using ini format.

24 views
Skip to first unread message

AIXTools

unread,
Nov 4, 2020, 2:41:06 PM11/4/20
to Ansible Project
In ANSIBLE.CFG, using int format I need to add an argument such as:

interpreter_python_fallback = ["/opt/bin/python3.6", "python3", "python3.7", "python3.6", "python3.5", "python2.7", "python2.6", "python", "/opt/freeware/bin/python", "/opt/bin/python3"]

I have been told that the [ ] form is not 'recognized' as a list argument. So, is there a way?

Many thanks.

M

AIXTools

unread,
Nov 4, 2020, 2:42:20 PM11/4/20
to Ansible Project
Wish I could edit - INI format (not int)

Dick Visser

unread,
Nov 5, 2020, 11:49:00 AM11/5/20
to ansible...@googlegroups.com
You need to quote the whole thing, but with a different quote than the
one you already use to quote the individual list items.
In your case add single quotes around the value.
Also, there should not be any spaces between the var name, the equal
sign, and the value.
Concluding:


interpreter_python_fallback='["/opt/bin/python3.6", "python3",
"python3.7", "python3.6", "python3.5", "python2.7", "python2.6",
"python", "/opt/freeware/bin/python", "/opt/bin/python3"]'
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a7e8e6a5-6284-4104-9d90-fe86d3df7e07n%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Brian Coca

unread,
Nov 5, 2020, 12:47:12 PM11/5/20
to Ansible Project
ini format a list is just comma separated, loose the [ ]

diff note, that setting is not configurable by users.
--
----------
Brian Coca

Reply all
Reply to author
Forward
0 new messages