Commit d4a71c0d0488109948d086ce88c406b6c5806cf0
1 parent
f26ef4c7
Exists in
master
and in
17 other branches
Small fixes in gitlab:users recipe
Consistently use the node['gitlab']['user']['group'] attribute. Add comments.
Showing
1 changed file
with
7 additions
and
4 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/recipes/users.rb
| ... | ... | @@ -17,21 +17,24 @@ |
| 17 | 17 | # |
| 18 | 18 | |
| 19 | 19 | gitlab_username = node['gitlab']['user']['username'] |
| 20 | +gitlab_group = node['gitlab']['user']['group'] | |
| 20 | 21 | gitlab_home = node['gitlab']['user']['home'] |
| 21 | 22 | |
| 22 | -group gitlab_username | |
| 23 | +# Create the group for the GitLab user | |
| 24 | +group gitlab_group | |
| 23 | 25 | |
| 24 | -# Create a user for Chef services to run as | |
| 26 | +# Create the GitLab user | |
| 25 | 27 | user gitlab_username do |
| 26 | 28 | shell node['gitlab']['user']['shell'] |
| 27 | 29 | home gitlab_home |
| 28 | - gid gitlab_username | |
| 30 | + gid gitlab_group | |
| 29 | 31 | end |
| 30 | 32 | |
| 33 | +# Configure Git settings for the GitLab user | |
| 31 | 34 | template File.join(gitlab_home, ".gitconfig") do |
| 32 | 35 | source "gitconfig.erb" |
| 33 | 36 | owner gitlab_username |
| 34 | - group node['gitlab']['user']['group'] | |
| 37 | + group gitlab_group | |
| 35 | 38 | mode "0644" |
| 36 | 39 | variables(node['gitlab']['user'].to_hash) |
| 37 | 40 | end | ... | ... |