Ver código fonte

Fix automysqlbackup script to also backup events

Emmanuel Bouthenot 10 anos atrás
pai
commit
9d3d1fb0b9
1 arquivos alterados com 7 adições e 0 exclusões
  1. 7 0
      roles/dbserver/tasks/mysql.yml

+ 7 - 0
roles/dbserver/tasks/mysql.yml

@@ -5,6 +5,13 @@
     - automysqlbackup
   when: with_mysql
 
+- name: Fix automysqlbackup to handle events properly
+  lineinfile:
+    dest: /usr/sbin/automysqlbackup
+    regexp: "^OPT="
+    line: 'OPT="--quote-names --events" # OPT string for use with mysqldump ( see man mysqldump )'
+  when: with_mysql
+
 - name: Change mysql root default password
   raw: if "SELECT VERSION();" | mysql -u root >/dev/null 2>&1 ; then echo "UPDATE mysql.user SET Password=PASSWORD('{{ mysql_root_password }}') WHERE User IN ('', 'root'); FLUSH PRIVILEGES;" | mysql --defaults-file=/etc/mysql/debian.cnf ; fi
   when: with_mysql