itamae/cookbooks/digdag/install.rb

34 lines
560 B
Ruby
Raw Normal View History

2019-03-03 08:50:49 +00:00
# Create installation directory:
directory node['digdag']['install_path'] do
owner 'root'
group 'root'
mode '755'
end
# Download and install:
URL = "#{node['digdag']['binary_url']}"
TARGET = "#{node['digdag']['install_path']}/digdag"
execute "wget #{URL} -O #{TARGET}" do
not_if "test -e #{TARGET}"
end
file TARGET do
owner 'root'
group 'root'
mode '755'
end
# Create link:
link '/usr/local/bin/digdag' do
user 'root'
to TARGET
end
# Install the Java Runtime:
%w(nkf default-jre).each do |p|
package p do
action :install
end
end