Multiple values in single "extra-vars" during runtime

654 views
Skip to first unread message

heena jain

unread,
Apr 24, 2020, 8:06:38 AM4/24/20
to Ansible Project
Hi,

Is it possible to assign multiple values to single "extra-vars" during runtime? 

Example:  ansible-playbook <playbook>.yml --extra-vars "customer=abc, xyz" 

I tried to google alot but havent found it. Can someone please help me?

Dick Visser

unread,
Apr 24, 2020, 8:29:10 AM4/24/20
to ansible...@googlegroups.com
Hii




On Fri, 24 Apr 2020 at 14:06, heena jain <heenaj...@gmail.com> wrote:
>
> Hi,
>
> Is it possible to assign multiple values to single "extra-vars" during runtime?

It's not entirely clear what you mean by that, but values passed in
using the key=value syntax are interpreted as strings. Use the JSON
format if you need to pass in anything that shouldn’t be a string
(Booleans, integers, floats, lists etc).

Taken from https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#passing-variables-on-the-command-line




--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
Reply all
Reply to author
Forward
0 new messages