Tony Mack | 336e0f9 | 2014-11-30 15:53:08 -0500 | [diff] [blame] | 1 | --- |
| 2 | - hosts: 127.0.0.1 |
| 3 | connection: local |
| 4 | tasks: |
Tony Mack | 6cf731b | 2015-09-22 14:35:10 +0000 | [diff] [blame] | 5 | - shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT={{admin_tenant}} DOMAIN={{domain}} /opt/xos/openstack/get_token.sh |
Tony Mack | 09a2f07 | 2015-09-14 00:53:39 +0000 | [diff] [blame] | 6 | register: token |
Sapan Bhatia | f123cc2 | 2015-05-13 15:51:29 +0200 | [diff] [blame] | 7 | {% if delete -%} |
Andy Bavier | 15cdde2 | 2015-09-24 14:17:27 -0400 | [diff] [blame] | 8 | - keystone_user: endpoint={{ endpoint }} token={{ '{{' }} token.stdout {{ '}}' }} tenant={{ tenant }} tenant_description="{{ tenant_description }}" state=absent |
| 9 | {% else -%} |
| 10 | - keystone_user: endpoint={{ endpoint }} token={{ '{{' }} token.stdout {{ '}}' }} tenant={{ tenant }} tenant_description="{{ tenant_description }}" |
Tony Mack | 336e0f9 | 2014-11-30 15:53:08 -0500 | [diff] [blame] | 11 | {% for role in roles %} |
Andy Bavier | 15cdde2 | 2015-09-24 14:17:27 -0400 | [diff] [blame] | 12 | - keystone_user: endpoint={{ endpoint }} token={{ '{{' }} token.stdout {{ '}}' }} user="{{ name }}" role={{ role }} tenant={{ tenant }} |
Tony Mack | 336e0f9 | 2014-11-30 15:53:08 -0500 | [diff] [blame] | 13 | {% endfor %} |
Andy Bavier | 15cdde2 | 2015-09-24 14:17:27 -0400 | [diff] [blame] | 14 | {% endif %} |