Skip to content

Commit

Permalink
Add explicit dependencies for types
Browse files Browse the repository at this point in the history
mysql_grant has an autorequire()'d dependency on the .my.cnf file used
by the provider to talk to the database.

I've added this to mysql_database and mysql_user too since logically
these also need the file to be in place.

I've hit this bug because of a slightly unusual edge case in our own
manifests, but I think this fix belongs upstream regardless.
  • Loading branch information
jtopper committed Sep 16, 2014
1 parent 1bd8f56 commit c4d45c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/puppet/type/mysql_database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

ensurable

autorequire(:file) { '/root/.my.cnf' }

newparam(:name, :namevar => true) do
desc 'The name of the MySQL database to manage.'
end
Expand Down
2 changes: 2 additions & 0 deletions lib/puppet/type/mysql_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

ensurable

autorequire(:file) { '/root/.my.cnf' }

newparam(:name, :namevar => true) do
desc "The name of the user. This uses the 'username@hostname' or username@hostname."
validate do |value|
Expand Down

0 comments on commit c4d45c3

Please sign in to comment.