Skip to content

Commit

Permalink
Allow the consul user to be setup as a system account
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarnett-zynga committed Jun 24, 2015
1 parent 5ba1751 commit 0ef0ea0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
default['consul']['service_user'] = 'root'
default['consul']['service_group'] = 'root'
end
default['consul']['system_account'] = false

default['consul']['ports'] = {
'dns' => 8600,
Expand Down
2 changes: 2 additions & 0 deletions recipes/_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
username consul_user
home '/dev/null'
shell '/bin/false'
system node['consul']['system_account']
comment 'consul service user'
end

Expand All @@ -46,6 +47,7 @@
not_if { consul_group == 'root' }
group_name consul_group
members consul_user
system node['consul']['system_account']
append true
end

Expand Down

0 comments on commit 0ef0ea0

Please sign in to comment.