itamae/cookbooks/embulk/install.rb

31 lines
579 B
Ruby
Raw Normal View History

2019-03-03 08:50:49 +00:00
# Create installation directory:
directory node['embulk']['install_path'] do
owner 'root'
group 'root'
mode '755'
end
2021-06-19 11:13:50 +00:00
URL = "#{node['embulk']['base_binary_url']}#{node['embulk']['version']}/embulk-#{node['embulk']['version']}#{node['embulk']['extension']}"
2019-03-03 08:50:49 +00:00
TARGET = "#{node['embulk']['install_path']}/embulk"
# Download and install:
2021-06-19 11:13:50 +00:00
execute "wget #{URL} -O #{TARGET}"
2019-03-03 08:50:49 +00:00
file TARGET do
owner 'root'
group 'root'
mode '755'
end
# Create link:
link '/usr/local/bin/embulk' do
user 'root'
to TARGET
2021-06-19 11:14:07 +00:00
force true
2019-03-03 08:50:49 +00:00
end
package 'default-jre' do
action :install
end