1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
# == Class: neutron::designate
#
# Configure the Neutron designate DNS driver
#
# === Parameters
#
# [*password*]
# (required) Password for connection to designate in admin context.
#
# [*url*]
# (required) URL to the designate service.
#
# [*auth_type*]
# (optional) An authentication type to use with an OpenStack Identity server.
# The value should contain auth plugin name
# Defaults to 'password'
#
# [*username*]
# (optional) Username for connection to designate in admin context
# Defaults to 'neutron'
#
# [*user_domain_name*]
# (optional) Name of domain for $username
# Defaults to 'Default'
#
# [*project_name*]
# (optional) The name of the admin project
# Defaults to 'services'
#
# [*project_domain_name*]
# (optional) Name of domain for $project_name
# Defaults to 'Default'
#
# [*system_scope*]
# (optional) Scope for system operations
# Defaults to $facts['os_service_default']
#
# [*auth_url*]
# (optional) Authorization URI for connection to designate in admin context.
# If version independent identity plugin is used available versions will be
# determined using auth_url
# Defaults to 'http://127.0.0.1:5000'
#
# [*cafile*]
# (optional) A PEM encoded Certificate Authority to use when verifying HTTPs
# connections.
# Defaults to $facts['os_service_default'].
#
# [*certfile*]
# (optional) Required if identity server requires client certificate
# Defaults to $facts['os_service_default'].
#
# [*region_name*]
# (Optional) The region of the Designate service.
# Defaults to $facts['os_service_default'].
#
# [*allow_reverse_dns_lookup*]
# (optional) Enable or not the creation of reverse lookup (PTR) records.
# Defaults to $facts['os_service_default'].
#
# [*ipv4_ptr_zone_prefix_size*]
# (optional) Enable or not the creation of reverse lookup (PTR) records.
# Defaults to $facts['os_service_default'].
#
# [*ipv6_ptr_zone_prefix_size*]
# (optional) Enable or not the creation of reverse lookup (PTR) records.
# Defaults to $facts['os_service_default'].
#
# [*ptr_zone_email*]
# (optional) The email address to be used when creating PTR zones.
# Defaults to $facts['os_service_default'].
#
class neutron::designate (
$password,
$url,
$auth_type = 'password',
$username = 'neutron',
$user_domain_name = 'Default',
$project_name = 'services',
$project_domain_name = 'Default',
$system_scope = $facts['os_service_default'],
$auth_url = 'http://127.0.0.1:5000',
$cafile = $facts['os_service_default'],
$certfile = $facts['os_service_default'],
$region_name = $facts['os_service_default'],
$allow_reverse_dns_lookup = $facts['os_service_default'],
$ipv4_ptr_zone_prefix_size = $facts['os_service_default'],
$ipv6_ptr_zone_prefix_size = $facts['os_service_default'],
$ptr_zone_email = $facts['os_service_default'],
) {
include neutron::deps
include neutron::params
if is_service_default($system_scope) {
$project_name_real = $project_name
$project_domain_name_real = $project_domain_name
} else {
$project_name_real = $facts['os_service_default']
$project_domain_name_real = $facts['os_service_default']
}
neutron_config {
'DEFAULT/external_dns_driver': value => 'designate';
'designate/password': value => $password, secret => true;
'designate/url': value => $url;
'designate/auth_type': value => $auth_type;
'designate/username': value => $username;
'designate/user_domain_name': value => $user_domain_name;
'designate/project_name': value => $project_name_real;
'designate/project_domain_name': value => $project_domain_name_real;
'designate/system_scope': value => $system_scope;
'designate/auth_url': value => $auth_url;
'designate/cafile': value => $cafile;
'designate/certfile': value => $certfile;
'designate/region_name': value => $region_name;
'designate/allow_reverse_dns_lookup': value => $allow_reverse_dns_lookup;
'designate/ipv4_ptr_zone_prefix_size': value => $ipv4_ptr_zone_prefix_size;
'designate/ipv6_ptr_zone_prefix_size': value => $ipv6_ptr_zone_prefix_size;
'designate/ptr_zone_email': value => $ptr_zone_email;
}
}
|