File: nova.pp

package info (click to toggle)
puppet-module-octavia 25.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,588 kB
  • sloc: ruby: 3,940; python: 38; makefile: 12; sh: 10
file content (57 lines) | stat: -rw-r--r-- 1,931 bytes parent folder | download
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
# == Class: octavia::nova
#
# Setup and configure octavia.conf nova section.
#
# === Parameters:
#
# [*service_name*]
#   (Optional) The name of the nova service in the keystone catalog.
#   Defaults to $facts['os_service_default']
#
# [*endpoint*]
#   (Optional) Custom nova endpoint if override is necessary.
#   Defaults to $facts['os_service_default']
#
# [*region_name*]
#   (Optional) Region in catalog to use for nova.
#   Defaults to $facts['os_service_default']
#
# [*endpoint_type*]
#   (Optional) Endpoint type in catalog to use for nova.
#   Defaults to $facts['os_service_default']
#
# [*availability_zone*]
#   (Optional) Availability zone to use for creating Amphorae.
#   Defaults to $facts['os_service_default']
#
# [*enable_anti_affinity*]
#   (Optional) Enable anti-affinity in nova.
#   Defaults to $facts['os_service_default']
#
# [*anti_affinity_policy*]
#   (Optional) Set the anti-affinity policy to what is suitable.
#   Nova supports: anti-affinity and soft-anti-affinity.
#   Defaults to $facts['os_service_default']
#
class octavia::nova (
  $service_name         = $facts['os_service_default'],
  $endpoint             = $facts['os_service_default'],
  $region_name          = $facts['os_service_default'],
  $endpoint_type        = $facts['os_service_default'],
  $availability_zone    = $facts['os_service_default'],
  $enable_anti_affinity = $facts['os_service_default'],
  $anti_affinity_policy = $facts['os_service_default'],
) {

  include octavia::deps

  octavia_config {
    'nova/service_name':         value => $service_name;
    'nova/endpoint':             value => $endpoint;
    'nova/region_name':          value => $region_name;
    'nova/endpoint_type':        value => $endpoint_type;
    'nova/availability_zone':    value => $availability_zone;
    'nova/enable_anti_affinity': value => $enable_anti_affinity;
    'nova/anti_affinity_policy': value => $anti_affinity_policy;
  }
}