Groups
Groups
Sign in
Groups
Groups
Ansible Project
Conversations
About
Send feedback
Help
Variables on Extra-Vars within Extra-Vars-File
13 views
Skip to first unread message
wpgpo...@gmail.com
unread,
Sep 14, 2023, 12:42:18 PM
9/14/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hello Groups,
Is there any way that we can have a variable within a variable-file?
Example:
ansible-playbook -i localhost -e "test=var1 some=ex_1" -e "@files/dev/sample_ex_1.yml"
Desired:
ansible-playbook -i localhost -e "test=var1 some=ex_1" -e "@files/dev/sample_{{ some }}.yml"
Thank you...
Brian Coca
unread,
Sep 14, 2023, 3:50:24 PM
9/14/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
No, buton the other hand... its still shell:
ansible-playbook -i localhost -e "test=var1
some=${THIS_IS_AN_ENV_VAR}" -e
"@files/dev/sample_${THIS_IS_AN_ENV_VAR}.yml"
--
----------
Brian Coca
wpgpo...@gmail.com
unread,
Sep 14, 2023, 4:42:41 PM
9/14/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Yes, that is what I'm actually doing by putting the same value.
Thank you
Reply all
Reply to author
Forward
0 new messages