summaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorGiulio Fidente <gfidente@redhat.com>2016-08-26 13:41:28 +0200
committerJiri Stransky <jistr@redhat.com>2016-08-30 08:06:59 +0000
commit1939bd257d9816fc2ce10ac25ab43cddb92ea562 (patch)
treeadea2abeefe87db344a0015921c5a3d474f46a40 /manifests
parentcfe8fb0e00dfbf3fc2b1a3c68d44d8c4e5520b4b (diff)
Defaults to ceph_mon_node_ips and ceph_mon_node_names
Uses the ceph_mon_node_ips and _names from all_nodes.yaml which are formatted as arrays. Also deprecates ceph_ipv6 parameter as will determine if ipv6 using is_ipv6_address. Change-Id: I481dd2cd2cde7f1491080e6d9c7dcb7047c22de1
Diffstat (limited to 'manifests')
-rw-r--r--manifests/profile/base/ceph.pp34
1 files changed, 16 insertions, 18 deletions
diff --git a/manifests/profile/base/ceph.pp b/manifests/profile/base/ceph.pp
index 94166ac..6ffd4ef 100644
--- a/manifests/profile/base/ceph.pp
+++ b/manifests/profile/base/ceph.pp
@@ -18,22 +18,13 @@
#
# === Parameters
#
-# [*ceph_ipv6*]
-# (Optional) Force daemons to bind on IPv6 addresses
-# Defaults to false
-#
# [*ceph_mon_initial_members*]
# (Optional) List of IP addresses to use as mon_initial_members
-# Defaults to undef
+# Defaults to hiera('ceph_mon_node_names')
#
# [*ceph_mon_host*]
# (Optional) List of IP addresses to use as mon_host
-# Deftauls to undef
-#
-# [*ceph_mon_host_v6*]
-# (Optional) List of IPv6 addresses, surrounded by brackets, used as
-# mon_host when ceph_ipv6 is true
-# Defaults to undef
+# Deftauls to hiera('ceph_mon_node_ips')
#
# [*enable_ceph_storage*]
# (Optional) enable_ceph_storage
@@ -45,22 +36,29 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::ceph (
- $ceph_ipv6 = false,
- $ceph_mon_initial_members = undef,
- $ceph_mon_host = undef,
- $ceph_mon_host_v6 = undef,
+ $ceph_mon_initial_members = hiera('ceph_mon_node_names', undef),
+ $ceph_mon_host = hiera('ceph_mon_node_ips', '127.0.0.1'),
$enable_ceph_storage = false,
$step = hiera('step'),
) {
if $step >= 2 {
if $ceph_mon_initial_members {
- $mon_initial_members = downcase($ceph_mon_initial_members)
+ if is_array($ceph_mon_initial_members) {
+ $mon_initial_members = downcase(join($ceph_mon_initial_members, ','))
+ } else {
+ $mon_initial_members = downcase($ceph_mon_initial_members)
+ }
} else {
$mon_initial_members = undef
}
- if $ceph_ipv6 {
- $mon_host = $ceph_mon_host_v6
+
+ if is_array($ceph_mon_host) {
+ if is_ipv6_address($ceph_mon_host[0]) {
+ $mon_host = join(enclose_ipv6($ceph_mon_host), ',')
+ } else {
+ $mon_host = join($ceph_mon_host, ',')
+ }
} else {
$mon_host = $ceph_mon_host
}