diff --git a/README.rst b/README.rst index a751036068f5665b79d417b44acbc953aafdde41..5ab61970dbefc5e6c982f0d6c1da66e5819c3916 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 6ec86264a84308b89f95b22b6f97a80a0109bb2f..3b72df0e18c49efd0724f9352d3c604c8ab27add 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 8e976412b9f3d6b924a754255e3a077668499161..19f9340579666465babf79a9f70d491f4fa3815c 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 80892a5f4726a1f6b0f8443f32d306ef391746d6..bc56035d803dcad0ae469d96704e4e2075352464 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 2c30459b8ce9bd8d5dfdcdd5f93949fa07df6847..ac83cb1df7130c0ab62f223a3c846884d1100654 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 456aed0e820a86d590df35d218d480af10f432c5..e32a71c173a284e1f63a2f1e84940aad1e8a4f2a 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]