小编CH *_*MAR的帖子

使用 Ansible playbook 在 ubuntu 16.04 上获取更新错误

我编写了 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)

ansible docker ubuntu-16.04

2
推荐指数
1
解决办法
4981
查看次数

标签 统计

ansible ×1

docker ×1

ubuntu-16.04 ×1