Skip to content

Commit c4d45c3

Browse files
committed
Add explicit dependencies for types
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.
1 parent 1bd8f56 commit c4d45c3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/puppet/type/mysql_database.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
ensurable
55

6+
autorequire(:file) { '/root/.my.cnf' }
7+
68
newparam(:name, :namevar => true) do
79
desc 'The name of the MySQL database to manage.'
810
end

lib/puppet/type/mysql_user.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
ensurable
66

7+
autorequire(:file) { '/root/.my.cnf' }
8+
79
newparam(:name, :namevar => true) do
810
desc "The name of the user. This uses the 'username@hostname' or username@hostname."
911
validate do |value|

0 commit comments

Comments
 (0)