OS_TOKEN environment variable with os_* modules

28 views
Skip to first unread message

Curtis

unread,
Mar 2, 2016, 2:14:22 PM3/2/16
to ansible...@googlegroups.com
Hi,

I'm having a hard time getting the os_user (and I would imagine other
modules) to work just using a service token, ie. there are no users in
keystone yet, so need to create them using the service token.

How would I do that with the os_* modules? I can get the openstack
python client to work with just OS_TOKEN and OS_URL environment
variables also using V3 of the identity API, but can't get the os_user
module to work with the same, setting environment variables in the
playbook.

I'm on ansible 2.0.1.0.

Thanks for any help,
Curtis.

Mārtiņš Balodis

unread,
May 16, 2016, 8:34:43 AM5/16/16
to Ansible Project
I have the same problem. The docs state that auth configuration could be read from environment via OS_* variables but it seems that doesn't use the "OS_TOKEN" environment variable. Right now I am running a bunch of commands like this:

- name: Create keystone domains with cli client
  command: openstack domain create --description "{{ item.description }}" {{ item.name }}
  environment: "{{ os_keystone_auth_env }}"
  register: command_result
  failed_when: "'two projects acting as domains with the same name' not in command_result.stderr and command_result.stderr != ''"
  with_items: "{{ keystone_domains }}"
Reply all
Reply to author
Forward
0 new messages