hpc-cloud/mariadb.yml

24 lines
683 B
YAML
Raw Normal View History

2017-04-18 13:17:32 +02:00
# Install a docker based mariadb.
---
- name: Install a mariadb server with databases in a persistent volume
hosts: all # Should be specified of course
become: True
tasks:
- name: install docker packages
apt: pkg={{ item }} state=latest update_cache=yes
with_items:
- docker-engine
- name: install service file.
template:
src: files/mysql.service
dest: /etc/systemd/system/mysql.service
mode: 644
owner: root
group: root
- name: install service file
command: systemctl daemon-reload
- name: make sure service is started
systemd:
name: mariadb.service
state: started