summaryrefslogtreecommitdiff
path: root/database/instance-config.yml
diff options
context:
space:
mode:
Diffstat (limited to 'database/instance-config.yml')
-rw-r--r--database/instance-config.yml23
1 files changed, 5 insertions, 18 deletions
diff --git a/database/instance-config.yml b/database/instance-config.yml
index 97070f46..6592b394 100644
--- a/database/instance-config.yml
+++ b/database/instance-config.yml
@@ -5,31 +5,18 @@
- hosts: database-mariadb
gather_facts: False
sudo: yes
- vars:
- DATABASE_VOLUME_SIZE: 25g
tasks:
- name: ensure system up to date
yum: name=* state=latest
+ # FIXME: the create-data-volume.yml role should handle this... the gotcha
+ # is that this won't work in Baserock systems right now. Once there's an
+ # lvm2-lvmetad.service in Baserock we can move this entry to
+ # create-data-volume.yml.
- name: ensure LVM metadata service is running
service: name=lvm2-lvmetad enabled=yes state=started
- # We use LVM on the storage volume to allow taking a snapshot of the
- # database as part of the database backup procedure.
- - name: LVM logical volume group on /dev/vdb
- lvg: vg=vg0 pvs=/dev/vdb
-
- - name: logical volume for database
- lvol: vg=vg0 lv=database size={{ DATABASE_VOLUME_SIZE }}
-
- # This will NEVER overwrite an existing filesystem. Unless you add
- # 'force=yes' to the arguments. So don't do that. See:
- # http://docs.ansible.com/filesystem_module.html.
- - name: ext4 filesystem on /dev/vg0/database
- filesystem: fstype=ext4 dev=/dev/vg0/database
-
- - name: mount database logical volume
- mount: src=/dev/vg0/database name=/var/lib/mysql fstype=ext4 state=mounted
+ - include: ../tasks/create-data-volume.yml lv_name=database lv_size=25g mountpoint=/var/lib/mysql
- name: ensure mysql user owns /var/lib/mysql
file: path=/var/lib/mysql owner=mysql group=mysql mode=600 state=directory