mariadb/tasks/setup-Archlinux.yml
2019-04-16 18:32:06 +02:00

22 lines
635 B
YAML

---
- name: Ensure MySQL Python libraries are installed.
pacman:
name:
- mysql-python
- python-mysqlclient
state: present
- name: Ensure MySQL packages are installed.
pacman: "name={{ mysql_packages }} state=present"
register: arch_mysql_install_packages
- name: clean /var/lib/mysql if new instaled
file: path=/var/lib/mysql state=absent
when: arch_mysql_install_packages.changed
- name: Run mysql_install_db if MySQL packages were changed.
command: mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
when: arch_mysql_install_packages.changed
tags: ['skip_ansible_lint']