puppet-openstack-integration/manifests/config.pp
Emilien Macchi 4ed8366f07 scenario002/centos7: switch RabbitMQ and OpenStack to IPv6
This is a first iteration of testing IPv6 deployment.
This patch will deploy scenario002 on centos7 by using IPv6 network.

To make it work on Ubuntu, it will require more work, that will be done
in future iterations. During my testing, I found some bugs and did not
investigate because I wanted a first scenario working on v6.

Same for scenario001 and scenario003, they'll be tested later.

Change-Id: Ib28b379645b5a3d351438e0408a9de62b9f48302
2016-03-29 13:54:17 -04:00

45 lines
915 B
Puppet

# Configure some common parameters
#
# [*ssl*]
# (optional) Boolean to enable or not SSL.
# Defaults to false.
#
# [*ipv6*]
# (optional) Boolean to enable or not IPv6.
# Defaults to false.
#
class openstack_integration::config (
$ssl = false,
$ipv6 = false,
) {
if $ssl {
$rabbit_port = '5671'
$proto = 'https'
} else {
$rabbit_port = '5672'
$proto = 'http'
}
if $ipv6 {
$host = '::1'
$rabbit_env = {
'RABBITMQ_NODE_IP_ADDRESS' => $host,
'RABBITMQ_SERVER_START_ARGS' => '"-proto_dist inet6_tcp"',
}
$ip_version = '6'
} else {
$host = '127.0.0.1'
$rabbit_env = {}
$ip_version = '4'
}
# in URL, brackets are needed
$ip_for_url = normalize_ip_for_uri($host)
$base_url = "${proto}://${ip_for_url}"
$keystone_auth_uri = "${base_url}:5000"
$keystone_admin_uri = "${base_url}:35357"
}