-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathmain.yml
60 lines (55 loc) · 1.15 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
- name: unset https proxy for apt
file:
path: "{{ item }}"
state: absent
with_items:
- /etc/apt/apt.conf.d/00proxy
- /etc/apt/apt.conf.d/01proxy
- /etc/apt/apt.conf.d/50proxy
- /etc/apt/apt.conf.d/99proxy
- /etc/apt/apt.conf.d/90curtin-aptproxy
- /etc/apt/apt.conf.d/proxy.conf
- /usr/lib/environment.d/99-environment.conf
- name: do we have wget?
stat:
path: /etc/wgetrc
register: st
- name: unset proxy for wget
lineinfile:
path: /etc/wgetrc
state: absent
regexp: "^{{ item }} *=.*$"
with_items:
- "http_proxy"
- "https_proxy"
- "ftp_proxy"
- "no_proxy"
- "HTTP_PROXY"
- "HTTPS_PROXY"
- "FTP_PROXY"
- "NO_PROXY"
when: st.stat.exists
- name: do we have pip?
stat:
path: /etc/pip.conf
register: st
- name: unset proxy for pip
ini_file:
path: /etc/pip.conf
section: global
option: proxy
state: absent
- name: unset proxy for the shell
lineinfile:
path: /etc/environment
state: absent
regexp: "^{{ item }}=.*$"
with_items:
- "http_proxy"
- "https_proxy"
- "ftp_proxy"
- "no_proxy"
- "HTTP_PROXY"
- "HTTPS_PROXY"
- "FTP_PROXY"
- "NO_PROXY"