-
Notifications
You must be signed in to change notification settings - Fork 1
/
pittitproxy.yml
76 lines (67 loc) · 1.73 KB
/
pittitproxy.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
- name: Set proxy server when in DHCP zone
remote_user: ulsprovision
hosts: all
become: yes
tasks:
- name: Include enviroment settings
include_vars:
file: resources/pittproxyserver/environment.yml
name: pittitproxy
- name: Set ftp_proxy profile.d file
lineinfile:
regexp: "export ftp_proxy"
line: "export {{pittitproxy.ftp}}"
create: yes
mode: 0644
owner: root
group: root
dest: /etc/profile.d/ftp_proxy.sh
when:
- "'dev_test_build' in group_names"
- name: Set http_proxy profile.d file
lineinfile:
regexp: "export http_proxy"
line: "export {{pittitproxy.http}}"
create: yes
mode: 0644
owner: root
group: root
dest: /etc/profile.d/http_proxy.sh
when:
- "'dev_test_build' in group_names"
- name: Set https_proxy profile.d file
lineinfile:
regexp: "export https_proxy"
line: "export {{pittitproxy.https}}"
create: yes
mode: 0644
owner: root
group: root
dest: /etc/profile.d/https_proxy.sh
when:
- "'dev_test_build' in group_names"
- name: Set no_proxy profile.d file
lineinfile:
regexp: "export no_proxy"
line: "export {{pittitproxy.no_proxy}}"
create: yes
mode: 0644
owner: root
group: root
dest: /etc/profile.d/no_proxy.sh
when:
- "'dev_test_build' in group_names"
- name: Set environment file
lineinfile:
line: "export {{item}}"
create: yes
mode: 0644
owner: root
group: root
dest: /etc/environment
loop:
- "{{pittitproxy.http}}"
- "{{pittitproxy.https}}"
- "{{pittitproxy.no_proxy}}"
when:
- "'dev_test_build' in group_names"