summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/database
diff options
context:
space:
mode:
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