Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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';
- }
- }
Add Comment
Please, Sign In to add comment