puppetlabs/puppetlabs-mysql — pull request #539 by stevesaliman (2014-07-11 17:31:42+00:00)
Title: Grants for the backupuser should be conditional

The mysql::server::backup class checks the ensure parameter when it creates the backup user, but it assumes 'present' when it does the grants for the backup user. This means that when we try to turn off backups for a server, it removes the backup user, then tries to grant this no longer existing user permissions to perform a backup.

It will continue to try to perform the grant on each puppet run.

This pull request addresses this by changing the ```ensure``` value passed to ```mysql_grant``` from 'present' to $ensure.