From 5f936c5a5267f4096787a04ef7e5ca03f283038f Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Thu, 16 Jul 2015 10:56:28 +0200 Subject: [PATCH] origin is now default or upstream --- README.md | 6 +++--- defaults/main.yml | 2 +- tasks/install.yml | 12 ++++++------ ...iadb_mariadb.yml => install_upstream_mariadb.yml} | 0 ...cona_percona.yml => install_upstream_percona.yml} | 0 5 files changed, 10 insertions(+), 10 deletions(-) rename tasks/{install_mariadb_mariadb.yml => install_upstream_mariadb.yml} (100%) rename tasks/{install_percona_percona.yml => install_upstream_percona.yml} (100%) diff --git a/README.md b/README.md index 40df4ac..2825e03 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/defaults/main.yml b/defaults/main.yml index 8251da5..34c7ac3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,7 +3,7 @@ # ------------------------------------- # Setup # ------------------------------------- -mysql_origin: 'mariadb' +mysql_origin: 'upstream' mysql_vendor: 'mariadb' mysql_root_password: 'change_me_NOW' diff --git a/tasks/install.yml b/tasks/install.yml index 3fae437..c30f232 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -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 diff --git a/tasks/install_mariadb_mariadb.yml b/tasks/install_upstream_mariadb.yml similarity index 100% rename from tasks/install_mariadb_mariadb.yml rename to tasks/install_upstream_mariadb.yml diff --git a/tasks/install_percona_percona.yml b/tasks/install_upstream_percona.yml similarity index 100% rename from tasks/install_percona_percona.yml rename to tasks/install_upstream_percona.yml