GSquad934.database

Ansible Role: Database

This role installs and secures the latest version of MariaDB server.

Requirements

There are no specific requirements for this role.

Role Variables

You can set up three variables for this role, but only one is required by default.

The required variable is the root account password for managing MariaDB:

mysql_root_password: MyPass

This variable should be defined in host_vars and encrypted using ansible-vault.

--

If the server needs to accept connections from other computers, you should define these variables:

db_remote_connections: deny (Change this to *allow* if you want to enable remote connections)
db_server_bind_address: 1.1.1.1 (This should be the IP address of the server where MariaDB will listen)

You can set these two variables in host_vars if needed.

Note: If the database server is on the same machine as your web server, these variables are not needed.

Dependencies

No dependencies on other roles are required.

Example Playbook

Here is a simple playbook example to use this role:

hosts: all
user: root
roles:
  - { role: database, tags: [ 'database' ] }

TO-DO

Currently, this Ansible role only manages MariaDB server. The goal is to later include PostgreSQL and other database servers.

This role currently only works on Debian-based operating systems (like Debian and Ubuntu), but it needs to be improved to support Red Hat-based systems as well.

License

MIT / BSD

Author Information

My name is Gaétan. You can follow me on Twitter

Website: ICT Pour Tous

Informazioni sul progetto

Install and secure MariaDB server

Installa
ansible-galaxy install GSquad934.database
Licenza
mit
Download
109
Proprietario