diff options
author | shuai chen <chenshuai@huawei.com> | 2016-02-24 07:41:29 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-02-24 07:41:29 +0000 |
commit | e38c1a6d08b10ea81d208bd40b9df1a13d28db8c (patch) | |
tree | 44beff459154f239469579882e559c2027649d95 /deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml | |
parent | 3eab3cd722870e6c02ee1337d3536dc68f89b13e (diff) | |
parent | e72bc045fd467a442a0ffb1c78e710a270a59dfa (diff) |
Merge "Support version Liberty of OpenStack for CENTOS7"
Diffstat (limited to 'deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml')
-rw-r--r-- | deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml index d4ef6dd1..f9811dfa 100644 --- a/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml +++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml @@ -8,11 +8,14 @@ ############################################################################## --- - name: create all needed db - mysql_db: name={{ item.db }} state=present + mysql_db: login_unix_socket=/var/run/mysqld/mysqld.sock name={{ item.db }} state=present with_items: "{{ credentials }}" + tags: + - test_db - name: create service db user mysql_user: + login_unix_socket=/var/run/mysqld/mysqld.sock name={{ item[0].user }} password={{ item[0].password }} priv=*.*:ALL,GRANT @@ -20,13 +23,16 @@ state=present with_nested: - "{{ credentials }}" - - ['%', 'localhost', inventory_hostname] + - ['%', 'localhost', '{{ inventory_hostname }}'] + tags: + - test_user - name: create wsrep db user mysql_user: + login_unix_socket=/var/run/mysqld/mysqld.sock name={{ WSREP_SST_USER }} password={{ WSREP_SST_PASS }} priv=*.*:ALL,GRANT host={{ item }} state=present - with_items: ['%', 'localhost', inventory_hostname] + with_items: ['%', 'localhost', '{{ inventory_hostname }}'] |