From 2ca2e8b04daaccd1e7bc9d9df6d096f992232243 Mon Sep 17 00:00:00 2001 From: Mikhail Lesyk Date: Sun, 2 Oct 2016 13:41:10 +0300 Subject: [PATCH] add ability to specify repating keys example: binlog-ignore-db: - mysql - sys - information_schema - performance_schema --- mysql/files/my.cnf | 6 ++++++ pillar.example | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/mysql/files/my.cnf b/mysql/files/my.cnf index 19f9340..f36b633 100644 --- a/mysql/files/my.cnf +++ b/mysql/files/my.cnf @@ -31,8 +31,14 @@ {% if mvalue == "noarg_present" -%} {{ mparam }} {%- else -%} +{%- if mvalue is iterable and mvalue is not string -%} +{%- for item in mvalue -%} +{{ mparam }}{{ '='|indent(indents, true) }} {{ item }} +{% endfor -%} +{%- else -%} {{ mparam }}{{ '='|indent(indents, true) }} {{ mvalue }} {%- endif -%} +{%- endif -%} {%- endfor -%} {%- endif -%} {%- endfor %} diff --git a/pillar.example b/pillar.example index 0dedba8..42b33fd 100644 --- a/pillar.example +++ b/pillar.example @@ -31,6 +31,11 @@ mysql: port: 3307 binlog_do_db: foo auto_increment_increment: 5 + binlog-ignore-db: + - mysql + - sys + - information_schema + - performance_schema mysql: # my.cnf param that not require value no-auto-rehash: noarg_present