Groups
Groups
Sign in
Groups
Groups
Ansible Project
Conversations
About
Send feedback
Help
environment variables
44 views
Skip to first unread message
John Test
unread,
Apr 24, 2015, 1:21:08 PM
4/24/15
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
Hello
I am trying to use environment variables in my playbook instead of static entries.
For example username, password etc. for Openstack.
I have seen this page
http://docs.ansible.com/playbooks_environment.html
But I don't understand how to pass specific environment variables inside a playbook.
In case of Openstack we have
OS_PASSWORD=Password1
OS_AUTH_URL=
http://controller:35357/v2.0
OS_USERNAME=demo
OS_TENANT_NAME=demo
How can I assign these in a playbook such as this
http://pastebin.com/aMaihCme
Thanks!
Brian Coca
unread,
Apr 24, 2015, 1:31:57 PM
4/24/15
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
i think what you want is:
lookup('env', 'OS_PASSWORD')
> --
> 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 post to this group, send email to
ansible...@googlegroups.com
.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/ansible-project/f9a70b3e-003c-4198-9821-877793ba9b85%40googlegroups.com
.
> For more options, visit
https://groups.google.com/d/optout
.
--
Brian Coca
John Test
unread,
Apr 24, 2015, 2:41:23 PM
4/24/15
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
Thanks Brian.
Reply all
Reply to author
Forward
0 new messages