We should update apt/yum cache when installing runner
When we deploy the runner, it happens that during the deployment the new packages are not available in apt cache and the deployment fail.
There's a bit of guess-work here, but I think that here we are not triggering chef apt_repository cache_rebuild because both unstable
and gitlab-runner
repos are already there.
I wasn't able to find some way of upgrading the cache in package
declaration so, maybe we should add an explicit execute
before package
:
execute "apt-get-update" do
command "apt-get update"
ignore_failure true
action :nothing
end
I'm not sure but I think that yum
can handle this check automatically on yum upgrade
.