Ansible剧本模块get_url

问题描述

运行我的剧本以检索URL时,出现以下错误

fatal: [srwdvkubnode1]: Failed! => {"changed": false,"dest": "/etc/yum.repos.d/docker-ce.repo","elapsed": 0,"msg": "Request Failed: <urlopen error [Errno -2] Nom ou service inconnu>","url": "https://download.docker.com/linux/centos/docker-ce.repo"}
fatal: [srwdvkubnode2]: Failed! => {"changed": false,"url": "https://download.docker.com/linux/centos/docker-ce.repo"}

它是法语,但这意味着:未知名称或服务!
我不明白为什么。
这是我的剧本:

---
- name: Install docker
  hosts: docker

  tasks:
    - name: Add Docker repo
      get_url:
        url: https://download.docker.com/linux/centos/docker-ce.repo
        dest: /etc/yum.repos.d/docker-ce.repo
      become: yes

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)