Add ignore_none_type to config_template

The .cnf files can have valueless options present.
This commit ensures that these valueless options are not ignored

Addtionally, my.cnf overrides are added to the variable overrides
test file to ensure that the my.cnf file can run through the
config_template engine properly.

Change-Id: I8b09c2520c84bb43353b4c56bac157259f71b041
Closes-Bug: #1693234
This commit is contained in:
Miguel Alex Cantu 2017-06-27 15:59:31 +00:00
parent d4a2f20720
commit 34f52a673e
3 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,8 @@
---
fixes:
- |
Mysql cnf files can now be properly overridden. The config_template
module has been extended to support valueless options, such as those that
are found in the my.cnf file(i.e. `quick` under the `mysqldump` section).
To use valueless options, use the `ignore_none_type` attribute of the
config_template module.

View File

@ -45,6 +45,7 @@
mode: "0644"
config_overrides: "{{ item.config_overrides }}"
config_type: "{{ item.config_type }}"
ignore_none_type: False
with_items:
- src: my.cnf.j2
dest: "{{ galera_etc_conf_file }}"

View File

@ -26,3 +26,8 @@ galera_server_old_package:
suse:
galera_mariadb_server_package: "mariadb"
galera_repo_url: "http://download.opensuse.org/repositories/server:/database/openSUSE_Leap_{{ ansible_distribution_version }}"
# Testing my.cnf overrides
galera_my_cnf_overrides:
sst:
sst-initial-timeout: 600