на ubuntu 18.04 я запускаю эту роль ansible (версия 2.5.1):
---
- name: Add Docker apt repository key.
apt_key:
url: "https://download.docker.com/linux/ubuntu/gpg"
state: present
- name: gather facts
setup:
- name: Set the stable docker repository
apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
state: present
update_cache: yes
- name: Install Docker
apt:
name: docker-ce
state: present
С этим playbook:
---
- hosts: localhost
connection: local
gather_facts: False
become: true
pre_tasks:
- name: Install python for Ansible
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
tasks:
- name: Install list of packages
apt: name={{item}} state=latest
with_items:
- nano
- git
- htop
- gitg
roles:
- {role: 'docker', tags: 'docker'}
но я получаю следующую ошибку:
PLAY [localhost] *******************************************************************************************************************************
TASK [Install python for Ansible] **************************************************************************************************************
changed: [localhost]
TASK [docker : Add Docker apt repository key.] *************************************************************************************************
ok: [localhost]
TASK [docker : gather facts] *******************************************************************************************************************
ok: [localhost]
TASK [docker : Set the stable docker repository] ***********************************************************************************************
ok: [localhost]
TASK [docker : Install Docker] *****************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "No package matching 'docker-ce' is available"}
to retry, use: --limit @/home/user/repos/ansible-vps/src/ansible_create_workstation.retry
PLAY RECAP *************************************************************************************************************************************
localhost : ok=4 changed=1 unreachable=0 failed=1
так что по какой-то причине пакет docker-ce не может быть найден, он недавно изменился или что-то еще я делаю неправильно?
и когда я смотрю в: / etc/apt / sources.list не содержит:
deb [arch=amd64] https://download.docker.com/linux/ubuntu ...
запись.