itamae/cookbooks/base/cloudflared.rb

20 lines
352 B
Ruby
Raw Permalink Normal View History

2023-12-16 07:18:59 +00:00
URL='https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64'
BINARY='/usr/local/bin/cloudflared'
[
"wget #{URL} -O #{BINARY}",
].each do |cmd|
execute cmd do
user 'root'
cwd '/tmp/itamae_tmp/'
not_if "test -e #{BINARY}"
end
end
file "#{BINARY}" do
owner 'root'
group 'root'
mode '755'
end