Created
November 14, 2012 09:11
-
-
Save anonymous/4071123 to your computer and use it in GitHub Desktop.
Resources and parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
database { $name: | |
ensure => $ensure, | |
charset => $charset, | |
provider => 'mysql', | |
require => Class['mysql::server'], | |
} | |
In lib/puppet/provider/database/mysql.rb if I want to use the mysql root password | |
mysql('-p #{@something['mysql::config::root_password']} -NBe', "create database `#{@resource[:name]}` character set #{resource[:charset]}") | |
I would actually have to add the type parameter and : | |
database { $name: | |
ensure => $ensure, | |
charset => $charset, | |
provider => 'mysql', | |
root_password => mysql::config::root_password, | |
require => Class['mysql::server'], | |
} | |
then | |
mysql('-p #{@resource[:root_password]} -NBe', "create database `#{@resource[:name]}` character set #{resource[:charset]}") | |
Right? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment