|
|
@ -0,0 +1,37 @@ |
|
|
|
--- |
|
|
|
|
|
|
|
- name: Install prerequisites packages |
|
|
|
apt: pkg={{item}} state=installed install_recommends=no |
|
|
|
with_items: |
|
|
|
- python-software-properties |
|
|
|
- php5-cli |
|
|
|
- php5-mysql |
|
|
|
|
|
|
|
- name: Add MariaDB repository Key |
|
|
|
apt_key: keyserver=keyserver.ubuntu.com id=0xcbcb082a1bb943db state=present |
|
|
|
|
|
|
|
- name: Add Mariadb repository file |
|
|
|
template: src=etc_apt_sources.list.d_mariadb.list dest=/etc/apt/sources.list.d/mariadb.list |
|
|
|
|
|
|
|
- name: Install Mariadb packages |
|
|
|
apt: pkg={{item}} state=installed update_cache=yes |
|
|
|
with_items: |
|
|
|
- mariadb-server-{{ mariadb_version | default(10) }} |
|
|
|
- python-mysqldb |
|
|
|
- percona-toolkit |
|
|
|
|
|
|
|
- name: Set root mysql password |
|
|
|
mysql_user: name=root password={{mysql_root_password}} |
|
|
|
|
|
|
|
- name: File .my.cnf for root |
|
|
|
template: src={{item.src}} dest={{item.dest}} |
|
|
|
with_items : |
|
|
|
- { src: root-.my.cnf , dest: /root/.my.cnf } |
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure 600 permissions on my.cnf |
|
|
|
file: path=/root/.my.cnf mode=600 |
|
|
|
|
|
|
|
|
|
|
|
# vim: set textwidth=0 ft=yaml ts=2 sw=2 expandtab: |
|
|
|
# |