我编写了 ansible playbook,用于在 Ubuntu 16.04 LTS 上安装 docker。运行 ansible playbook 时,出现 apt-get update 错误
我试过运行附加的剧本代码。
- hosts: docker
become: yes
become_user: root
tasks:
- name: apt-get update
shell: apt-get update -y
- name: Install packages to allow apt to use a repository overHTTPS
shell: sudo apt-get install -y \
apt-transport-https -y \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
- name: Add Docker’s official GPG key
shell: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- name: Use the following …Run Code Online (Sandbox Code Playgroud)