我不知道为什么当我运行我的appears在EC2上安装软件包--使用apt的实例--这会出现.[WARNING]: Updating cache and auto-installing missing dependency: python3-apt fatal: [localhost]: FAILED! => {"changed": false, "cmd": "apt-get update", "msg": "[Errno 2] No such file or directory: b'apt-get'", "rc": 2}
。
下面是我的ansible代码在ubuntu上安装软件包所做的工作。
- name: Install packages for jenkins-docker-worker
hosts:
- localhost
gather_facts: no
tasks:
- name: Install docker
apt:
name: docker
state: latest
- name: start docker
service:
name: docker
state: started
- name: Ensure group "docker" exists
group:
name: docker
state: present
发布于 2022-10-26 22:29:32
确保您没有针对Amazon 2实例,因为它使用yum
作为包管理器,而不是apt
。
https://askubuntu.com/questions/1289674
复制相似问题