2016-11-10 7 views

답변

0

당신과 같이, 작업 당 프록시를 설정할 수 있습니다

get_url: 
    url=http://remote.host.com/file 
    dest=/tmp/file 
http_proxy: http://proxy.example.com:8080 
0

당신은 당신의 플레이를위한 환경 변수를 정의하고 get_url에서 프록시 옵션을 설정할 수 있습니다. documentationuse_proxy 가입일

--- 
- hosts: all 

    environment: 
    http_proxy: http://127.0.0.1:1234 

    # You can also set it over https. 
    https_proxy: http://127.0.0.1:1234 

- name: Retrieve some repo 
    get_url: 
    url: https://repos.com/cool.repo 
    dest: /etc/yum.repos.d/cool.repo 
    use_proxy: yes 

하나가 대상 호스트에 환경 변수 정의되어 있어도 아니, 프록시를 사용하지 않는 [use_proxy로 설정]

경우.

위의 예에서 반대가됩니다.