Skip to content
Snippets Groups Projects
Commit c5c3940a authored by Riccardo Bucchi's avatar Riccardo Bucchi
Browse files

parametrized mysql grant hostname in site.pp

parent 4bdeb9f5
No related branches found
No related tags found
No related merge requests found
......@@ -22,26 +22,27 @@ $haproxy_controller_ips = ['192.168.0.31', '192.168.0.32']
## PERCONA
# every openstack user must be created on rhmk servers. '%' is mysql wildcard.
$mysql_grant_hostname = '192.168.0.%'
$mysql_users = {
'keystone@192.168.0.%' => {
"keystone@${mysql_grant_hostname}" => {
password_hash => mysql_password('keystone'),
},
'glance@192.168.0.%' => {
"glance@${mysql_grant_hostname}" => {
password_hash => mysql_password('glance'),
},
'nova@192.168.0.%' => {
"nova@${mysql_grant_hostname}" => {
password_hash => mysql_password('nova'),
},
'cinder@192.168.0.%' => {
"cinder@${mysql_grant_hostname}" => {
password_hash => mysql_password('cinder'),
},
'neutron@192.168.0.%' => {
"neutron@${mysql_grant_hostname}" => {
password_hash => mysql_password('neutron'),
},
'ceilometer@192.168.0.%' => {
"ceilometer@${mysql_grant_hostname}" => {
password_hash => mysql_password('ceilometer'),
},
'heat@192.168.0.%' => {
"heat@${mysql_grant_hostname}" => {
password_hash => mysql_password('heat'),
},
}
......@@ -59,32 +60,32 @@ $mysql_databases = {
# assign grants for every string user@host/database.table
$mysql_grants = {
'keystone@192.168.0.%/keystone.*' => {
user => 'keystone@192.168.0.%',
"keystone@${mysql_grant_hostname}/keystone.*" => {
user => "keystone@${mysql_grant_hostname}",
table => 'keystone.*',
},
'glance@192.168.0.%/glance.*' => {
user => 'glance@192.168.0.%',
"glance@${mysql_grant_hostname}/glance.*" => {
user => "glance@${mysql_grant_hostname}",
table => 'glance.*',
},
'nova@192.168.0.%/nova.*' => {
user => 'nova@192.168.0.%',
"nova@${mysql_grant_hostname}/nova.*" => {
user => "nova@${mysql_grant_hostname}",
table => 'nova.*',
},
'cinder@192.168.0.%/cinder.*' => {
user => 'cinder@192.168.0.%',
"cinder@${mysql_grant_hostname}/cinder.*" => {
user => "cinder@${mysql_grant_hostname}",
table => 'cinder.*',
},
'neutron@192.168.0.%/neutron.*' => {
user => 'neutron@192.168.0.%',
"neutron@${mysql_grant_hostname}/neutron.*" => {
user => "neutron@${mysql_grant_hostname}",
table => 'neutron.*',
},
'ceilometer@192.168.0.%/ceilometer.*' => {
user => 'ceilometer@192.168.0.%',
"ceilometer@${mysql_grant_hostname}/ceilometer.*" => {
user => "ceilometer@${mysql_grant_hostname}",
table => 'ceilometer.*',
},
'heat@192.168.0.%/heat.*' => {
user => 'heat@192.168.0.%',
"heat@${mysql_grant_hostname}/heat.*" => {
user => "heat@${mysql_grant_hostname}",
table => 'heat.*',
},
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment