Files
kolla-ansible/ansible/roles/kuryr/tasks/register.yml
Hui Kang 0d28b311eb Add Kuryr ansible role
Change-Id: I7134bffab940ee780e5f5010d639af56f97b41d6
Co-authored-by: Mohammad Banikazemi <mb@us.ibm.com>
Co-Authored-By: zhubingbing <zhubingbing10@gmail.com>
Co-Authored-By: Antoni Segura Puimedon <antonisp@celebdor.com>
Partially-implements: bp kuryr-docker-plugin
2016-09-15 23:47:22 +00:00

18 lines
710 B
YAML

---
- name: Creating the Kuryr project, user, and role
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m kolla_keystone_user
-a "project=service
user={{ kuryr_keystone_user }}
password={{ kuryr_keystone_password }}
role=admin
region_name={{ openstack_region_name }}
auth={{ '{{ openstack_kuryr_auth }}' }}"
-e "{'openstack_kuryr_auth':{{ openstack_kuryr_auth }}}"
register: kuryr_user
changed_when: "{{ kuryr_user.stdout.find('localhost | SUCCESS => ') != -1 and (kuryr_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
until: kuryr_user.stdout.split()[2] == 'SUCCESS'
retries: 10
delay: 5
run_once: True