|
117 | 117 | # @param backup_cron_minute The minute when to run the daily backup cron job |
118 | 118 | # @param backup_cron_hour The hour when to run the daily backup cron job |
119 | 119 | # @param backup_cron_skips Array of items to skip valid values: db, uploads, repositories, builds, artifacts, lfs, registry, pages |
120 | | -# @param package_hold Wether to hold the specified package version. Available options are 'hold' or 'none'. Defaults to 'none'. Available only for Debian/Solaris package managers. |
| 120 | +# @param package_hold Wether to hold the specified package version. Available options are 'hold' or 'none'. Defaults to 'none'. Available only for Debian/Solaris package managers. |
121 | 121 | # @param package_name The internal packaging system's name for the package. This name will automatically be changed by the gitlab::edition parameter. Can be overridden for the purposes of installing custom compiled version of gitlab-omnibus. |
122 | 122 | # @param manage_package Should the GitLab package be managed? |
123 | 123 | # @param repository_configuration A hash of repository types and attributes for configuraiton the gitlab package repositories. See docs in README.md |
124 | 124 | # @param manage_omnibus_repository Set to false if you wish to manage gitlab without configuring the package repository |
125 | 125 | # @param pgpass_file_location Path to location of .pgpass file used by consul to authenticate with pgbouncer database |
126 | 126 | # @param pgpass_file_ensure Create .pgpass file for pgbouncer authentication. When set to present requires valid value for pgbouncer_password. |
127 | 127 | # @param pgbouncer_password Password for the gitlab-consul database user in the pgbouncer database |
| 128 | +# @param create_initial_root_token Whether to create an initial root token. If set to true and initial_root_token is undef, a random token string will be generated. |
| 129 | +# @param initial_root_token Preset a root token to allow API usage immediately. |
| 130 | +# @param initial_root_token_ttl_minutes Initial root token time to live (in minutes). |
128 | 131 | class gitlab ( |
129 | 132 | Hash $repository_configuration, |
130 | 133 | # package configuration |
|
224 | 227 | Optional[Hash] $gitlab_workhorse = undef, |
225 | 228 | Optional[Hash] $user = undef, |
226 | 229 | Optional[Hash] $web_server = undef, |
| 230 | + Boolean $create_initial_root_token = false, |
| 231 | + Optional[Sensitive[String[1]]] $initial_root_token = undef, |
| 232 | + Integer[0] $initial_root_token_ttl_minutes = 60, |
227 | 233 | Boolean $backup_cron_enable = false, |
228 | 234 | Integer[0,59] $backup_cron_minute = 0, |
229 | 235 | Integer[0,23] $backup_cron_hour = 2, |
|
238 | 244 | contain gitlab::omnibus_config |
239 | 245 | contain gitlab::install |
240 | 246 | contain gitlab::service |
| 247 | + contain gitlab::initial_root_token |
241 | 248 |
|
242 | 249 | Class['gitlab::host_config'] |
243 | 250 | -> Class['gitlab::omnibus_config'] |
244 | 251 | -> Class['gitlab::install'] |
245 | 252 | -> Class['gitlab::service'] |
| 253 | + -> Class['gitlab::initial_root_token'] |
246 | 254 |
|
247 | 255 | $custom_hooks.each |$name, $options| { |
248 | 256 | gitlab::custom_hook { $name: |
|
0 commit comments