mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 22:04:43 +03:00
Ensure /etc/sysconfig/proxy for openSUSE bootstrap (#5445)
The playbook that bootstrap openSUSE servers assumes that the /etc/sysconfig/proxy file exists but the execution fails when these file is not present. This change guarantees its existence.
This commit is contained in:
@@ -1,6 +1,19 @@
|
|||||||
---
|
---
|
||||||
# OpenSUSE ships with Python installed
|
# OpenSUSE ships with Python installed
|
||||||
|
|
||||||
|
- name: Check that /etc/sysconfig/proxy file exists
|
||||||
|
stat:
|
||||||
|
path: /etc/sysconfig/proxy
|
||||||
|
register: stat_result
|
||||||
|
|
||||||
|
- name: Create the /etc/sysconfig/proxy empty file
|
||||||
|
file:
|
||||||
|
path: /etc/sysconfig/proxy
|
||||||
|
state: touch
|
||||||
|
when:
|
||||||
|
- http_proxy is defined or https_proxy is defined
|
||||||
|
- not stat_result.stat.exists
|
||||||
|
|
||||||
- name: Set the http_proxy in /etc/sysconfig/proxy
|
- name: Set the http_proxy in /etc/sysconfig/proxy
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/sysconfig/proxy
|
path: /etc/sysconfig/proxy
|
||||||
|
|||||||
Reference in New Issue
Block a user