diff --git a/docs/rolereference.rst b/docs/rolereference.rst index bab0b80d49ea295b1442c6c84d9f4bcd6ff161f8..85974dd36b87f47a49e64d32c1e4ffde0063609e 100644 --- a/docs/rolereference.rst +++ b/docs/rolereference.rst @@ -1214,3 +1214,39 @@ Here is an example configuration for setting-up the database server: --- db_root_password: root + + +Database +-------- + +The ``database`` role can be used for creating a MariaDB database and +accompanying user on destination machine. + +The role implements the following: + +* Creates MariaDB database. +* Creates a dedicated user capable of performing any operation on the created + database. Username is set to be same as the name of database. + + +Parameters +~~~~~~~~~~ + +**db_name** (string, mandatory) + Name of the database that should be created. + +**db_password** (string, mandatory) + Password for the database user. + + +Examples +~~~~~~~~ + +Here is an example configuration for creating a single database (for some +website): + +.. code-block:: yaml + + - role: database + db_name: phpinfo_example_com + db_password: phpinfo_example_com