Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ch4 (cluster-local-vms) p79 - geerlingguy.docker role fails due to stale apt cache #94

Open
jim-whiteside opened this issue Mar 12, 2021 · 2 comments

Comments

@jim-whiteside
Copy link

jim-whiteside commented Mar 12, 2021

Failure at geerlingguy.docker : Ensure dependencies are installed.

Failed to fetch http://security.debian.org/debian-security/pool/updates/main/a/apt/apt-transport-https_1.8.2.1_all.deb 404 Not Found [IP: 151.101.62.132 80]\nE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

A similar issue was reported in geerlingguy/ansible-role-docker#118 - proposed solution was "controlling apt caches in the playbook that uses the role / outside the role."

So I add the following pre_task to main.yml:

  pre_tasks:
    - name: Run "update_cache=yes" if the last one is more than 3600 seconds ago
      apt:
        update_cache: yes
        cache_valid_time: 3600
@jim-whiteside jim-whiteside changed the title Ch4 p79 - geerlingguy.docker role fails due to stale apt cache Ch4 (cluster-local-vms) p79 - geerlingguy.docker role fails due to stale apt cache Mar 12, 2021
@geerlingguy
Copy link
Owner

@jim-whiteside - Indeed, it might be best to add that task (or something similar) to the main playbook here: https://github.com/geerlingguy/ansible-for-kubernetes/blob/master/cluster-local-vms/main.yml

I typically do that for all my playbooks, not sure why I missed that here.

adelerhof added a commit to adelerhof/ansible-for-kubernetes that referenced this issue Apr 4, 2021
@adelerhof adelerhof mentioned this issue Apr 4, 2021
@adelerhof
Copy link

See PR #98 , thanks @jim-whiteside !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants