diff --git a/roles/bootstrap-os/tasks/bootstrap-opensuse.yml b/roles/bootstrap-os/tasks/bootstrap-opensuse.yml index 902720b41..54ce51242 100644 --- a/roles/bootstrap-os/tasks/bootstrap-opensuse.yml +++ b/roles/bootstrap-os/tasks/bootstrap-opensuse.yml @@ -1,6 +1,19 @@ --- # 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 lineinfile: path: /etc/sysconfig/proxy