Created
October 26, 2009 17:41
-
-
Save duritong/218850 to your computer and use it in GitHub Desktop.
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
NICE but not working: | |
site-mysql/init.pp | |
class site-mysql inherits mysql { | |
# operations user | |
mysql_user{'operations@10.2.111.%': | |
password_hash => "*DEE65258DA0F2513DE84AD4C1E15557C65602548" | |
} | |
mysql_grant{'operations@10.2.111.%': | |
privileges => 'all', | |
require => [ Mysql_user['operations@10.2.111.%'] ], | |
} | |
} | |
site-mysql/kyushu.pp | |
class site-mysql::kyushu inherits site-mysql { | |
$mysql_rootpw = 'eu7shae2ahf5theibohS9ri5' | |
mysql_user{'mgroner@10.2.111.%': | |
password_hash => "*3ADE0F8B147F85334D5444D01C04918AC6A1B4B0", | |
} | |
mysql_grant{'mgroner@10.2.111.%': | |
privileges => 'all', | |
require => [ Mysql_user['mgroner@10.2.111.%'] ], | |
} | |
mysql::default_database{ | |
'pitc_swissflirt_test': | |
username => 'pitc_swissflirt', | |
password => '*65B3F53CF360764B6B8851FEF58D66DFAE22E809'; | |
} | |
} | |
working alternative: | |
site-mysql/init.pp | |
class site-mysql { | |
# empty | |
} | |
class site-mysql::kyushu { | |
$mysql_rootpw = 'eu7shae2ahf5theibohS9ri5' | |
include mysql | |
include mysql::default_user | |
mysql_user{'mgroner@10.2.111.%': | |
password_hash => "*3ADE0F8B147F85334D5444D01C04918AC6A1B4B0", | |
} | |
mysql_grant{'mgroner@10.2.111.%': | |
privileges => 'all', | |
require => [ Mysql_user['mgroner@10.2.111.%'] ], | |
} | |
mysql::default_database{ | |
'pitc_swissflirt_test': | |
username => 'pitc_swissflirt', | |
password => '*65B3F53CF360764B6B8851FEF58D66DFAE22E809'; | |
} | |
} | |
_why not that way: | |
site-mysql/init.pp | |
class site-mysql inherits mysql { | |
# operations user | |
mysql_user{'operations@10.2.111.%': | |
password_hash => "*DEE65258DA0F2513DE84AD4C1E15557C65602548" | |
} | |
mysql_grant{'operations@10.2.111.%': | |
privileges => 'all', | |
require => [ Mysql_user['operations@10.2.111.%'] ], | |
} | |
} | |
site-mysql/kyushu.pp | |
class site-mysql::kyushu { | |
$mysql_rootpw = 'eu7shae2ahf5theibohS9ri5' | |
include site-mysql | |
mysql_user{'mgroner@10.2.111.%': | |
password_hash => "*3ADE0F8B147F85334D5444D01C04918AC6A1B4B0", | |
} | |
mysql_grant{'mgroner@10.2.111.%': | |
privileges => 'all', | |
require => [ Mysql_user['mgroner@10.2.111.%'] ], | |
} | |
mysql::default_database{ | |
'pitc_swissflirt_test': | |
username => 'pitc_swissflirt', | |
password => '*65B3F53CF360764B6B8851FEF58D66DFAE22E809'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment