Skip to content

Commit

Permalink
Merge pull request #34 from alexsmithhp/manage_acc
Browse files Browse the repository at this point in the history
allow disabling of omnibus user management
  • Loading branch information
tobru committed Nov 6, 2015
2 parents f7b7162 + 9b55cc2 commit 3f6600e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
$high_availability = $::gitlab::high_availability
$logging = $::gitlab::logging
$logrotate = $::gitlab::logrotate
$manage_accounts = $::gitlab::manage_accounts
$mattermost = $::gitlab::mattermost
$mattermost_external_url = $::gitlab::mattermost_external_url
$mattermost_nginx = $::gitlab::mattermost_nginx
Expand Down
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
# Default: undef
# Hash of 'logrotate' config parameters.
#
# [*manage_accounts*]
# Default: undef
# Hash of 'manage_accounts' config parameters.
#
# [*mattermost_external_url*]
# Default: undef
# External URL of Mattermost.
Expand Down Expand Up @@ -213,6 +217,7 @@
$high_availability = undef,
$logging = undef,
$logrotate = undef,
$manage_accounts = undef,
$mattermost = undef,
$mattermost_external_url = undef,
$mattermost_nginx = undef,
Expand Down Expand Up @@ -266,6 +271,7 @@
if $user { validate_hash($user) }
if $web_server { validate_hash($web_server) }
if $high_availability { validate_hash($high_availability) }
if $manage_accounts { validate_hash($manage_accounts) }

class { '::gitlab::install': } ->
class { '::gitlab::config': } ~>
Expand Down
10 changes: 10 additions & 0 deletions templates/gitlab.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,13 @@ mattermost['<%= k -%>'] = <%= decorate(@mattermost[k]) %>
<%- @mattermost_nginx.keys.sort.each do |k| -%>
mattermost_nginx['<%= k -%>'] = <%= decorate(@mattermost_nginx[k]) %>
<%- end end -%>
<%- if @manage_accounts -%>

###################
# Manage Accounts #
###################
## see: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/configuration.md#disable-user-and-group-account-management

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

0 comments on commit 3f6600e

Please sign in to comment.