update /etc/hosts with public host name

This commit is contained in:
Sergey Kulikov 2016-08-05 09:19:25 +00:00
parent 6fa2178bc5
commit fe70b59ee0
5 changed files with 29 additions and 22 deletions

View File

@ -31,6 +31,7 @@ if $rally_hash {
true => 'https',
default => 'http',
}
$public_hostname = $public_ssl['hostname']
$public_vip = hiera('public_vip', undef)
$auth_url = "${proto}://${public_vip}:5000/v2.0"
@ -46,6 +47,8 @@ if $rally_hash {
rally::repository_url: <%= @repository_url %>
rally::repository_tag: <%= @repository_tag %>
rally::auth_url: <%= @auth_url %>
rally::public_hostname: <%= @public_hostname %>
rally::public_vip: <%= @public_vip %>
rally::username: <%= @username %>
rally::password: <%= @password %>
rally::tenant_name: <%= @tenant_name %>

View File

@ -3,6 +3,11 @@ class rally::config inherits rally {
$rally_config = "${rally::rally_home}/existing.json"
$rally_deployment = 'existing'
host { "${rally::public_hostname}":
ensure => present,
ip => $rally::public_vip,
}
file { "${rally_config}":
ensure => file,
content => template('rally/existing.json.erb'),

View File

@ -1,12 +1,14 @@
class rally (
$repository_url = $rally::params::repository_url,
$repository_tag = $rally::params::repository_tag,
$create_user = $rally::params::create_user,
$rally_user = $rally::params::rally_user,
$auth_url = $rally::params::auth_url,
$username = $rally::params::usermame,
$password = $rally::params::password,
$tenant_name = $rally::params::tenant_name,
$repository_url = $rally::params::repository_url,
$repository_tag = $rally::params::repository_tag,
$create_user = $rally::params::create_user,
$rally_user = $rally::params::rally_user,
$auth_url = $rally::params::auth_url,
$public_hostname = $rally::params::public_hostname,
$public_vip = $rally::params::public_vip,
$username = $rally::params::usermame,
$password = $rally::params::password,
$tenant_name = $rally::params::tenant_name,
) inherits rally::params {
$rally_group = $rally_user

View File

@ -1,10 +1,12 @@
class rally::params {
$repository_url = 'https://github.com/openstack/rally'
$repository_tag = 'master'
$create_user = true
$rally_user = 'rally'
$auth_url = undef
$username = undef
$password = undef
$tenant_name = undef
$repository_url = 'https://github.com/openstack/rally'
$repository_tag = 'master'
$create_user = true
$rally_user = 'rally'
$auth_url = undef
$public_hostname = undef
$public_vip = undef
$username = undef
$password = undef
$tenant_name = undef
}

View File

@ -1,6 +1 @@
- role: '*'
stage: pre_deployment
type: shell
parameters:
cmd: echo OK
timeout: 30
[]