--- # Copyright 2014, Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - name: Create the local directories file: path: "{{ item.path }}" state: "directory" owner: "{{ item.owner|default('root') }}" group: "{{ item.group|default('root') }}" mode: "{{ item.mode|default('0755') }}" recurse: "{{ item.recurse|default('false') }}" with_items: - { path: "/var/log/mysql/", owner: "mysql", recurse: "true" } - { path: "/var/log/mysql_logs/", owner: "mysql", group: "syslog", mode: "2755" } - { path: "/etc/mysql/conf.d" } tags: - galera-config - name: Drop mariadb config(s) template: src: "{{ item.src }}" dest: "{{ item.dest }}" mode: "{{ item.mode|default('0644') }}" with_items: - { src: my.cnf.j2, dest: /etc/mysql/my.cnf } - { src: cluster.cnf.j2, dest: /etc/mysql/conf.d/cluster.cnf } - { src: debian.cnf.j2, dest: /etc/mysql/debian.cnf } - { src: mysql_defaults.j2, dest: /etc/default/mysql } notify: Restart mysql tags: - galera-config - name: Drop mariadb script(s) copy: src: "{{ item.src }}" dest: "{{ item.dest }}" mode: "{{ item.mode|default('0644') }}" with_items: - { src: mysql_init.sh, dest: /etc/init.d/mysql, mode: "0755" } notify: Restart mysql tags: - galera-config - name: Remove policy-rc file: path: "/usr/sbin/policy-rc.d" state: absent tags: - galera-config