hpc-cloud/roles/mariadb/tasks/main.yml

37 lines
705 B
YAML
Raw Normal View History

# Install a docker based mariadb.
---
- name: include secrets
include_vars:
file: ../../secrets.yml
name: secrets
- name: install service file.
template:
src: templates/mysql.service
dest: /etc/systemd/system/mysql.service
mode: 644
owner: root
group: root
- name: make mariadb settings volume
file:
2017-08-02 15:22:10 +02:00
path: "{{ item }}"
state: directory
mode: 0777
2017-08-02 15:22:10 +02:00
with_items:
- /srv/mariadb/lib/mysql
- /srv/mariadb/etc/mysql
- name: place settings file
copy:
src: files/my.cnf
dest: /srv/mariadb/etc/mysql
mode: 660
- command: systemctl daemon-reload
- name: make sure service is started
systemd:
name: mysql.service
state: started