|
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 | | -# What style of init system your system uses. |
54 | | -# |
| 53 | +# What style of init system your system uses. Set to 'unmanaged' to disable |
| 54 | +# managing init system files for the consul service entirely. |
| 55 | +# |
55 | 56 | # [*install_method*] |
56 | 57 | # Valid strings: `package` - install via system package |
57 | 58 | # `url` - download and extract from a url. Defaults to `url`. |
58 | 59 | # `none` - disable install. |
59 | | -# |
| 60 | +# |
60 | 61 | # [*join_wan*] |
61 | 62 | # Whether to join the wan on service start. |
62 | | -# |
| 63 | +# |
63 | 64 | # [*manage_group*] |
64 | 65 | # Whether to create/manage the group that should own the consul configuration files. |
65 | | -# |
| 66 | +# |
66 | 67 | # [*manage_service*] |
67 | 68 | # Whether to manage the consul service. |
68 | | -# |
| 69 | +# |
69 | 70 | # [*manage_user*] |
70 | 71 | # Whether to create/manage the user that should own consul's configuration files. |
71 | | -# |
| 72 | +# |
72 | 73 | # [*os*] |
73 | 74 | # OS component in the name of the archive file containing the consul binary. |
74 | | -# |
| 75 | +# |
75 | 76 | # [*package_ensure*] |
76 | 77 | # Only valid when the install_method == package. Defaults to `latest`. |
77 | | -# |
| 78 | +# |
78 | 79 | # [*package_name*] |
79 | 80 | # Only valid when the install_method == package. Defaults to `consul`. |
80 | | -# |
| 81 | +# |
81 | 82 | # [*pretty_config*] |
82 | 83 | # Generates a human readable JSON config file. Defaults to `false`. |
83 | | -# |
| 84 | +# |
84 | 85 | # [*pretty_config_indent*] |
85 | 86 | # Toggle indentation for human readable JSON file. Defaults to `4`. |
86 | | -# |
| 87 | +# |
87 | 88 | # [*purge_config_dir*] |
88 | 89 | # Purge config files no longer generated by Puppet |
89 | | -# |
| 90 | +# |
90 | 91 | # [*restart_on_change*] |
91 | 92 | # Determines whether to restart consul agent on $config_hash changes. |
92 | 93 | # This will not affect reloads when service, check or watch configs change. |
93 | 94 | # Defaults to `true`. |
94 | | -# |
| 95 | +# |
95 | 96 | # [*service_enable*] |
96 | 97 | # Whether to enable the consul service to start at boot. |
97 | | -# |
| 98 | +# |
98 | 99 | # [*service_ensure*] |
99 | 100 | # Whether the consul service should be running or not. |
100 | | -# |
| 101 | +# |
101 | 102 | # [*services*] |
102 | 103 | # Hash of consul::service resources to create. |
103 | | -# |
| 104 | +# |
104 | 105 | # [*ui_download_extension*] |
105 | 106 | # The extension of the archive file containing the consul ui to download. |
106 | | -# |
| 107 | +# |
107 | 108 | # [*ui_download_url*] |
108 | 109 | # Fully qualified url to the location of the archive file containing the consul ui. |
109 | | -# |
| 110 | +# |
110 | 111 | # [*ui_download_url_base*] |
111 | 112 | # Base url to the location of the archive file containing the consul ui. |
112 | | -# |
| 113 | +# |
113 | 114 | # [*ui_package_ensure*] |
114 | 115 | # Only valid when the install_method == package. Defaults to `latest`. |
115 | | -# |
| 116 | +# |
116 | 117 | # [*ui_package_name*] |
117 | 118 | # Only valid when the install_method == package. Defaults to `consul_ui`. |
118 | | -# |
| 119 | +# |
119 | 120 | # [*user*] |
120 | 121 | # Name of the user that should own the consul configuration files. |
121 | | -# |
| 122 | +# |
122 | 123 | # [*version*] |
123 | 124 | # Specify version of consul binary to download. |
124 | | -# |
| 125 | +# |
125 | 126 | # [*watches*] |
126 | 127 | # Hash of consul::watch resources to create. |
127 | | -# |
| 128 | +# |
128 | 129 | # === Examples |
129 | | -# |
| 130 | +# |
130 | 131 | # @example |
131 | 132 | # class { '::consul': |
132 | 133 | # config_hash => { |
|
136 | 137 | # 'retry-join' => ['172.16.0.1'], |
137 | 138 | # }, |
138 | 139 | # } |
139 | | -# |
| 140 | +# |
140 | 141 | class consul ( |
141 | 142 | $acls = $::consul::params::acls, |
142 | 143 | $arch = $::consul::params::arch, |
|
0 commit comments