Skip to content

Commit

Permalink
Merge pull request #91 from gdowmont/disable-creating-folders
Browse files Browse the repository at this point in the history
Allow "Disable storage directories management"
  • Loading branch information
tobru authored Sep 16, 2016
2 parents 8c60208 + a576081 commit fdd82af
Show file tree
Hide file tree
Showing 3 changed files with 20 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 @@ -23,6 +23,7 @@
$high_availability = $::gitlab::high_availability
$logging = $::gitlab::logging
$logrotate = $::gitlab::logrotate
$manage_storage_directories = $::gitlab::manage_storage_directories
$manage_accounts = $::gitlab::manage_accounts
$mattermost = $::gitlab::mattermost
$mattermost_external_url = $::gitlab::mattermost_external_url
Expand Down
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@
# Default: undef
# Hash of 'logrotate' config parameters.
#
# [*manage_storage_directories*]
# Default: undef
# Hash of 'manage_storage_directories' config parameters.
#
# [*manage_accounts*]
# Default: undef
# Hash of 'manage_accounts' config parameters.
Expand Down Expand Up @@ -289,6 +293,7 @@
$high_availability = undef,
$logging = undef,
$logrotate = undef,
$manage_storage_directories = undef,
$manage_accounts = undef,
$mattermost = undef,
$mattermost_external_url = undef,
Expand Down Expand Up @@ -345,6 +350,7 @@
if $gitlab_rails { validate_hash($gitlab_rails) }
if $logging { validate_hash($logging) }
if $logrotate { validate_hash($logrotate) }
if $manage_storage_directories { validate_hash($manage_storage_directories) }
if $nginx { validate_hash($nginx) }
if $mattermost { validate_hash($mattermost) }
if $mattermost_external_url { validate_string($mattermost_external_url) }
Expand Down
13 changes: 13 additions & 0 deletions templates/gitlab.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,19 @@ logging['<%= k -%>'] = <%= decorate(@logging[k]) %>
<%- @logrotate.keys.sort.each do |k| -%>
logrotate['<%= k -%>'] = <%= decorate(@logrotate[k]) %>
<%- end end -%>
<%- if @manage_storage_directories -%>

#######################
# Storage directories #
#######################
## Disable managing storage directories
## Set only if the select directories are created manually
## See: http://doc.gitlab.com/omnibus/settings/configuration.html#disable-storage-directories-management
# manage_storage_directories['enable'] = false

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

#######
Expand Down

0 comments on commit fdd82af

Please sign in to comment.