代码之家  ›  专栏  ›  技术社区  ›  kohi

ansible 2.3.2中出错-不支持的代理方案:https

  •  0
  • kohi  · 技术社区  · 8 年前

    我遇到错误:

     Unsupported proxy scheme: https. Currently ansible only supports HTTP proxies
    

    在ansible v2.3.2上运行ansible playbook时,但在ansible v1.9.4上运行的情况相同:

    environment:
      http_proxy: "http://{{ address }}:{{ port }}"
      https_proxy: "https://{{ address }}:{{ port }}"
    

    ansible模块是否有任何变化,或者如何修复?

    3 回复  |  直到 8 年前
        1
  •  3
  •   Yassine Fadhlaoui    7 年前

    这个问题也出现在 ansible 2.7.1

    为了避免这个问题,您可以设置 validate_certs: false

    下面是一个示例:

    environment:
      http_proxy: http://IP:PORT
      https_proxy: https://IP:PORT
    

    在get\u url或apt任务中添加 validate\u certs:false

    get_url:
          url: url
          dest: "{{ dest }}"
          validate_certs: false
    
        2
  •  2
  •   kohi    8 年前

    我排除了故障,发现如果我们设置HTTPS\u代理来代替http\u代理,很奇怪,但它的工作和包正在安装。

     HTTPS_PROXY: "https://{{ address }}:{{ port }}"
    
        3
  •  0
  •   Eugene Knoxville    6 年前

    validate_certs: false

    get_url:
      url: url
      dest: "{{ dest }}"
      validate_certs: false
    

    HTTPS_PROXY: "https://{{ address }}:{{ port }}"