-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathinit.pp
More file actions
69 lines (67 loc) · 2.72 KB
/
init.pp
File metadata and controls
69 lines (67 loc) · 2.72 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# @summary MySQL orchestrator: For managing replication and failover.
#
# @param config
# full path to configuration file
# @param config_defaults
# default configuration for orchestrator
# @param config_override
# configuration overlay
# @param config_template
# path to configuration file template
# @param package_ensure
# ensure package resource
# @param package_manage
# if true module will manage package
# @param package_name
# list of packages install. Default ['orchestrator']
# @param repo_manage
# if true module will manage repo with orchestrator package
# @param service_enable
# if true service orchestrator will be enaled at boot
# @param service_ensure
# ensure service resource
# @param service_manage
# if true module willl manage service
# @param service_name
# service name to manage. Default 'orchestrator'
# @param service_user
# user to own the service. Default 'root'
# @param service_group
# group to own the service. Default 'root'
class orchestrator (
String $config = $orchestrator::params::config,
Hash[String[1], Any] $config_defaults = $orchestrator::params::config_defaults,
Hash[String[1], Any] $config_override = {},
String $config_template = $orchestrator::params::config_template,
String $package_ensure = $orchestrator::params::package_ensure,
Boolean $package_manage = $orchestrator::params::package_manage,
Array[String[1]] $package_name = $orchestrator::params::package_name,
Boolean $repo_manage = $orchestrator::params::repo_manage,
Boolean $service_enable = $orchestrator::params::service_enable,
String $service_ensure = $orchestrator::params::service_ensure,
Boolean $service_manage = $orchestrator::params::service_manage,
String $service_name = $orchestrator::params::service_name,
String $service_user = $orchestrator::params::service_user,
String $service_group = $orchestrator::params::service_group,
) inherits orchestrator::params {
validate_absolute_path($config)
validate_string($config_template)
validate_string($package_ensure)
validate_bool($package_manage)
validate_array($package_name)
validate_bool($repo_manage)
validate_bool($service_enable)
validate_string($service_ensure)
validate_bool($service_manage)
validate_string($service_name)
contain orchestrator::repo
contain orchestrator::install
contain orchestrator::config
contain orchestrator::my_cnf
contain orchestrator::service
Class['orchestrator::repo']
-> Class['orchestrator::install']
-> Class['orchestrator::config']
~> Class['orchestrator::my_cnf']
-> Class['orchestrator::service']
}