|
| 1 | +# @summary MySQL orchestrator: For managing replication and failover. |
1 | 2 | # |
2 | | -# MySQL orchestrator: For managing replication and failover. |
3 | | -# |
| 3 | +# @param config |
| 4 | +# full path to configuration file |
| 5 | +# @param config_defaults |
| 6 | +# default configuration for orchestrator |
| 7 | +# @param config_override |
| 8 | +# configuration overlay |
| 9 | +# @param config_template |
| 10 | +# path to configuration file template |
| 11 | +# @param package_ensure |
| 12 | +# ensure package resource |
| 13 | +# @param package_manage |
| 14 | +# if true module will manage package |
| 15 | +# @param package_name |
| 16 | +# list of packages install. Default ['orchestrator'] |
| 17 | +# @param repo_manage |
| 18 | +# if true module will manage repo with orchestrator package |
| 19 | +# @param service_enable |
| 20 | +# if true service orchestrator will be enaled at boot |
| 21 | +# @param service_ensure |
| 22 | +# ensure service resource |
| 23 | +# @param service_manage |
| 24 | +# if true module willl manage service |
| 25 | +# @param service_name |
| 26 | +# service name to manage. Default 'orchestrator' |
4 | 27 | class orchestrator ( |
5 | | - $config = $orchestrator::params::config, |
6 | | - $config_defaults = $orchestrator::params::config_defaults, |
7 | | - $config_override = {}, |
8 | | - $config_template = $orchestrator::params::config_template, |
9 | | - $package_ensure = $orchestrator::params::package_ensure, |
10 | | - $package_manage = $orchestrator::params::package_manage, |
11 | | - $package_name = $orchestrator::params::package_name, |
12 | | - $repo_manage = $orchestrator::params::repo_manage, |
13 | | - $service_enable = $orchestrator::params::service_enable, |
14 | | - $service_ensure = $orchestrator::params::service_ensure, |
15 | | - $service_manage = $orchestrator::params::service_manage, |
16 | | - $service_name = $orchestrator::params::service_name, |
| 28 | + String $config = $orchestrator::params::config, |
| 29 | + Hash[String[1], Any] $config_defaults = $orchestrator::params::config_defaults, |
| 30 | + Hash[String[1], Any] $config_override = {}, |
| 31 | + String $config_template = $orchestrator::params::config_template, |
| 32 | + String $package_ensure = $orchestrator::params::package_ensure, |
| 33 | + Boolean $package_manage = $orchestrator::params::package_manage, |
| 34 | + Array[String[1]] $package_name = $orchestrator::params::package_name, |
| 35 | + Boolean $repo_manage = $orchestrator::params::repo_manage, |
| 36 | + Boolean $service_enable = $orchestrator::params::service_enable, |
| 37 | + String $service_ensure = $orchestrator::params::service_ensure, |
| 38 | + Boolean $service_manage = $orchestrator::params::service_manage, |
| 39 | + String $service_name = $orchestrator::params::service_name, |
17 | 40 | ) inherits orchestrator::params { |
18 | | - |
19 | 41 | validate_absolute_path($config) |
20 | 42 | validate_string($config_template) |
21 | 43 | validate_string($package_ensure) |
|
27 | 49 | validate_bool($service_manage) |
28 | 50 | validate_string($service_name) |
29 | 51 |
|
30 | | - # Using anchor pattern based on known issue: |
31 | | - # http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues |
32 | | - anchor { 'orchestrator::begin': } -> |
33 | | - class { '::orchestrator::repo': } -> |
34 | | - class { '::orchestrator::install': } -> |
35 | | - class { '::orchestrator::config': } ~> |
36 | | - class { '::orchestrator::my_cnf': } ~> |
37 | | - class { '::orchestrator::service': } -> |
38 | | - anchor { 'orchestrator::end': } |
| 52 | + contain orchestrator::repo |
| 53 | + contain orchestrator::install |
| 54 | + contain orchestrator::config |
| 55 | + contain orchestrator::my_cnf |
| 56 | + contain orchestrator::service |
39 | 57 |
|
| 58 | + Class['orchestrator::repo'] |
| 59 | + -> Class['orchestrator::install'] |
| 60 | + -> Class['orchestrator::config'] |
| 61 | + ~> Class['orchestrator::my_cnf'] |
| 62 | + -> Class['orchestrator::service'] |
40 | 63 | } |
0 commit comments