Skip to content

/dbname in hostname #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: feature/master/use_mysql_gem_for_provider
Choose a base branch
from

Conversation

justintime
Copy link

Given the following resource:

  mysql::db { 'dbname':
    user     => 'dbuser',
    password => 'dbpass',
    host     => '%',
    grant => ['all'],
    charset => 'utf8',
  }

You will end up with '%/dbname' in the Host column of the mysql.user table, when it should just be a '%'.

This pull request is embarassing, and shows just how much of a Ruby newb I am. While it technically works, it violates DRY in every way. Please, please, please show me how to pull this regex out into a method. Note that the same regex is used in lib/puppet/provider/database_grant/mysql.rb

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

Successfully merging this pull request may close these issues.

2 participants