Skip to content

Commit

Permalink
Update config.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
malvads authored Jun 10, 2024
1 parent ded1a47 commit dd1b692
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions resources/providers/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,31 @@
end
end

action :add_s3 do # Only for configure solo
begin
s3_port = new_resource.s3_port

template '/etc/nginx/conf.d/s3.conf' do
source 's3.conf.erb'
owner user
group user
mode '0644'
cookbook 'nginx'
variables(s3_port: s3_port)
notifies :restart, 'service[nginx]'
end

service 'nginx' do
service_name 'nginx'
ignore_failure true
supports status: true, reload: true, restart: true, enable: true
action [:nothing]
end
rescue => e
Chef::Log.error(e.message)
end
end

action :add_erchef do
begin
erchef_port = new_resource.erchef_port
Expand Down

0 comments on commit dd1b692

Please sign in to comment.