mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-04-14 06:29:32 -02:30
Fix work yum in Install packages requirements for bootstrap (#3630)
* Fix Failure talking to yum: Cannot find a valid baseurl for repo: base/7/x86_64 if Install packages in CentOS using proxy * Add proxy to /etc/yum.conf if http_proxy is defined
This commit is contained in:
committed by
k8s-ci-robot
parent
33f33a7358
commit
dfdf530723
@@ -14,6 +14,14 @@
|
|||||||
state: present
|
state: present
|
||||||
when: fastestmirror.stat.exists
|
when: fastestmirror.stat.exists
|
||||||
|
|
||||||
|
- name: Add proxy to /etc/yum.conf if http_proxy is defined
|
||||||
|
lineinfile:
|
||||||
|
path: "/etc/yum.conf"
|
||||||
|
line: "proxy={{http_proxy}}"
|
||||||
|
create: yes
|
||||||
|
state: present
|
||||||
|
when: http_proxy is defined
|
||||||
|
|
||||||
- name: Install packages requirements for bootstrap
|
- name: Install packages requirements for bootstrap
|
||||||
yum:
|
yum:
|
||||||
name: "{{ packages }}"
|
name: "{{ packages }}"
|
||||||
@@ -27,4 +35,3 @@
|
|||||||
yum:
|
yum:
|
||||||
name: python-pip
|
name: python-pip
|
||||||
state: present
|
state: present
|
||||||
environment: "{{proxy_env}}"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user