91d2429d59
* Allow connections to mysql as root only from IP-addresses within environment * Updated direct_networks function * Provided and updated noop tests Closes-Bug: 1471956 Change-Id: Ia873292d6b05f612642e055d1d0dc156a863bc34
18 lines
470 B
Puppet
18 lines
470 B
Puppet
# == Class definition osnailyfacter::mysql_grant
|
|
#
|
|
# Class for mysql grant permissions
|
|
#
|
|
# [*user*]
|
|
# Mysql username
|
|
#
|
|
# [*network*]
|
|
# Array of specific IPs or Networks or Hostnames
|
|
# to access the database with user
|
|
#
|
|
define osnailyfacter::mysql_grant ( $user = '',
|
|
$network = $name ) {
|
|
exec { "mysql_${user}_${network}":
|
|
command => "mysql -NBe \"grant all on *.* to \'${user}\'@\'${network}\' with grant option\"",
|
|
}
|
|
}
|