Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for the gitlab_sshd configuration hash #421

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ The following parameters are available in the `gitlab` class:
* [`gitlab_kas`](#-gitlab--gitlab_kas)
* [`gitlab_pages`](#-gitlab--gitlab_pages)
* [`gitlab_rails`](#-gitlab--gitlab_rails)
* [`gitlab_sshd`](#-gitlab--gitlab_sshd)
* [`gitlab_workhorse`](#-gitlab--gitlab_workhorse)
* [`grafana`](#-gitlab--grafana)
* [`logging`](#-gitlab--logging)
Expand Down Expand Up @@ -391,6 +392,14 @@ Hash of 'gitlab_pages' config parameters.

Default value: `undef`

##### <a name="-gitlab--gitlab_sshd"></a>`gitlab_sshd`

Data type: `Optional[Hash]`

Hash of 'gitlab_sshd' config parameters.

Default value: `undef`

##### <a name="-gitlab--gitlab_workhorse"></a>`gitlab_workhorse`

Data type: `Optional[Hash]`
Expand Down
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
# @param gitlab_kas Hash of 'gitlab_kas' config parameters.
# @param gitlab_pages Hash of 'gitlab_pages' config parameters.
# @param gitlab_rails Hash of 'gitlab_pages' config parameters.
# @param gitlab_sshd Hash of 'gitlab_sshd' config parameters.
# @param gitlab_workhorse Hash of 'gitlab_workhorse' config parameters.
# @param grafana Hash of 'grafana' config parameters.
# @param logging Hash of 'logging' config parameters.
Expand Down Expand Up @@ -132,6 +133,7 @@
Optional[Hash] $gitlab_kas = undef,
Optional[Hash] $gitlab_pages = undef,
Optional[Hash] $gitlab_rails = undef,
Optional[Hash] $gitlab_sshd = undef,
Optional[Hash] $grafana = undef,
Optional[Hash] $high_availability = undef,
Optional[Hash] $logging = undef,
Expand Down
1 change: 1 addition & 0 deletions manifests/omnibus_config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
$gitlab_kas = $gitlab::gitlab_kas
$gitlab_pages = $gitlab::gitlab_pages
$gitlab_rails = $gitlab::gitlab_rails
$gitlab_sshd = $gitlab::gitlab_sshd
$grafana = $gitlab::grafana
$high_availability = $gitlab::high_availability
$letsencrypt = $gitlab::letsencrypt
Expand Down
12 changes: 12 additions & 0 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,18 @@
with_content(%r{^\s*geo_logcursor\['enable'\] = true$})
}
end
describe 'gitlab_sshd' do
let(:params) do
{ gitlab_sshd: {
'enable' => true
} }
end

it {
is_expected.to contain_file('/etc/gitlab/gitlab.rb'). \
with_content(%r{^\s*gitlab_sshd\['enable'\] = true$})
}
end
end
end
end
Expand Down
9 changes: 9 additions & 0 deletions templates/gitlab.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ sidekiq_cluster['<%= k -%>'] = <%= decorate(@sidekiq_cluster[k]) %>
<%- @shell.keys.sort.each do |k| -%>
gitlab_shell['<%= k -%>'] = <%= decorate(@shell[k]) %>
<%- end end -%>
<%- if @gitlab_sshd -%>

###############
# gitlab-sshd #
###############

<%- @gitlab_sshd.keys.sort.each do |k| -%>
gitlab_sshd['<%= k -%>'] = <%= decorate(@gitlab_sshd[k]) %>
<%- end end -%>
<%- if @postgresql -%>

#####################
Expand Down