Files
kolla-ansible/ansible/roles/mariadb/tasks/register.yml
SamYaple 80b7266ed1 Rename kolla_ansible to kolla_toolbox
This change is needed for clarity. We have a kolla-ansible script.
We have a kolla-mesos repo. We plan to have a kolla-ansible repo.
Already we have had far too much confusion about whether we are
talking about the container or the project. Naming this kolla-toolbox
eliminates all of that confusion and its probably a bit more accurate
of a name too.

Closes-Bug: #1541053
Change-Id: I8fd1f49d5a22b36ede5b10f46b9fe02ddda9007e
2016-02-02 18:12:15 +00:00

21 lines
756 B
YAML

---
- name: Creating haproxy mysql user
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user
-a "login_host='{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}'
login_port='{{ mariadb_port }}'
login_user='{{ database_user }}'
login_password='{{ database_password }}'
name='haproxy'
password=''
host='%'"
register: haproxy_user
changed_when: "{{ haproxy_user.stdout.find('localhost | SUCCESS => ') != -1 and (haproxy_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
until: haproxy_user.stdout.split()[2] == 'SUCCESS'
retries: 10
delay: 5
- name: Cleaning up facts
set_fact:
delegate_host: "bootstraped"