Ok, so running <https://forge.puppet.com/modules/p...
# forge-modules
m
Ok, so running https://forge.puppet.com/modules/puppetlabs/mysql/ 12.0.3, which contains a bugfix for some grant idempotency failures in 12.0.1. Having a related issue. Given some Hiera data of:
Copy code
profile::mariadb::mysql_procedure_grants:
  - user@host/PROCEDURE db.spAddUserPermission
  - user@host/PROCEDURE db.spDeactivateAllStudentsNotFlagged
and an associated profile/mariadb.pp containing in part:
Copy code
class profile::mariadb (
  Hash $mysql_grants,
  Array $mysql_procedure_grants,
){
  # ...
  $mysql_procedure_grants.unique.each |String $grant_info| {
    $grant_array = split($grant_info, '/')
    $grant_user = $grant_array[0]
    $grant_table = $grant_array[1]
    $grant_hash = {
      $grant_info => {
        user       => $grant_user,
        privileges => [ 'alter routine', 'execute' ],
        table      => $grant_table
      }
    }
    create_resources(mysql_grant, $grant_hash)
  }
}
we seem to keep recreating the same grants over and over. Granted, I could be creating an array of hashes for a single call to create_resources, but I wouldn't think that would be the problem. Anywhere to look for narrowing down the problem? We're doing it this way to avoid massive amounts of copied/pasted privileges (the full code probably has nearly 100 procedures to be granted).