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