Commit ee164d4a authored by Tugdual Saunier's avatar Tugdual Saunier

Force Blackfire repositories update on run

parent 6aa2ff2a
......@@ -15,16 +15,25 @@ when 'rhel', 'fedora'
gpgcheck false
sslverify true
sslcacert '/etc/pki/tls/certs/ca-bundle.crt'
action :create
action [:create, :makecache]
only_if { node['blackfire']['install_repository'] }
end
else
apt_repository 'blackfire' do
r = apt_repository 'blackfire' do
uri "#{node[cookbook_name]['repository']}/#{node['platform']}"
distribution 'any'
key 'https://packagecloud.io/gpg.key'
components ['main']
action :add
action :nothing
only_if { node['blackfire']['install_repository'] }
end
r.run_action(:add)
unless r.updated?
execute 'blackfire repository update' do
command "apt-get update -o Dir::Etc::sourcelist='sources.list.d/#{r.name}.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0'"
ignore_failure true
action :run
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment