2018-04-26 17:52:06 +08:00
|
|
|
---
|
2019-04-24 06:46:02 +08:00
|
|
|
# OpenSUSE ships with Python installed
|
2019-04-09 15:17:05 +08:00
|
|
|
|
2019-05-03 03:28:22 +08:00
|
|
|
- name: Set the http_proxy in /etc/sysconfig/proxy
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/sysconfig/proxy
|
|
|
|
regexp: '^HTTP_PROXY='
|
|
|
|
line: 'HTTP_PROXY="{{ http_proxy }}"'
|
|
|
|
become: true
|
|
|
|
when:
|
|
|
|
- http_proxy is defined
|
|
|
|
|
|
|
|
- name: Set the https_proxy in /etc/sysconfig/proxy
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/sysconfig/proxy
|
|
|
|
regexp: '^HTTPS_PROXY='
|
|
|
|
line: 'HTTPS_PROXY="{{ https_proxy }}"'
|
|
|
|
become: true
|
|
|
|
when:
|
|
|
|
- https_proxy is defined
|
|
|
|
|
|
|
|
- name: Enable proxies
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/sysconfig/proxy
|
|
|
|
regexp: '^PROXY_ENABLED='
|
|
|
|
line: 'PROXY_ENABLED="yes"'
|
|
|
|
become: true
|
|
|
|
when:
|
|
|
|
- http_proxy is defined or https_proxy is defined
|
|
|
|
|
2020-04-08 22:37:44 +08:00
|
|
|
# Required for zypper module
|
|
|
|
- name: Install python-xml
|
|
|
|
shell: zypper refresh && zypper --non-interactive install python-xml
|
|
|
|
changed_when: false
|
|
|
|
become: true
|
|
|
|
tags:
|
|
|
|
- facts
|
|
|
|
|
2019-04-24 06:46:02 +08:00
|
|
|
# Without this package, the get_url module fails when trying to handle https
|
|
|
|
- name: Install python-cryptography
|
|
|
|
zypper:
|
|
|
|
name: python-cryptography
|
2018-04-26 17:52:06 +08:00
|
|
|
state: present
|
2019-04-24 06:46:02 +08:00
|
|
|
update_cache: true
|
2019-02-12 06:04:27 +08:00
|
|
|
become: true
|