summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/database
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-11-09 00:37:19 -0800
committerbaigk <baiguoku@huawei.com>2015-11-16 07:03:05 +0000
commitcb5ae68b968f28c1cedee3720ff14cf5fa1ab92c (patch)
tree74c81a96b8a76de1b5e67e4a2f7097f643ad6709 /deploy/adapters/ansible/roles/database
parente28554faea569b5e6d15b3816df702e664b5bba4 (diff)
suport installing openstack kilo on centos 7
JIRA: COMPASS-141 Change-Id: I8b4eeacd802124cd05d17c7c24682254f0c567f7 Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/database')
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mongodb.yml6
-rw-r--r--deploy/adapters/ansible/roles/database/vars/Debian.yml4
-rw-r--r--deploy/adapters/ansible/roles/database/vars/RedHat.yml10
3 files changed, 19 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
index 5ca23a19..c46a2932 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
@@ -3,6 +3,10 @@
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items: mongodb_packages | union(packages_noarch)
+- name: install pymongod packages
+ pip: name={{ item }} state=present extra_args='--pre'
+ with_items: pip_packages
+
- name: copy ceilometer configs
template: src=mongodb.conf dest=/opt/os_templates backup=yes
@@ -17,7 +21,7 @@
- /var/lib/mongodb/journal/*
- name: manually restart mongodb server
- service: name=mongodb state=restarted
+ service: name={{ mongodb_serveice }} state=restarted
- wait_for: port=27017 delay=3 timeout=60 host={{ internal_vip.ip }}
diff --git a/deploy/adapters/ansible/roles/database/vars/Debian.yml b/deploy/adapters/ansible/roles/database/vars/Debian.yml
index 6f085ffd..7035c2bf 100644
--- a/deploy/adapters/ansible/roles/database/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/database/vars/Debian.yml
@@ -15,8 +15,12 @@ maridb_packages:
- mysql-wsrep-server-5.5
- galera-3
+pip_packages: []
+
services: []
+mongodb_serveice: mongodb
+
mysql_config_file_path: "/etc/mysql"
mysql_config_file_name: ["my.cnf"]
wsrep_config_file_path: "/etc/mysql/conf.d"
diff --git a/deploy/adapters/ansible/roles/database/vars/RedHat.yml b/deploy/adapters/ansible/roles/database/vars/RedHat.yml
index a4171559..ac2f2f22 100644
--- a/deploy/adapters/ansible/roles/database/vars/RedHat.yml
+++ b/deploy/adapters/ansible/roles/database/vars/RedHat.yml
@@ -4,13 +4,23 @@ mysql_packages:
- mysql-server
maridb_packages:
+ - MySQL-python
- MariaDB-Galera-server
- MariaDB-client
- galera
- MySQL-python
+mongodb_packages:
+ - mongo-10gen-server
+ - mongo-10gen
+
+pip_packages:
+ - pymongo
+
services: []
+mongodb_serveice: mongod
+
mysql_config_file_path: "/etc/my.cnf.d"
mysql_config_file_name: ["my-huge.cnf", "server.cnf"]
wsrep_config_file_path: "/etc/my.cnf.d"