Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Use a node attribute (default: true) to specify manage_home attribute of #461

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
default['logstash']['instance_default']['basedir'] = '/opt/logstash'
default['logstash']['instance_default']['user'] = 'logstash'
default['logstash']['instance_default']['group'] = 'logstash'
default['logstash']['instance_default']['user_opts'] = { homedir: '/var/lib/logstash', uid: nil, gid: nil }
default['logstash']['instance_default']['user_opts'] = { homedir: '/var/lib/logstash', manage_home: true, uid: nil, gid: nil }
default['logstash']['instance_default']['supervisor_gid'] = node['logstash']['instance_default']['group']
default['logstash']['instance_default']['pid_dir'] = '/var/run/logstash'
default['logstash']['instance_default']['create_account'] = true
Expand Down
3 changes: 2 additions & 1 deletion providers/instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def load_current_resource
home ls[:homedir]
system true
action :create
manage_home true
manage_home ls[:manage_home]
uid ls[:uid]
end
new_resource.updated_by_last_action(ur.updated_by_last_action?)
Expand Down Expand Up @@ -229,6 +229,7 @@ def logrotate(ls)
def ls_vars
ls = {
homedir: @useropts['homedir'],
manage_home: @useropts['manage_home'],
uid: @useropts['uid'],
gid: @useropts['gid'],
source_url: @source_url,
Expand Down