| 1 |
# private define |
| 2 |
# $name will be an index into the $mcollective::middleware_hostsarray + 1 |
| 3 |
define mcollective::common::config::connector::activemq::hosts_iteration { |
| 4 |
$middleware_hosts_array = flatten([$mcollective::middleware_hosts]) |
| 5 |
mcollective::common::setting { "plugin.activemq.pool.${name}.host": |
| 6 |
value => $middleware_hosts_array[$name - 1], |
| 7 |
} |
| 8 |
|
| 9 |
$port = $mcollective::middleware_ssl ? { |
| 10 |
true => $mcollective::middleware_ssl_port, |
| 11 |
default => $mcollective::middleware_port, |
| 12 |
} |
| 13 |
|
| 14 |
$fallback = $mcollective::middleware_ssl_fallback ? { |
| 15 |
true => 1, |
| 16 |
default => 0, |
| 17 |
} |
| 18 |
|
| 19 |
mcollective::common::setting { "plugin.activemq.pool.${name}.port": |
| 20 |
value => $port, |
| 21 |
} |
| 22 |
|
| 23 |
mcollective::common::setting { "plugin.activemq.pool.${name}.user": |
| 24 |
value => $mcollective::middleware_user, |
| 25 |
} |
| 26 |
|
| 27 |
mcollective::common::setting { "plugin.activemq.pool.${name}.password": |
| 28 |
value => $mcollective::middleware_password, |
| 29 |
} |
| 30 |
|
| 31 |
if $mcollective::middleware_ssl { |
| 32 |
mcollective::common::setting { "plugin.activemq.pool.${name}.ssl": |
| 33 |
value => 1, |
| 34 |
} |
| 35 |
|
| 36 |
mcollective::common::setting { "plugin.activemq.pool.${name}.ssl.ca": |
| 37 |
value => $::mcollective::middleware_ssl_ca_path, |
| 38 |
} |
| 39 |
|
| 40 |
mcollective::common::setting { "plugin.activemq.pool.${name}.ssl.fallback": |
| 41 |
value => $fallback, |
| 42 |
} |
| 43 |
} |
| 44 |
} |