Install the MariaDB client and/or server. This is based on the SaltStack MySQL formula
Note
See the full Salt Formulas installation and usage instructions.
Meta-state that includes all server packages in the correct order.
This meta-state does not include mariadb.remove_test_database; see
below for details.
Install the MariaDB client package.
Install the MariaDB server package and start the service.
Debian OS family supports setting MariaDB root password during install via debconf.
Note
If no root password is provided in the pillar, a random one will
be created. Because Hydrogen doesn't have easy access to a random
function (test.rand_str isn't introduced until Helium), instead,
we use the not-at-all random grains.server_id. As this is
cryptographically insecure, future formula versions should use the
newly available random.get_str method.
Ensure that the MariaDB service is not running.
Create and manage MariaDB databases.
Install mariadb python bindings.
Create and manage MariaDB database users with definable GRANT privileges.
The state accepts MariaDB hashed passwords or clear text. Hashed password have priority.
Note
See the salt.states.mariadb_user docs for additional information on configuring hashed passwords.
Make sure to quote the passwords in the pillar so YAML doesn't throw an exception.
Warning
Do not use this state if your MariaDB instance has a database in use called test.
If you do, it will be irrevocably removed!
Remove the database called test, normally created as part of a default
MariaDB installation. This state is not included as part of the meta-state
above as this name may conflict with a real database.
Install the MariaDB development libraries and header files.
Note
Note that this state is not installed by the mariadb meta-state unless you set your pillar data accordingly.
Add the official MariaDB repository.
Note
Note that this state currently only supports MariaDB 5.7 for RHEL systems. Debian and Suse support to be added. Also need to add the option to allow selection of MariaDB version (5.6 and 5.5 repos are added but disabled) and changed enabled repository accordingly.