JoergFiedler.freebsd-jailed-mariadb
freebsd-jailed-mariadb
=========
This role sets up a MariaDB server in a jail.
You can customize the MariaDB server settings using the my.cnf
file found in the templates
folder.
The role will create a ZFS dataset on an available pool and mount it to the jail. This dataset is used to save the MariaDB database files.
Requirements
This role is designed for use with a new FreeBSD installation.
Role Variables
mariadb_root_passwd
The root password for securing the MariaDB installation. Default: 'passwd'
.
mariadb_backup_user
Username for the backup user, who has read access to all databases for backup purposes. The backup data is stored in the {{ mariadb_home }}
directory, with one file per database that is zipped. Default: 'no_root_user'
.
mariadb_backup_user_passwd
Password for the backup user. Default: 'passwd'
.
mariadb_home
The directory where MariaDB will store its files. Default: '/srv/mariadb'
.
mariadb_server_pkg
The package name for the MariaDB server (specifying which version to install). Default: 'mariadb103-server'
.
host_mariadb_zfs_dataset
The ZFS dataset to be used for MariaDB. If it doesn't already exist, it will be created. Make sure the pool is already set up. Default: '{{ host_srv_dataset }}/mariadb'
.
host_mariadb_zfs_dir
The directory on the host system where the ZFS dataset will be mounted. Default: '{{ host_srv_dir }}/mariadb'
.
Dependencies
Example Playbook
- hosts: all
become: true
tasks:
- import_role:
name: 'JoergFiedler.freebsd-jail-host'
- include_role:
name: 'JoergFiedler.freebsd-jailed-mariadb'
vars:
jail_net_ip: '10.1.0.10'
jail_name: 'mariadb'
License
BSD
Author Information
If you have suggestions for improving this project, please open an issue on Github. Thank you!