WIP
This commit is contained in:
24
roles/common/tasks/setup_proxy_client.yml
Normal file
24
roles/common/tasks/setup_proxy_client.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
- name: Create 00proxy.conf file
|
||||
ansible.builtin.template:
|
||||
src: "templates/apt_proxy.conf"
|
||||
dest: "/etc/apt/apt.conf.d/00proxy.conf"
|
||||
mode: "644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
|
||||
- name: Add http_proxy and https_proxy variable to file /etc/environment
|
||||
ansible.builtin.lineinfile:
|
||||
path: "/etc/environment"
|
||||
regexp: '^{{ item.key }}='
|
||||
line: '{{ item.key }}="{{ item.value }}"'
|
||||
create: true
|
||||
mode: "644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
with_items:
|
||||
- key: 'http_proxy'
|
||||
value: '{{ common_proxy_server }}'
|
||||
- key: 'https_proxy'
|
||||
value: '{{ common_proxy_server }}'
|
||||
- key: 'no_proxy'
|
||||
value: 'localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16'
|
||||
Reference in New Issue
Block a user