From 7b2439e59069b52e35b096ae0d8029f3ef7f8025 Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Sun, 12 Jul 2015 12:47:44 +0200 Subject: [PATCH] Default MySQL works on jessie --- .gitignore | 2 ++ defaults/main.yml | 4 ++-- handlers/handlers/main.yml | 4 ---- handlers/main.yml | 4 +++- tasks/install.yml | 2 +- tasks/main.yml | 3 +++ templates/{templates => }/etc/apt/preferences.d/95-percona.j2 | 0 templates/{templates => }/etc/mysql/conf.d/98-config.cnf.j2 | 0 templates/{templates => }/root/my.cnf | 0 9 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 .gitignore delete mode 100644 handlers/handlers/main.yml rename templates/{templates => }/etc/apt/preferences.d/95-percona.j2 (100%) rename templates/{templates => }/etc/mysql/conf.d/98-config.cnf.j2 (100%) rename templates/{templates => }/root/my.cnf (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd8e52a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.vagrant* +*.swp diff --git a/defaults/main.yml b/defaults/main.yml index 72c4cc3..ad6fdfc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,8 +3,8 @@ # ------------------------------------- # Setup # ------------------------------------- -mysql_origin: 'mariadb' -mysql_vendor: 'mariadb' +mysql_origin: 'default' +mysql_vendor: 'mysql' mysql_root_password: 'change_me_NOW' # ------------------------------------- diff --git a/handlers/handlers/main.yml b/handlers/handlers/main.yml deleted file mode 100644 index 736f653..0000000 --- a/handlers/handlers/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -- name: restart mysql - action: service name=mysql state=restarted enabled=yes diff --git a/handlers/main.yml b/handlers/main.yml index 050cdd1..736f653 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,2 +1,4 @@ --- -# handlers file for . + +- name: restart mysql + action: service name=mysql state=restarted enabled=yes diff --git a/tasks/install.yml b/tasks/install.yml index bca86ff..fe2c765 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -2,7 +2,7 @@ - name: INCLUDE | Install MySQL from default repo include: 'install_default_mysql.yml' - when: mysql_origin == 'default' mysql_vendor == 'mysql' + when: mysql_origin == 'default' and mysql_vendor == 'mysql' - name: INCLUDE | Install MariaDB from Debian repo include: 'install_default_mariadb.yml' diff --git a/tasks/main.yml b/tasks/main.yml index ab2f608..7bb0820 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -12,6 +12,9 @@ register: mysql_exists changed_when: false +- name: INCLUDE | Install + include: install.yml + - name: TEMPLATE | Deploy daemon configuration template: src=etc/mysql/conf.d/98-config.cnf.j2 dest=/etc/mysql/conf.d/98-config.cnf notify: restart mysql diff --git a/templates/templates/etc/apt/preferences.d/95-percona.j2 b/templates/etc/apt/preferences.d/95-percona.j2 similarity index 100% rename from templates/templates/etc/apt/preferences.d/95-percona.j2 rename to templates/etc/apt/preferences.d/95-percona.j2 diff --git a/templates/templates/etc/mysql/conf.d/98-config.cnf.j2 b/templates/etc/mysql/conf.d/98-config.cnf.j2 similarity index 100% rename from templates/templates/etc/mysql/conf.d/98-config.cnf.j2 rename to templates/etc/mysql/conf.d/98-config.cnf.j2 diff --git a/templates/templates/root/my.cnf b/templates/root/my.cnf similarity index 100% rename from templates/templates/root/my.cnf rename to templates/root/my.cnf