itamae/cookbooks/prometheus-exporters/node_exporter_install.rb

21 lines
483 B
Ruby
Raw Normal View History

2024-06-10 02:54:39 +00:00
# Install:
directory node['node_exporter']['storage'] do
owner 'root'
group 'root'
mode '755'
end
2024-06-10 02:54:39 +00:00
execute "eget #{node['node_exporter']['url']} --to #{node['node_exporter']['storage']} --upgrade-only"
2024-06-10 02:54:39 +00:00
# Change Owner and Permissions:
file "#{node['node_exporter']['storage']}node_exporter" do
owner 'root'
group 'root'
mode '755'
end
2024-06-10 02:54:39 +00:00
# Create Link
link "#{node['node_exporter']['location']}node_exporter" do
to "#{node['node_exporter']['storage']}node_exporter"
end