Commit graph

109 commits

Author SHA1 Message Date
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
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
1c70b0abc1 feat(credentials): add socket access 2020-11-02 08:52:53 +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
Eric Veiras Galisson
ec0e2a765a style: remove previous line from jinja directives 2019-12-03 10:05:23 +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
N
4b4ad882c8
feat(linux): archlinux support (no osmajorrelase grain) 2019-08-03 15:15:24 +01: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
78b00b6dca
Make apparmor standalone state . 2018-12-09 15:57:54 +00:00
N
bb8e64685c
Add server.apparmor state; rm unused dirs 2018-12-09 01:56:24 +00:00
N
a82f2c1bc0
Apparmor support 2018-12-06 10:52:47 +00:00
Heinz Wiesinger
624c7a8642 Make sure the config directory and files within are handled after install. 2018-11-14 17:42:48 +01:00
Heinz Wiesinger
b20ace26b5 RPM in mariadb repos is called 'MariaDB-server'. 2018-11-14 17:42:48 +01:00
N
4cdc21bc92
Add install/remove states for MacOS (downloads.mysql.com) 2018-10-02 09:33:02 +01:00
Alexander Weidinger
573f18c36b cmd.run: use 'runas' instead of 'user' 2018-09-05 23:04:38 +02:00
Dominik Fišer
b8cf841e29 Replaced removed mysql.server with new mysql.serverpkg map property 2018-07-09 16:51:32 +02:00
N
1e826ea487 Introduce standardized mapping files 2018-06-24 14:37:18 +01:00
Adrien "ze" Urban
e7969e3e43 debconf: don't set password if not required
No need to setup debconf root password if we ain't installing it.
2018-06-07 16:03:03 +02:00
Adrien "ze" Urban
1071effbe1 debconf: allow configurable optional root pwd 2018-06-07 16:03:02 +02:00
Adrien "ze" Urban
bb17c3c512 debian: debconf root password, support for percona
Default values available for percona-server-server.
2018-06-07 16:03:01 +02:00
Adrien "ze" Urban
afae4c54b7 debian: debconf key in pillar
Allow debconf keys to be changed via pillars.
Useful when using non-standard packages that use different debconf keys to set
their passwords.
2018-06-07 16:02:55 +02:00
Marius Kotsbak
4a8a9bf69a Make formula relative to actual directory by using 'tpldir' 2018-05-18 19:58:35 +02:00
Christian Boltz
134130025f
Fix unbalanced if/endif
Commit 89985f7485 added a {% if ... %}
without the closing {% endif %} which leads to a Jinja syntax error.

This commit adds the missing {% endif %}
2018-04-25 20:45:31 +02:00
Wolodja Wentland
89985f7485 Default to MariaDB packages on Debian releases after stretch 2018-04-23 16:20:05 +01:00
Alexander Weidinger
0bcfd7f259 mysql_root_password: use server:host 2018-03-16 23:48:25 +01:00
Alexander Weidinger
5e6708dd49 FreeBSD: change root password 2018-03-14 22:30:46 +01:00
David Beitey
8dd3d4da46 Fix duplicate ID if fqdn is localhost/localhost.localdomain 2017-08-03 17:41:27 +10:00
Christian Boltz
7ec43ad3c9 Fix two issues when using a salt_user (#163)
This fixes https://github.com/saltstack-formulas/mysql-formula/issues/157

* Avoid failures on first run with a salt_user defined

Add a dependency on sls: mysql.salt-user to ensure MySQL users
(especially the salt_user) get created early enough - without that,
parts of the first run will fail (but a second run works).
2017-03-09 22:16:34 +01:00
Wolodja Wentland
18ae5e5942 Hardcode 'mysql-server' as debconf base path for root password
This is needed for correctly setting the root password when installing mariadb.
2017-01-24 16:05:08 +00:00
Brian Jackson
36fd044068 Merge pull request #154 from scornelissen85/fix/mariadb-datadir
Fix setting datadir to alternate dir with mariadb
2016-12-25 10:50:11 -08:00
Rene Jochum
df40904786 Fix mysql.config for client only installations.
Signed-off-by: Rene Jochum <rene@jochums.at>
2016-12-25 16:24:25 +01:00
Sander Cornelissen
7a2b76f455 Do not pin on mysql-server as server name as mysql-community-server could also be used 2016-12-19 17:38:35 +01:00
Sander Cornelissen
786bde93fe Fix setting datadir to alternate dir with mariadb 2016-12-19 17:00:59 +01:00
Sarah Rose
c371ff7f14 mysql.server formula fixes for gentoo
mysql.server formula failed on gentoo because of hard-coded pid-file (pid_file is not detected as declared for gentoo defaults.yaml because the variable name for the pid-file is hard-coded in the init.d script installed by standard dev-db/mysql ebuild as pid-file (not pid_file)).
mysql.server formula also failed because it was missing the  step. This commit adds this as an alternative mysql_initialize step for the gentoo os_family.
2016-12-09 15:32:24 +01:00
Andres Montalban
39a996effd Fix #147 - Wrong CentOS/RHEL 7 defaults and state failure when mysql.version is not defined 2016-10-29 10:25:37 -03:00
S-Wilhelm
efe9acc1d9 Update server.sls
Attempted fix for saltstack-formulas/mysql-formula#142
2016-10-10 17:02:59 -04:00
Glenn E. Bailey III
f56f39b113 Made datadir dynamic 2016-10-09 18:25:43 +00:00
Niels Abspoel
07ab6881e2 Merge pull request #122 from moje-skoly/master
Fixed formula on Debian where mysql_root_password state is not present.
2016-10-02 10:29:30 +02:00
Chris Routh
6ff6974640 Adjust check to mysql.version due to compile fail on Arch. 2016-09-15 22:12:15 -07:00
Chris Routh
ff728b2d22 Check for MySQL 5.7 and act appropriately on Redhat/Arch 2016-09-14 08:27:20 -07:00
Joe Julian
25167dea79 Set environment temp directory to /tmp
Some distros set the environment variable for the temp directory to
/tmp/$USER which is owned by $USER mode 700. This prevents the
mysql user from being able to access the temporary files it needs.
2016-09-07 09:37:35 -07:00
Tomáš Fejfar
0572bc39bf RHEL & Suse condition is correctly evaluated 2016-06-11 16:58:03 +02:00
Tomáš Fejfar
d3ec899409 RHEL & Suse condition is correctly evaluated 2016-06-09 18:50:10 +02:00
Niels Abspoel
b4cf406f13 fix archlinux package 2016-05-25 22:57:24 +02:00