Ansible:没有适用于docker-ce的软件包 [英] Ansible: no package available for docker-ce
本文介绍了Ansible:没有适用于docker-ce的软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I want to install Docker on a remote machine with Ubuntu 16.04, using Ansible and following the official docs at https://docs.docker.com/engine/installation/linux/ubuntu/. All seems to work, until ansible reaches the task with name "install Docker", I get "No package matching 'docker-ce' is available".
从设置存储库的位置开始,剧本的以下部分:
The following part of the playbook, from the point where the repository is set:
- name: set the stable repository
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable
- name: Update all packages to the latest version
apt:
upgrade: dist
- name: install Docker
apt:
name: docker-ce
state: present
可能是什么问题?
推荐答案
或者如果Ansible版本> = 2.0,则可以使用通用OS软件包管理器模块:
Or you can use generic OS package manager module if Ansible version >= 2.0:
- name: install docker
package:
name: docker-ce
state: present
这篇关于Ansible:没有适用于docker-ce的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文