|
1 | 1 | # == Class: consul |
2 | | -# |
| 2 | +# |
3 | 3 | # Installs, configures and manages consul |
4 | | -# |
| 4 | +# |
5 | 5 | # === Parameters |
6 | | -# |
| 6 | +# |
7 | 7 | # [*acls*] |
8 | 8 | # Hash of consul_acl resources to create. |
9 | | -# |
| 9 | +# |
10 | 10 | # [*arch*] |
11 | 11 | # Architecture of consul binary to download. |
12 | | -# |
| 12 | +# |
13 | 13 | # [*archive_path*] |
14 | 14 | # Path used when installing consul via the url. |
15 | | -# |
| 15 | +# |
16 | 16 | # [*bin_dir*] |
17 | 17 | # Directory to create the symlink to the consul binary in. |
18 | | -# |
| 18 | +# |
19 | 19 | # [*checks*] |
20 | 20 | # Hash of consul::check resources to create. |
21 | | -# |
| 21 | +# |
22 | 22 | # [*config_defaults*] |
23 | 23 | # Configuration defaults hash. Gets merged with config_hash. |
24 | | -# |
| 24 | +# |
25 | 25 | # [*config_dir*] |
26 | 26 | # Directory to place consul configuration files in. |
27 | | -# |
| 27 | +# |
28 | 28 | # [*config_hash*] |
29 | 29 | # Use this to populate the JSON config file for consul. |
30 | | -# |
| 30 | +# |
31 | 31 | # [*config_mode*] |
32 | 32 | # Use this to set the JSON config file mode for consul. |
33 | | -# |
| 33 | +# |
34 | 34 | # [*download_extension*] |
35 | 35 | # The extension of the archive file containing the consul binary to download. |
36 | | -# |
| 36 | +# |
37 | 37 | # [*download_url*] |
38 | 38 | # Fully qualified url to the location of the archive file containing the consul binary. |
39 | | -# |
| 39 | +# |
40 | 40 | # [*download_url_base*] |
41 | 41 | # Base url to the location of the archive file containing the consul binary. |
42 | | -# |
| 42 | +# |
43 | 43 | # [*extra_groups*] |
44 | 44 | # Extra groups to add the consul system user to. |
45 | | -# |
| 45 | +# |
46 | 46 | # [*extra_options*] |
47 | 47 | # Extra arguments to be passed to the consul agent |
48 | | -# |
| 48 | +# |
49 | 49 | # [*group*] |
50 | 50 | # Name of the group that should own the consul configuration files. |
51 | | -# |
| 51 | +# |
52 | 52 | # [*init_style*] |
53 | 53 | # What style of init system your system uses. |
54 | | -# |
| 54 | +# |
55 | 55 | # [*install_method*] |
56 | 56 | # Valid strings: `package` - install via system package |
57 | 57 | # `url` - download and extract from a url. Defaults to `url`. |
58 | 58 | # `none` - disable install. |
59 | | -# |
| 59 | +# |
60 | 60 | # [*join_wan*] |
61 | 61 | # Whether to join the wan on service start. |
62 | | -# |
| 62 | +# |
63 | 63 | # [*manage_group*] |
64 | 64 | # Whether to create/manage the group that should own the consul configuration files. |
65 | | -# |
| 65 | +# |
66 | 66 | # [*manage_service*] |
67 | 67 | # Whether to manage the consul service. |
68 | | -# |
| 68 | +# |
69 | 69 | # [*manage_user*] |
70 | 70 | # Whether to create/manage the user that should own consul's configuration files. |
71 | | -# |
| 71 | +# |
72 | 72 | # [*os*] |
73 | 73 | # OS component in the name of the archive file containing the consul binary. |
74 | | -# |
| 74 | +# |
75 | 75 | # [*package_ensure*] |
76 | 76 | # Only valid when the install_method == package. Defaults to `latest`. |
77 | | -# |
| 77 | +# |
78 | 78 | # [*package_name*] |
79 | 79 | # Only valid when the install_method == package. Defaults to `consul`. |
80 | | -# |
| 80 | +# |
81 | 81 | # [*pretty_config*] |
82 | 82 | # Generates a human readable JSON config file. Defaults to `false`. |
83 | | -# |
| 83 | +# |
84 | 84 | # [*pretty_config_indent*] |
85 | 85 | # Toggle indentation for human readable JSON file. Defaults to `4`. |
86 | | -# |
| 86 | +# |
87 | 87 | # [*purge_config_dir*] |
88 | 88 | # Purge config files no longer generated by Puppet |
89 | | -# |
| 89 | +# |
90 | 90 | # [*restart_on_change*] |
91 | 91 | # Determines whether to restart consul agent on $config_hash changes. |
92 | 92 | # This will not affect reloads when service, check or watch configs change. |
93 | 93 | # Defaults to `true`. |
94 | | -# |
| 94 | +# |
95 | 95 | # [*service_enable*] |
96 | 96 | # Whether to enable the consul service to start at boot. |
97 | | -# |
| 97 | +# |
98 | 98 | # [*service_ensure*] |
99 | 99 | # Whether the consul service should be running or not. |
100 | | -# |
| 100 | +# |
101 | 101 | # [*services*] |
102 | 102 | # Hash of consul::service resources to create. |
103 | | -# |
| 103 | +# |
104 | 104 | # [*ui_download_extension*] |
105 | 105 | # The extension of the archive file containing the consul ui to download. |
106 | | -# |
| 106 | +# |
107 | 107 | # [*ui_download_url*] |
108 | 108 | # Fully qualified url to the location of the archive file containing the consul ui. |
109 | | -# |
| 109 | +# |
110 | 110 | # [*ui_download_url_base*] |
111 | 111 | # Base url to the location of the archive file containing the consul ui. |
112 | | -# |
| 112 | +# |
113 | 113 | # [*ui_package_ensure*] |
114 | 114 | # Only valid when the install_method == package. Defaults to `latest`. |
115 | | -# |
| 115 | +# |
116 | 116 | # [*ui_package_name*] |
117 | 117 | # Only valid when the install_method == package. Defaults to `consul_ui`. |
118 | | -# |
| 118 | +# |
119 | 119 | # [*user*] |
120 | 120 | # Name of the user that should own the consul configuration files. |
121 | | -# |
| 121 | +# |
122 | 122 | # [*version*] |
123 | 123 | # Specify version of consul binary to download. |
124 | | -# |
| 124 | +# |
125 | 125 | # [*watches*] |
126 | 126 | # Hash of consul::watch resources to create. |
127 | | -# |
| 127 | +# |
128 | 128 | # === Examples |
129 | | -# |
| 129 | +# |
130 | 130 | # @example |
131 | 131 | # class { '::consul': |
132 | 132 | # config_hash => { |
|
136 | 136 | # 'retry-join' => ['172.16.0.1'], |
137 | 137 | # }, |
138 | 138 | # } |
139 | | -# |
| 139 | +# |
140 | 140 | class consul ( |
141 | 141 | $acls = $::consul::params::acls, |
142 | 142 | $arch = $::consul::params::arch, |
|
0 commit comments