X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fopenstacklib%2Fmanifests%2Fdb%2Fmysql.pp;fp=3rdparty%2Fmodules%2Fopenstacklib%2Fmanifests%2Fdb%2Fmysql.pp;h=0000000000000000000000000000000000000000;hb=6e1426dc77fb4e5d51f07c187c6f2219431dc31e;hp=7cf10102989db6849b4aa24fa99bee47e42529e0;hpb=87423ba664cd5f2bb462ebadd08b1a90d0fe1c8d;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/openstacklib/manifests/db/mysql.pp b/3rdparty/modules/openstacklib/manifests/db/mysql.pp deleted file mode 100644 index 7cf101029..000000000 --- a/3rdparty/modules/openstacklib/manifests/db/mysql.pp +++ /dev/null @@ -1,68 +0,0 @@ -# == Definition: openstacklib::db::mysql -# -# This resource configures a mysql database for an OpenStack service -# -# == Parameters: -# -# [*password_hash*] -# Password hash to use for the database user for this service; -# string; required -# -# [*dbname*] -# The name of the database -# string; optional; default to the $title of the resource, i.e. 'nova' -# -# [*user*] -# The database user to create; -# string; optional; default to the $title of the resource, i.e. 'nova' -# -# [*host*] -# The IP address or hostname of the user in mysql_grant; -# string; optional; default to '127.0.0.1' -# -# [*charset*] -# The charset to use for the database; -# string; optional; default to 'utf8' -# -# [*collate*] -# The collate to use for the database; -# string; optional; default to 'utf8_general_ci' -# -# [*allowed_hosts*] -# Additional hosts that are allowed to access this database; -# array or string; optional; default to undef -# -# [*privileges*] -# Privileges given to the database user; -# string or array of strings; optional; default to 'ALL' - -define openstacklib::db::mysql ( - $password_hash, - $dbname = $title, - $user = $title, - $host = '127.0.0.1', - $charset = 'utf8', - $collate = 'utf8_general_ci', - $allowed_hosts = [], - $privileges = 'ALL', -) { - - include ::mysql::client - - mysql_database { $dbname: - ensure => present, - charset => $charset, - collate => $collate, - require => [ Class['mysql::server'], Class['mysql::client'] ], - } - - $allowed_hosts_list = unique(concat(any2array($allowed_hosts), [$host])) - $real_allowed_hosts = prefix($allowed_hosts_list, "${dbname}_") - - openstacklib::db::mysql::host_access { $real_allowed_hosts: - user => $user, - password_hash => $password_hash, - database => $dbname, - privileges => $privileges, - } -}