Commit graph

245 commits

Author SHA1 Message Date
Wayne Gemmell
fabd837bcb fix(bug): config arrays as multiple lines 2023-10-17 14:28:25 +02:00
Jeff Neel
5f487e33f6 style: update precommit and style 2023-10-11 22:18:11 -05:00
preussal
2c166c1e3c
Update osfingermap.yaml
Update for ubuntu 22.04
2023-06-12 21:04:53 +07:00
Imran Iqbal
7b62a627e0
refactor(salt-lint): fix violation
```
[213] SaltStack recommends using cmd.run together with onchanges, rather than cmd.wait
mysql/database.sls:62
  cmd.wait:
```
2022-02-12 23:41:06 +00:00
N
8ebc96ce1e
Merge pull request #262 from noelmcloughlin/pycent7
fix(centos7): add correct pymysql package on cent7/saltpy3
2021-09-04 00:58:16 +01:00
N
8fc2b0344f
Merge pull request #263 from bawuenet/master
refactor(jinja): improve indentation
2021-08-25 10:46:01 +01:00
Andreas Thienemann
d09728e04f refactor(jinja): improve indentation
The indentation in servers.sls was unclear and made following the
control flow much harder.

Fix that by correctly indenting.

Drive-By: Change {% to {%- no-line-break opening tags for variable logic
2021-08-25 10:35:30 +02:00
N
e9e0ec1533
Merge branch 'master' into pycent7 2021-08-09 23:43:44 +01:00
sticky-note
70eeed80c1 feat(freebsd): update packages from `py37-* => py38-*` 2021-07-19 12:01:13 +11:00
Imran Iqbal
3ea9b34759
feat(osfingermap): add support for Debian 11 [skip ci] 2021-07-15 11:12:35 +01:00
noelmcloughlin
9722b02187 fix(centos7): add correct pymysql package on cent7/saltpy3 2021-06-10 00:15:42 +01:00
Heinz Wiesinger
346633d6f6 fix(salt-user): fix setting grants for the salt user 2021-05-03 14:11:22 +02:00
Imran Iqbal
c11750c9cc
test: standardise use of share suite & _mapdata state [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/302
2021-03-23 21:30:23 +00:00
Heinz Wiesinger
4cb4c05e48 fix(salt-user): redirect error output from user access checks 2021-03-19 14:48:57 +01:00
Imran Iqbal
2d1c7c30e6
fix(server): fix salt-lint violations [skip ci]
```console
[206] Jinja variables should have spaces before and after: {{ var_name }}
mysql/server.sls:86
        {{debconf_root_password}}: {'type': 'password', 'value': '{{ mysql_root_password }}'}

[206] Jinja variables should have spaces before and after: {{ var_name }}
mysql/server.sls:87
        {{debconf_root_password_again}}: {'type': 'password', 'value': '{{ mysql_root_password }}'}
```
2020-12-14 09:05:59 +00:00
GMAzrael
6b39bda366 fix(percona): fix startswith error 2020-12-08 09:11:54 +00:00
N
9bc73338f2
Merge branch 'master' into master 2020-12-04 00:11:02 +00:00
N
08e7ee35e2
Merge branch 'master' into debconf_percona 2020-12-03 23:52:49 +00:00
N
d57fd83186
Update server.sls 2020-12-03 23:28:38 +00:00
N
03efdaf47f
Merge branch 'master' into add-mysql-community-package 2020-12-03 23:24:01 +00:00
Lenny Meerwood
b0f370cf8b fix(redhat): added missing client socket 2020-12-03 15:49:02 +10:00
Lenny Meerwood
1c70b0abc1 feat(credentials): add socket access 2020-11-02 08:52:53 +10:00
Lenny Meerwood
3cab000c89 fix(redhat): update python library, add missing deps 2020-11-02 08:52:21 +10:00
Geraud CONTINSOUZAS
7791268d13 fix(indent): properly indent file.directory block
This is a followup on #250.

The patch I sent here suffered from a case of bad copy-n-paste and
missed half a level of indentation. Sorry.
2020-08-27 16:00:27 +11:00
Géraud CONTINSOUZAS
ec681995b4
fix(freebsd): upgrade to mysql57-server
Current default version for FreeBSD is MySQL 5.7, also python 2.x is
deprecated and should be removed any time soon.

FreeBSD uses the `mysql_install_db` which generates a temporary root
password upon the first start. To the best of my understanding I haven't
seen any code in the formula that handles this method. So I added
a FreeBSD-scpecific block for initialization. While here, create
`/var/log/mysql` without which the server won't start if it doesn't
exist.

Co-authored-by: Geraud CONTINSOUZAS <geraud.continsouzas@skazy.nc>
2020-08-24 23:45:37 +01:00
Yoda-BZH
8eccd5a68c
feat(socket_authentication): allow unix_socket authentication
Co-authored-by: Tristan Charbonneau <tcharbonneau@oceanet-technology.com>
2020-07-10 16:12:24 +01:00
Imran Iqbal
0d77164f39
feat(focal): add settings for ubuntu-20.04 2020-06-01 02:53:43 +01:00
Michal Hrusecky
8ee79a7bb0 fix(osfamilymap.yaml): update SUSE defaults
* there is no python2 in last stable releases and socket was moved as well
2020-05-19 15:36:27 +02:00
sticky-note
2b6e704c96 fix(reload-modules): do reload_modules on py module installation 2020-04-16 00:20:05 +11:00
smasa90
a05f263f4b fix(db_load): preserve space between -h and -p on the db load cmd.wait 2019-12-10 11:48:27 +11:00
Imran Iqbal
bd2571279b
Merge pull request #232 from daks/style-sls
style: remove previous line from jinja directives
2019-12-03 21:23:39 +00:00
Eric Veiras Galisson
ec0e2a765a style: remove previous line from jinja directives 2019-12-03 10:05:23 +01:00
Imran Iqbal
7b309f8da2
fix(mac_shortcut.sh): fix shellcheck errors
```bash
In mysql/files/mac_shortcut.sh line 5:
if [[ -e "{{ home }}/{{ user }}/Desktop/{{ app }}" ]] && [[ "${1}" -eq "remove" ]]
                                                                       ^------^ SC2154: remove is referenced but not assigned.
In mysql/files/mac_shortcut.sh line 8:
elif [[ -e "{{ dir }}/{{ app ~ '.app' if suffix else app }}" ]] && [[ "${1}" -eq "add" ]]
                                                                                 ^---^ SC2154: add is referenced but not assigned.
```
2019-12-02 22:52:26 +00:00
Imran Iqbal
a014e5539b
fix(user.sls): fix salt-lint errors
```bash
Examining mysql/user.sls of type state
[202] Jinja statement should have spaces before and after: {% statement %}
mysql/user.sls:35
{% set state_id = 'mysql_user_' ~ name ~ '_' ~ host%}

[206] Jinja variables should have spaces before and after: {{ var_name }}
mysql/user.sls:100
    - grant: {{db['grants']|join(",")}}
```
2019-10-09 14:36:20 +01:00
Imran Iqbal
764dd0c489
fix(server.sls): fix salt-lint errors
```bash
Examining mysql/server.sls of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
mysql/server.sls:119
    - creates: {{ mysql_datadir}}/mysql/

[206] Jinja variables should have spaces before and after: {{ var_name }}
mysql/server.sls:141
    - creates: {{ mysql_datadir}}/mysql/
```
2019-10-09 14:36:20 +01:00
Imran Iqbal
2322ff67fd
ci(yamllint): add rule empty-values & use new yaml-files setting
* Semi-automated using https://github.com/myii/ssf-formula/pull/27
* Fix (or ignore) errors shown below:

```bash
mysql-formula$ yamllint -s .
./mysql/osfamilymap.yaml
  46:14     error    empty value in block mapping  (empty-values)
  66:14     error    empty value in block mapping  (empty-values)
  67:14     error    empty value in block mapping  (empty-values)
  68:16     error    empty value in block mapping  (empty-values)
  69:17     error    empty value in block mapping  (empty-values)
  70:16     error    empty value in block mapping  (empty-values)
  87:7      error    empty value in block mapping  (empty-values)
  216:14    error    empty value in block mapping  (empty-values)
  217:17    error    empty value in block mapping  (empty-values)

./mysql/defaults.yaml
  29:10     error    empty value in block mapping  (empty-values)
  30:11     error    empty value in block mapping  (empty-values)
```
2019-09-14 23:25:34 +01:00
Imran Iqbal
9f739fa8b4
feat(yamllint): include for this repo and apply rules throughout
* Semi-automated using `ssf-formula` (v0.5.0)
* Fix (or ignore) errors shown below:

```bash
mysql-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:")
./mysql/osfamilymap.yaml
  4:1       warning  missing document start "---"  (document-start)
  5:6       error    syntax error: found character '%' that cannot start any token
  94:17     error    trailing spaces  (trailing-spaces)
  191:89    error    line too long (90 > 88 characters)  (line-length)

./mysql/defaults.yaml
  3:1       warning  missing document start "---"  (document-start)
  7:4       error    syntax error: found character '%' that cannot start any token
  44:89     error    line too long (93 > 88 characters)  (line-length)
  51:89     error    line too long (111 > 88 characters)  (line-length)
  58:89     error    line too long (104 > 88 characters)  (line-length)
  65:89     error    line too long (103 > 88 characters)  (line-length)
  71:89     error    line too long (95 > 88 characters)  (line-length)
  77:89     error    line too long (102 > 88 characters)  (line-length)
  83:89     error    line too long (101 > 88 characters)  (line-length)
  86:89     error    line too long (95 > 88 characters)  (line-length)
  90:89     error    line too long (95 > 88 characters)  (line-length)

./mysql/supported_sections.yaml
  2:2       error    syntax error: found character '%' that cannot start any token

./mysql/osmap.yaml
  4:4       error    syntax error: found character '%' that cannot start any token
  7:89      error    line too long (96 > 88 characters)  (line-length)
  8:89      error    line too long (97 > 88 characters)  (line-length)

pillar.example
  1:1       warning  missing document start "---"  (document-start)
  36:8      error    wrong indentation: expected 8 but found 7  (indentation)
  77:16     warning  truthy value should be one of [false, true]  (truthy)
  80:13     warning  truthy value should be one of [false, true]  (truthy)
  83:13     warning  truthy value should be one of [false, true]  (truthy)
  85:13     warning  truthy value should be one of [false, true]  (truthy)
  89:13     warning  truthy value should be one of [false, true]  (truthy)
  96:13     warning  truthy value should be one of [false, true]  (truthy)
  112:19    warning  truthy value should be one of [false, true]  (truthy)
  117:17    warning  too few spaces before comment  (comments)
  118:12    warning  truthy value should be one of [false, true]  (truthy)
  119:17    warning  truthy value should be one of [false, true]  (truthy)
  130:25    warning  truthy value should be one of [false, true]  (truthy)
  131:19    warning  truthy value should be one of [false, true]  (truthy)
  153:16    warning  truthy value should be one of [false, true]  (truthy)
  166:14    warning  truthy value should be one of [false, true]  (truthy)
  171:18    warning  truthy value should be one of [false, true]  (truthy)
  172:89    error    line too long (93 > 88 characters)  (line-length)
  175:18    warning  truthy value should be one of [false, true]  (truthy)
  176:89    error    line too long (111 > 88 characters)  (line-length)
  179:18    warning  truthy value should be one of [false, true]  (truthy)
  179:26    warning  missing starting space in comment  (comments)
  180:89    error    line too long (104 > 88 characters)  (line-length)
  183:18    warning  truthy value should be one of [false, true]  (truthy)
  183:26    warning  missing starting space in comment  (comments)
  184:89    error    line too long (103 > 88 characters)  (line-length)
  187:18    warning  truthy value should be one of [false, true]  (truthy)
  187:26    warning  missing starting space in comment  (comments)
  188:89    error    line too long (95 > 88 characters)  (line-length)
  191:18    warning  truthy value should be one of [false, true]  (truthy)
  191:26    warning  missing starting space in comment  (comments)
  192:89    error    line too long (102 > 88 characters)  (line-length)
  195:18    warning  truthy value should be one of [false, true]  (truthy)
  195:26    warning  missing starting space in comment  (comments)
  196:89    error    line too long (101 > 88 characters)  (line-length)
  199:18    warning  truthy value should be one of [false, true]  (truthy)
  199:26    warning  missing starting space in comment  (comments)
  200:89    error    line too long (95 > 88 characters)  (line-length)
  203:18    warning  truthy value should be one of [false, true]  (truthy)
  203:26    warning  missing starting space in comment  (comments)
  204:89    error    line too long (95 > 88 characters)  (line-length)
  207:18    warning  truthy value should be one of [false, true]  (truthy)
  207:26    warning  missing starting space in comment  (comments)
  211:18    warning  truthy value should be one of [false, true]  (truthy)
  211:26    warning  missing starting space in comment  (comments)
  214:1     error    too many blank lines (1 > 0)  (empty-lines)

test/salt/pillar/mysql.sls
  1:1       warning  missing document start "---"  (document-start)
  36:8      error    wrong indentation: expected 8 but found 7  (indentation)
  77:16     warning  truthy value should be one of [false, true]  (truthy)
  80:13     warning  truthy value should be one of [false, true]  (truthy)
  82:13     warning  truthy value should be one of [false, true]  (truthy)
  84:13     warning  truthy value should be one of [false, true]  (truthy)
  88:13     warning  truthy value should be one of [false, true]  (truthy)
  95:13     warning  truthy value should be one of [false, true]  (truthy)
  111:19    warning  truthy value should be one of [false, true]  (truthy)
  152:16    warning  truthy value should be one of [false, true]  (truthy)
  165:14    warning  truthy value should be one of [false, true]  (truthy)
  170:18    warning  truthy value should be one of [false, true]  (truthy)
  171:89    error    line too long (93 > 88 characters)  (line-length)
  174:18    warning  truthy value should be one of [false, true]  (truthy)
  175:89    error    line too long (111 > 88 characters)  (line-length)
  178:18    warning  truthy value should be one of [false, true]  (truthy)
  178:26    warning  missing starting space in comment  (comments)
  179:89    error    line too long (104 > 88 characters)  (line-length)
  182:18    warning  truthy value should be one of [false, true]  (truthy)
  182:26    warning  missing starting space in comment  (comments)
  183:89    error    line too long (103 > 88 characters)  (line-length)
  186:18    warning  truthy value should be one of [false, true]  (truthy)
  186:26    warning  missing starting space in comment  (comments)
  187:89    error    line too long (95 > 88 characters)  (line-length)
  190:18    warning  truthy value should be one of [false, true]  (truthy)
  190:26    warning  missing starting space in comment  (comments)
  191:89    error    line too long (102 > 88 characters)  (line-length)
  194:18    warning  truthy value should be one of [false, true]  (truthy)
  194:26    warning  missing starting space in comment  (comments)
  195:89    error    line too long (101 > 88 characters)  (line-length)
  198:18    warning  truthy value should be one of [false, true]  (truthy)
  198:26    warning  missing starting space in comment  (comments)
  199:89    error    line too long (95 > 88 characters)  (line-length)
  202:18    warning  truthy value should be one of [false, true]  (truthy)
  202:26    warning  missing starting space in comment  (comments)
  203:89    error    line too long (95 > 88 characters)  (line-length)
  206:18    warning  truthy value should be one of [false, true]  (truthy)
  206:26    warning  missing starting space in comment  (comments)
  210:18    warning  truthy value should be one of [false, true]  (truthy)
  210:26    warning  missing starting space in comment  (comments)
  213:1     error    too many blank lines (1 > 0)  (empty-lines)
```
2019-08-17 00:41:39 +01:00
Andre Sencioles
6cd8e36da0 Fix typo in repo.sls 2019-08-13 12:17:22 +12:00
Niels Abspoel
ccccfd3652
Merge pull request #222 from noelmcloughlin/arch
feat(linux): archlinux support (no osmajorrelase grain)
2019-08-08 21:58:15 +02:00
Imran Iqbal
bdee94aaed
fix(connector): fix typos (connnector) and missing enabled 2019-08-08 15:36:34 +01:00
N
4b4ad882c8
feat(linux): archlinux support (no osmajorrelase grain) 2019-08-03 15:15:24 +01:00
Imran Iqbal
1d2e2f59dd
feat(semantic-release): implement for this formula
* Include latest pre-salted images replacing EOL platforms
  - Ref: https://github.com/saltstack-formulas/template-formula/pull/148
2019-07-10 19:12:58 +01:00
Alexander Weidinger
39915a49fd Handle empty/Null database_obj 2019-04-24 12:45:34 +02:00
Alexander Weidinger
3633a6ec84 Allow to remove DB 2019-04-09 23:59:44 +02:00
Alexander Weidinger
d1de0fdfc6 Allow to remove DB user 2019-04-09 23:40:18 +02:00
Joshua Cannon
577c5a1120
Update hash for MySQL community server RPM repo 2019-02-11 09:00:52 -06:00
N
d40a6c5d47
Only download archive if necessary 2019-01-27 20:17:46 +00:00
Wayne Gemmell
168d1e2c12 Support for official mysql 8 packages
I've added support for the official mysql 8.0 packages and the relevant repositories.
Package names are mysql-community-server and mysql-community-client.
I know the repo setting breaks convention a bit but it is compulsory so I'm not sure how else to properly include it.

This change requires the salt pull request I created https://github.com/saltstack/salt/pull/51240 to be able to grant users.
2019-01-18 13:28:15 +02:00
N
8f2e6ad770
Merge pull request #168 from nesteves/master
Allow the use of wildcards on a user's database/table names when defining grants.
2018-12-18 22:59:39 +00:00
N
c7945aabac
Don't fail on missing mysql.config.apparmor 2018-12-12 14:46:17 +00:00