Skip to content
This repository was archived by the owner on Jun 11, 2019. It is now read-only.

mysql::grant variable 'ensure => absent' doesn't work #56

Open
bionix opened this issue Jan 20, 2015 · 3 comments
Open

mysql::grant variable 'ensure => absent' doesn't work #56

bionix opened this issue Jan 20, 2015 · 3 comments

Comments

@bionix
Copy link

bionix commented Jan 20, 2015

If I declare to remove mysql grants something like

mysql::grant { 'testme_db1':
  ensure => absent,
  mysql_user           => 'testme',
  mysql_db              => 'db1',
  mysql_create_db  => true,
  mysql_host            => '127.0.%',
  mysql_privileges    => 'ALL',
  mysql_password   => 'secret',
}

The puppet run makes nothing.
Puppet version: 3.7.3
Module version: example42/puppet-mysql git-tag: v2.1.4

@alvagante
Copy link
Member

Uhm, strange, it should use the revoke template, as n https://github.com/example42/puppet-mysql/blob/master/manifests/grant.pp#L82
Try to place absent in single quotes :

ensure => 'absent',

@bionix
Copy link
Author

bionix commented Jan 21, 2015

I found the reason. In version 2.1.4 it is no variable $ensure in the define type declaration at top (https://github.com/example42/puppet-mysql/blob/v2.1.4/manifests/grant.pp#L35). It exists in branch master and version 2.1.3 (git tag).

@bionix
Copy link
Author

bionix commented Jan 21, 2015

It seems the version in puppet forge is newer as the repository code state.

puppet module install --modulepath=./ example42-mysql
Notice: Preparing to install into /home/example/tmp ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/home/example/tmp
└─┬ example42-mysql (v2.1.4)
  ├── example42-puppi (v2.1.10)
  └── puppetlabs-stdlib (v4.5.1)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants