mariadb.pp 734 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
# @summary Install Mariadb and create database
#
# Install Mariadb and create database
#
# @example
#   include nextcloud::mariadb
class nextcloud::mariadb {

  # Install server + client + bindings
  class { 'mysql::server':
    package_name            => 'mariadb-server',
    root_password           => $nextcloud::db_root_password,
    remove_default_accounts => true,
  }
  class { 'mysql::client':
    package_name => 'mariadb-client'
  }
  class { 'mysql::bindings':
    php_enable => true,
  }

  # Create database for Nextcloud
  mysql::db { $nextcloud::db_database_name:
    user     => $nextcloud::db_username,
    password => $nextcloud::db_password,
    host     => $nextcloud::db_hostname,
    grant    => ['ALL'],
  }
}