summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/database
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2016-12-22 16:59:08 +0800
committerliyuenan <liyuenan@huawei.com>2016-12-26 17:54:43 +0800
commit6072a49adb33f2bce3f48b9c7b8be7d96cf8501c (patch)
treea78a15b915741bb3ef7ddd4a61a801dd9f46d577 /deploy/adapters/ansible/roles/database
parenta9041dbf7b68f56169e82de3c37601b7e86867b0 (diff)
Update ansible version
JIRA: COMPASS-511 Change-Id: Id0e83c65a08c9f9036b5d3a597b905e8a7bde6e8 Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/database')
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml4
-rwxr-xr-xdeploy/adapters/ansible/roles/database/tasks/mongodb_config.yml13
-rwxr-xr-xdeploy/adapters/ansible/roles/database/tasks/mongodb_install.yml4
3 files changed, 17 insertions, 4 deletions
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
index 1b08172d..d1897173 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
@@ -22,7 +22,7 @@
- name: install python-mysqldb
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: maridb_packages | union(packages_noarch)
+ with_items: "{{ maridb_packages | union(packages_noarch) }}"
- name: create conf dir for wsrep
file: path=/etc/my.cnf.d state=directory mode=0755
@@ -34,7 +34,7 @@
dest: '{{ item.dest }}'
backup: yes
mode: 0644
- with_items: mysql_config
+ with_items: "{{ mysql_config }}"
- name: bugfix for rsync version 3.1
lineinfile:
diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml
index 0a449f86..76aa5675 100755
--- a/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml
@@ -36,9 +36,20 @@
- debug: msg='{{ servers.stdout |int }}'
+- name: Add admin user
+ mongodb_user:
+ login_host: "{{ internal_vip.ip }}"
+ database: admin
+ name: root
+ password: root
+ roles: 'root'
+ state: present
+
- name: create mongodb user and db
mongodb_user:
login_host: "{{ internal_vip.ip }}"
+ login_user: root
+ login_password: root
database: ceilometer
name: ceilometer
password: "{{ CEILOMETER_DBPASS }}"
@@ -48,6 +59,8 @@
- name: grant user privilege
mongodb_user:
login_host: "{{ internal_vip.ip }}"
+ login_user: root
+ login_password: root
database: ceilometer
name: ceilometer
password: "{{ CEILOMETER_DBPASS }}"
diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml
index dea15a83..bac6c6eb 100755
--- a/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml
@@ -9,11 +9,11 @@
---
- name: install mongodb packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: mongodb_packages | union(packages_noarch)
+ with_items: "{{ mongodb_packages | union(packages_noarch) }}"
- name: install pymongod packages
pip: name={{ item }} state=present extra_args='--pre'
- with_items: pip_packages
+ with_items: "{{ pip_packages }}"
- name: copy ceilometer configs
template: src=mongodb.conf dest=/opt/os_templates backup=yes