Я пытаюсь добавить репозиторий docker к источникам APT в Ubuntu 16.04, используя ansible сценарии:
- name: Add Docker Repository to APT sources
apt_repository:
repo: "{{ docker_apt_repository_details }}"
update_cache: yes
state: present
become: true
, где docker_apt_repository_details определяется как:
docker_apt_repository_details: deb https://apt.dockerproject.org/repo ubuntu-xenial main
Но, заметив следующую ошибку, обратите внимание, что в скриптах ansible никаких изменений не было, и месяц назад это работало нормально. Подскажите пожалуйста, как решить эту проблему?
module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_soFQp0/ansible_module_apt_repository.py\", line 556, in <module>\r\n main()\r\n File \"/tmp/ansible_soFQp0/ansible_module_apt_repository.py\", line 544, in main\r\n cache.update()\r\n File \"/usr/lib/python2.7/dist-packages/apt/cache.py\", line 522, in update\r\n raise FetchFailedException(e)\r\napt.cache.FetchFailedException: W:The repository 'https://apt.dockerproject.org/repo ubuntu-xenial Release' does not have a Release file., W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use., W:See apt-secure(8) manpage for repository creation and user configuration details., E:Failed to fetch https://apt.dockerproject.org/repo/dists/ubuntu-xenial/main/binary-amd64/Packages 404 Not Found, E:Some index files failed to download. They have been ignored, or old ones used instead.\r\n",
21:38:11 "msg": "MODULE FAILURE",
Вот наборы задач, которые использовались перед неудачной задачей:
- name: Install Python 2.7.12
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
- name: Install pip
apt:
name: python-pip
update_cache: yes
state: latest
become: true
become_method: sudo
- name: Update ubuntu image
apt:
update_cache: yes
become: true
- name: Ensure APT works with https method
apt:
name: "apt-transport-https"
update_cache: yes
state: latest
become: true
- name: Install CA certificates
apt:
name: "ca-certificates"
update_cache: yes
state: latest
become: true
- name: Add official Docker repository GPG key
apt_key:
keyserver: "{{ docker_apt_key_url }}"
id: "{{ docker_apt_key_id }}"
state: present
become: true
- name: Add Docker Repository to APT sources
apt_repository:
repo: "{{ docker_apt_repository_details }}"
update_cache: yes
state: present
become: true```