we only need to ensure grants if the user is present
This commit is contained in:
parent
e1649647f3
commit
0ce33a632f
1 changed files with 5 additions and 3 deletions
|
@ -14,8 +14,10 @@ define mysql::admin_user(
|
||||||
password_hash => $password_hash,
|
password_hash => $password_hash,
|
||||||
require => Exec['mysql_set_rootpw'],
|
require => Exec['mysql_set_rootpw'],
|
||||||
}
|
}
|
||||||
mysql_grant{"${name}@${host}":
|
if $ensure == 'present' {
|
||||||
privileges => 'all',
|
mysql_grant{"${name}@${host}":
|
||||||
require => Mysql_user["${name}@${host}"],
|
privileges => 'all',
|
||||||
|
require => Mysql_user["${name}@${host}"],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue