saltstack-formulas / mysql-formula

Install the MySQL client and/or server
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
85 stars 369 forks source link

[BUG] Arrays being dumped into config file in invalid form. #275

Open waynegemmell opened 1 year ago

waynegemmell commented 1 year ago

Your setup

Formula commit hash / release tag

Versions reports (master & minion)

Salt: 3006.1+192.g23582dce20

Pillar / config used

mysql:
  server_config:
    file: 50-server.cnf
    # my.cnf sections changes
    sections:
      mysqld:
        replicate-ignore-table:
          - core.table1
          - core.table2                 
          - core.table3    

Bug details

Describe the bug

When an array of data is inserted into the config file the above example is written out as

        replicate-ignore-table = ['core.table1',  'core.table2', 'core.table3']

This isn't a valid format for mysql configuration.

Steps to reproduce the bug

Expected behaviour

The output should be as follows.

replicate-ignore-table                  = 'core.table1'
replicate-ignore-table                  = 'core.table2'
replicate-ignore-table                  = 'core.table3'

Attempts to fix the bug

I've fixed it in a PR I'll be posting shortly.