adds the config_template to galera_server

The change modifies the galera_server template tasks such that it's now
using the config_template action plugin. This change will make so that
config files can be dynamically updated, by a deployer, at run time,
without requiring the need to modify the in tree templates or defaults.

Partially implements: blueprint tunable-openstack-configuration

Change-Id: I6f34dff6e3a8ab8d2aad6a413b9a59f325c1be7b
This commit is contained in:
Kevin Carter 2015-09-14 18:46:57 -05:00 committed by Jesse Pretorius
parent 88c948c455
commit fa539a4ac8
2 changed files with 30 additions and 3 deletions

View File

@ -104,3 +104,8 @@ galera_debconf_items:
# Galera slow/unindexed query logging
galera_slow_query_logging: 0
galera_unindexed_query_logging: 0
## Tunable overrides
galera_my_cnf_overrides: {}
galera_cluster_cnf_overrides: {}
galera_debian_cnf_overrides: {}

View File

@ -28,15 +28,37 @@
tags:
- galera-config
- name: Drop mariadb config(s)
config_template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: "root"
group: "root"
mode: "0644"
config_overrides: "{{ item.config_overrides }}"
config_type: "{{ item.config_type }}"
with_items:
- src: my.cnf.j2
dest: /etc/mysql/my.cnf
config_overrides: "{{ galera_my_cnf_overrides }}"
config_type: "ini"
- src: cluster.cnf.j2
dest: /etc/mysql/conf.d/cluster.cnf
config_overrides: "{{ galera_cluster_cnf_overrides }}"
config_type: "ini"
- src: debian.cnf.j2
dest: /etc/mysql/debian.cnf
config_overrides: "{{ galera_debian_cnf_overrides }}"
config_type: "ini"
tags:
- galera-client-user-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: