baremetal: Add support for git http/https proxy setup

Change-Id: I8a3c4e3729361eed226d3b7d5acf7ea229d9b682
This commit is contained in:
yangjianfeng 2021-11-16 17:42:35 +08:00 committed by Radosław Piliszek
parent 5881a3e377
commit 09c276638c
2 changed files with 17 additions and 0 deletions

View File

@ -58,6 +58,9 @@ docker_http_proxy: ""
docker_https_proxy: ""
docker_no_proxy: ""
git_http_proxy: ""
git_https_proxy: ""
# Version of python used to execute Ansible modules.
host_python_version: "{{ ansible_facts.python.version.major }}.{{ ansible_facts.python.version.minor }}"

View File

@ -255,3 +255,17 @@
when:
- change_selinux | bool
- ansible_facts.os_family == "RedHat"
- name: Set https proxy for git
git_config:
name: https.proxy
scope: global
value: "{{ git_https_proxy }}"
when: git_https_proxy | length > 0
- name: Set http proxy for git
git_config:
name: http.proxy
scope: global
value: "{{ git_http_proxy }}"
when: git_http_proxy | length > 0