-
-
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.
* updated skip_auto_migrations to skip_auto_reconfigure * add tests for skip-auto-reconfigure * fix param name skip_auto_reconfigure * update rc version * fix spec syntax * use hash syntax in spec * correcting linting errors * linting fixes * deprecate skip_auto_migrations * document preinstall class * add documentaiton for auto-reconfigure and auto-migrations * update class ordering and anchoring * formatting fixes
1 parent
2643c75
commit 2a3ea7c
Showing
6 changed files
with
88 additions
and
24 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# == Class gitlab::config | ||
# | ||
# This class is for setting pre-install configurations | ||
# | ||
class gitlab::preinstall ( | ||
$skip_auto_migrations = $gitlab::skip_auto_migrations, | ||
$skip_auto_reconfigure = $gitlab::skip_auto_reconfigure | ||
) { | ||
|
||
#### | ||
# 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" | ||
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, | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0644', | ||
} | ||
} | ||
file { '/etc/gitlab/skip-auto-reconfigure': | ||
ensure => $skip_auto_reconfigure, | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0644', | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,18 @@ | |
with_content(%r{^\s*letsencrypt\['contact_emails'\] = \["[email protected]"\]$}) | ||
} | ||
end | ||
describe 'skip_auto_reconfigure' do | ||
let(:params) { { skip_auto_reconfigure: 'present' } } | ||
|
||
it { | ||
is_expected.to contain_file('/etc/gitlab/skip-auto-reconfigure').with( | ||
'ensure' => 'present', | ||
'owner' => 'root', | ||
'group' => 'root', | ||
'mode' => '0644' | ||
) | ||
} | ||
end | ||
describe 'secrets' do | ||
let(:params) do | ||
{ secrets: { | ||
|