origin is now default or upstream

pull/6/head
Emilien Mantel 2015-07-16 10:56:28 +02:00
parent 32bca3d780
commit 5f936c5a52
5 changed files with 10 additions and 10 deletions

View File

@ -13,12 +13,12 @@ None.
Role Variables
--------------
- `mysql_origin`: origin of the package ("default", "mariadb", "percona")
- `mysql_origin`: origin of the package ("default" or "upstream")
- `mysql_vendor`: "mysql", "mariadb" or "percona"
### Configuration
- mysql\_cnf: key/value hash see [defaults/main.yml](default vars file)
- `mysql_cnf`: key/value hash see [defaults/main.yml](default vars file)
- `mysql_root_password`: root password (should be protected with [vault](http://docs.ansible.com/playbooks_vault.html))
### Databases
@ -31,7 +31,7 @@ Role Variables
Example:
```
mysql\_users:
mysql_users:
- name: 'kiki'
password: '123'
priv: hihi.*:ALL

View File

@ -3,7 +3,7 @@
# -------------------------------------
# Setup
# -------------------------------------
mysql_origin: 'mariadb'
mysql_origin: 'upstream'
mysql_vendor: 'mariadb'
mysql_root_password: 'change_me_NOW'

View File

@ -6,8 +6,8 @@
not (
(mysql_origin == 'default' and mysql_vendor == 'mysql') or
(mysql_origin == 'default' and mysql_vendor == 'mariadb' and ansible_distribution_major_version > 7) or
(mysql_origin == 'mariadb' and mysql_vendor == 'mariadb') or
(mysql_origin == 'percona' and mysql_vendor == 'percona')
(mysql_origin == 'upstream' and mysql_vendor == 'mariadb') or
(mysql_origin == 'upstream' and mysql_vendor == 'percona')
)
- name: APT | Update cache
@ -22,12 +22,12 @@
when: mysql_origin == 'default' and mysql_vendor == 'mariadb' and ansible_distribution_major_version > 7
- name: INCLUDE | Install MariaDB from MariaDB repo
include: 'install_mariadb_mariadb.yml'
when: mysql_origin == 'mariadb' and mysql_vendor == 'mariadb'
include: 'install_upstream_mariadb.yml'
when: mysql_origin == 'upstream' and mysql_vendor == 'mariadb'
- name: INCLUDE | Install Percona Server from Percona repo
include: 'install_percona_percona.yml'
when: mysql_origin == 'percona' and mysql_vendor == 'percona'
include: 'install_upstream_percona.yml'
when: mysql_origin == 'upstream' and mysql_vendor == 'percona'
- name: APT | Install few MySQL related tools
apt: pkg={{ item }} state=latest