diff --git a/README.rst b/README.rst index a751036..5ab6197 100644 --- a/README.rst +++ b/README.rst @@ -94,5 +94,5 @@ Install the MySQL development libraries and header files. .. note:: Note that this state is not installed by the mysql meta-state unless you set - your pillar data accordingly. + your pillar data accordingly. diff --git a/mysql/defaults.yaml b/mysql/defaults.yaml index 6ec8626..3b72df0 100644 --- a/mysql/defaults.yaml +++ b/mysql/defaults.yaml @@ -37,9 +37,9 @@ Ubuntu: myisam_recover: BACKUP query_cache_limit: 1M query_cache_size: 16M - log_error: /var/log/mysql/error.log + log_error: /var/log/mysql/error.log expire_logs_days: 10 - max_binlog_size: 100M + max_binlog_size: 100M mysqldump: quick: noarg_present quote_names: noarg_present @@ -83,7 +83,7 @@ Debian: query_cache_limit: 1M query_cache_size: 16M expire_logs_days: 10 - max_binlog_size: 100M + max_binlog_size: 100M mysqldump: quick: noarg_present quote_names: noarg_present diff --git a/mysql/files/my.cnf b/mysql/files/my.cnf index 8e97641..19f9340 100644 --- a/mysql/files/my.cnf +++ b/mysql/files/my.cnf @@ -31,7 +31,7 @@ {% if mvalue == "noarg_present" -%} {{ mparam }} {%- else -%} -{{ mparam }}{{ '='|indent(indents, true) }} {{ mvalue }} +{{ mparam }}{{ '='|indent(indents, true) }} {{ mvalue }} {%- endif -%} {%- endfor -%} {%- endif -%} diff --git a/mysql/init.sls b/mysql/init.sls index 80892a5..bc56035 100644 --- a/mysql/init.sls +++ b/mysql/init.sls @@ -16,7 +16,7 @@ include: {% if mysql_dev %} - mysql.dev {% endif %} - + {% if (db_states|length() + user_states|length()) > 0 %} extend: diff --git a/pillar.example b/pillar.example index 2c30459..ac83cb1 100644 --- a/pillar.example +++ b/pillar.example @@ -8,7 +8,7 @@ mysql: # If you only manage the dbs and users and the server is on # another host host: 123.123.123.123 - # my.cnf sections changes + # my.cnf sections changes mysqld: # you can use either underscore or hyphen in param names bind-address: 0.0.0.0 diff --git a/scripts/import_users.py b/scripts/import_users.py index 456aed0..e32a71c 100755 --- a/scripts/import_users.py +++ b/scripts/import_users.py @@ -15,7 +15,7 @@ parser.add_argument('user', metavar='user', help='mysql user that can show grant parser.add_argument('password', metavar='password', help='user password') args = parser.parse_args() -# PARSE GRANTS +# PARSE GRANTS mysqlcon = MySQLdb.connect(host=args.host,user=args.user,passwd=args.password,db="mysql",use_unicode=True, charset='utf8') mysqlCur = mysqlcon.cursor(MySQLdb.cursors.DictCursor) @@ -42,7 +42,7 @@ for user in users: mgrant = re.search( r"""GRANT ([\s,A-Z]+) ON `?([a-zA-Z0-9_\-*\\]*)`?\.`?([a-zA-Z0-9_\-*\\]*)`? TO .*""", row[0]) - if mgrant is not None: + if mgrant is not None: user['grants'].append({'grant': [x.strip() for x in mgrant.group(1).split(',')], 'database': mgrant.group(2).replace('\\',''), 'table': mgrant.group(3).replace('\\','')}) else: print "ERROR: CAN NOT PARSE GRANTS: ",row[0]