ansible-roles/mysql/tasks/manage-mysql-service.yml

12 lines
342 B
YAML
Raw Normal View History

---
- name: Ensure that the mysql server is enabled and running
service: name=mysql state=started enabled=yes
when: mysql_enabled
tags: [ 'mysql', 'mariadb' ]
- name: Stop and disable the mysql server if we do not want it running
service: name=mysql state=stopped enabled=no
when: not mysql_enabled
tags: [ 'mysql', 'mariadb' ]