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

FAILED! => {"changed": false, "msg": "apt cache update failed"} #4

Open
organicnz opened this issue Jul 25, 2020 · 0 comments
Open

Comments

@organicnz
Copy link

organicnz commented Jul 25, 2020

How would you fix this error with cache, mate?)
I've already added some vars to hosts file and main.yml.

# Example inventory that makes an alias for localhost that uses Python3
localhost-py3 ansible_host=localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3
 
# Example of setting a group of hosts to use Python3
[py3-hosts]
ubuntu18
 
[py3-hosts:vars]
ansible_python_interpreter=/usr/bin/python3
- name: Run apt upgrade
  apt:
    upgrade: "yes"
    update_cache: yes
    cache_valid_time: 432000
  async: 7200
  poll: 20
  notify: reboot

ansible-playbook provision.yml -l webservers -i hosts -u organic -vvv

TASK [mariadb : Install MariaDB repository] ************************************
fatal: [164.90.176.188]: FAILED! => {"changed": false, "msg": "apt cache update failed"}

<164.90.176.188> (0, b'', b'')
The full traceback is:
  File "/tmp/ansible_apt_repository_payload_60scw5rp/ansible_apt_repository_payload.zip/ansible/modules/packaging/os/apt_repository.py", line 548, in main
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 586, in update
    raise FetchFailedException(e)
fatal: [164.90.176.188]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "codename": null,
            "filename": null,
            "install_python_apt": true,
            "mode": null,
            "repo": "deb http://ftp.igh.cnrs.fr/pub/mariadb/repo/10.3/ubuntu trusty main",
            "state": "present",
            "update_cache": true,
            "validate_certs": true
        }
    },
    "msg": "apt cache update failed"
}

PLAY RECAP *********************************************************************
164.90.176.188             : ok=25   changed=1    unreachable=0    failed=1    skipped=2    rescued=0    ignored=0   
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

1 participant