chore: update README
This commit is contained in:
parent
d753376dda
commit
ab8cdfa15c
1 changed files with 48 additions and 9 deletions
57
README.md
57
README.md
|
@ -13,30 +13,56 @@ Install and configure MariaDB
|
||||||
|
|
||||||
## Role variables
|
## Role variables
|
||||||
|
|
||||||
* `mariadb_use_official_repository` - use the official repository (default: `yes`)
|
| Name | Type | Required |Default | Comment |
|
||||||
* `mariadb_branch` - the branch version to install (default: `10.3`)
|
|---------------------------------|-------|----------|--------|----------------------------------------|
|
||||||
* `mariadb_user` - login to connect on mariadb (default: `root`)
|
| mariadb_use_official_repository | bool | no | true | use the official repository |
|
||||||
* `mariadb_password` - password to connect on mariadb (default: `secret`)
|
| mariadb_branch | str | no | 10.3 | the branch version to install |
|
||||||
* `mariadb_master` - the server is master (default: `no`)
|
| mariadb_user | str | no | root | login to connect on mariadb |
|
||||||
* `mariadb_autorestart` - restart mariadb when the config change (default: `no`)
|
| mariadb_password | str | no | secret | password to connect on mariadb |
|
||||||
* `mariadb_users` - array with the users to manage
|
| mariadb_master | bool | no | false | the server is master |
|
||||||
|
| mariadb_autorestart | bool | no | false | restart mariadb when the config change |
|
||||||
|
| mariadb_users | array | no | | the users to manage |
|
||||||
|
| mariadb_databases | array | no | | the databases to manage |
|
||||||
|
| mariadb_config | hash | no | | extra options for configuration |
|
||||||
|
|
||||||
|
### mariadb_users
|
||||||
|
|
||||||
|
| Name | Type | Required |Default | Comment |
|
||||||
|
|------------|-------|----------|---------|-----------------------------------------------------------|
|
||||||
|
| name | str | yes | | the username |
|
||||||
|
| host | str | yes | | the mysql user host |
|
||||||
|
| password | str | yes | | the user password |
|
||||||
|
| privileges | array | no | | the privileges with this form `database.*:SELECT,UPDATE`) |
|
||||||
|
| state | str | no | present | if state is `absent` the user is deleted |
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
- name: johndoe
|
- name: johndoe
|
||||||
|
host: '%'
|
||||||
password: supersecret
|
password: supersecret
|
||||||
privileges:
|
privileges:
|
||||||
- 'database.*:SELECT,UPDATE'
|
- 'database.*:SELECT,UPDATE'
|
||||||
state: present
|
state: present
|
||||||
```
|
```
|
||||||
|
|
||||||
* `mariadb_databases` - array with the databases to manage
|
### mariadb_databases
|
||||||
|
|
||||||
|
| Name | Type | Required |Default | Comment |
|
||||||
|
|------------|-------|----------|---------|-----------------------------------------------------------|
|
||||||
|
| name | str | yes | | the dabase name |
|
||||||
|
| state | str | no | present | if state is `absent` the database is deleted |
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
- name: superprogram
|
- name: superprogram
|
||||||
state: present
|
state: present
|
||||||
```
|
```
|
||||||
|
|
||||||
* `mariadb_config` - hash with mariadb configuration
|
### mariadb_config
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
mysqld:
|
mysqld:
|
||||||
|
@ -48,6 +74,19 @@ Install and configure MariaDB
|
||||||
|
|
||||||
```
|
```
|
||||||
- hosts: server
|
- hosts: server
|
||||||
|
vars:
|
||||||
|
mariadb_password: supersecret
|
||||||
|
mariadb_users:
|
||||||
|
- name: johndoe
|
||||||
|
host: '%'
|
||||||
|
password: usersecret
|
||||||
|
privileges:
|
||||||
|
- 'myappli.*:ALL'
|
||||||
|
mariadb_databases:
|
||||||
|
- myappli
|
||||||
|
mariadb_config:
|
||||||
|
server-id: 1
|
||||||
|
bind-address: 0.0.0.0
|
||||||
roles:
|
roles:
|
||||||
- mariadb
|
- mariadb
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue