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_cluster_debian.yml2
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mongodb.yml5
3 files changed, 7 insertions, 2 deletions
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml
index 96df442d..35ee5858 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml
@@ -3,6 +3,7 @@
service:
name: mysql
state: restarted
+ enabled: yes
args: "--wsrep-new-cluster"
when:
- inventory_hostname == haproxy_hosts.keys()[0]
@@ -21,6 +22,7 @@
service:
name: mysql
state: restarted
+ enabled: yes
when:
- inventory_hostname != haproxy_hosts.keys()[0]
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
index 41ee5ffe..97e00503 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
@@ -46,4 +46,4 @@
shell: rm -rf /var/lib/mysql/ib_logfile*
- name: set owner
- file: path=/var/lib owner=mysql group=mysql recurse=yes state=directory
+ file: path=/var/lib/mysql owner=mysql group=mysql recurse=yes state=directory
diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
index c5e1d6d1..ada7f7ef 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
@@ -21,7 +21,10 @@
- /var/lib/mongodb/journal/*
- name: manually restart mongodb server
- service: name={{ mongodb_service }} state=restarted
+ service: name={{ mongodb_service }} state=restarted enabled=yes
+
+- name: write mongodb to monitor list
+ lineinfile: dest=/opt/service create=yes line={{ mongodb_service}}
- wait_for: port=27017 delay=3 timeout=60 host={{ internal_vip.ip }}