File: etcddiscovery.pp

package info (click to toggle)
openstack-cluster-installer 43.0.22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,544 kB
  • sloc: php: 19,169; sh: 18,137; ruby: 75; makefile: 31; xml: 8
file content (33 lines) | stat: -rw-r--r-- 774 bytes parent folder | download | duplicates (4)
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
class oci::etcddiscovery(
  $prefix_url             = 'http://example.com',
  $web_service_address    = ':8087',
  $etcd_endpoint_location = 'http://127.0.0.1:2379',
){

  package { 'etcd-discovery':
    ensure => 'present',
  }->
  file { '/etc/etcd-discovery/etcd-discovery.conf':
    ensure => 'present',
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
    content => "# This file is managed by puppet: do not touch

[server]
# used as prefix when returning the cluster ID
prefix_url=${prefix_url}

web_service_address=${web_service_address}

[etcd]
# Where is located your ETCD cluster?
endpoint_location=${etcd_endpoint_location}
"
  }->
  service { 'etcd-discovery':
    ensure    => 'running',
    enable    => true,
    hasstatus => true,
  }
}