-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from LongLiveCHIEF/refactor-ordering
Refactor resource ordering
- Loading branch information
Showing
9 changed files
with
287 additions
and
282 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# == Class gitlab::host_config | ||
# | ||
# This class is for setting host configurations required for gitlab installation | ||
# | ||
# [*config_dir*] | ||
# Default: '/etc/gitlab' | ||
# The service executable path. | ||
# Provide this variable value only if the service executable path | ||
# would be a subject of change in future GitLab versions for any reason. | ||
class gitlab::host_config ( | ||
$config_dir = '/etc/gitlab', | ||
$skip_auto_migrations = $gitlab::skip_auto_migrations, | ||
$skip_auto_reconfigure = $gitlab::skip_auto_reconfigure, | ||
$secrets_file = $gitlab::secrets_file, | ||
$store_git_keys_in_db = $gitlab::store_git_keys_in_db, | ||
) { | ||
|
||
file { $config_dir: | ||
ensure => 'directory', | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0775', | ||
} | ||
|
||
# Deprecation notice: | ||
# skip_auto_migrations is deprecated and will be removed at some point after | ||
# GitLab 11.0 is released | ||
$skip_auto_migrations_deprecation_msg = "DEPRECTATION: 'skip_auto_migrations' is deprecated if using GitLab 10.6 or greater. Set skip_auto_reconfigure instead" | ||
$skip_auto_reconfigure_attributes = { | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0644', | ||
} | ||
if $skip_auto_migrations != undef { | ||
notify { $skip_auto_migrations_deprecation_msg: } | ||
$_skip_auto_migrations_ensure = $skip_auto_migrations ? { | ||
true => 'present', | ||
default => 'absent', | ||
} | ||
file { '/etc/gitlab/skip-auto-migrations': | ||
ensure => $_skip_auto_migrations_ensure, | ||
* => $skip_auto_reconfigure_attributes, | ||
} | ||
} | ||
file { '/etc/gitlab/skip-auto-reconfigure': | ||
ensure => $skip_auto_reconfigure, | ||
* => $skip_auto_reconfigure_attributes, | ||
} | ||
if $store_git_keys_in_db != undef { | ||
$_store_git_keys_in_db = $store_git_keys_in_db ? { | ||
true => 'file', | ||
default => 'absent', | ||
} | ||
$opt_gitlab_shell_dir = $store_git_keys_in_db ? { | ||
true => 'directory', | ||
default => 'absent' | ||
} | ||
file {'/opt/gitlab-shell': | ||
ensure => $opt_gitlab_shell_dir, | ||
owner => 'root', | ||
group => 'git', | ||
} | ||
file { '/opt/gitlab-shell/authorized_keys': | ||
ensure => $_store_git_keys_in_db, | ||
owner => 'root', | ||
group => 'git', | ||
mode => '0650', | ||
source => 'puppet:///modules/gitlab/gitlab_shell_authorized_keys', | ||
} | ||
} | ||
include gitlab::backup | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.