proxy support for apt

This commit is contained in:
Paolo Asperti 2018-10-01 18:50:30 +02:00
parent 156a3b5c01
commit 3d6e6742fc
5 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,7 @@
---
- name: Set apt proxies
template:
src: 95proxies
dest: /etc/apt/apt.conf.d/95proxies
force: yes

View File

@ -10,3 +10,8 @@
tags:
- custom
- bglug
- include: apt-proxies.yml
tags:
- custom

View File

@ -0,0 +1,2 @@
Acquire::http::proxy "http://{{ ansible_local.domain.serverfqdn }}:3128/";
Acquire::https::proxy "http://{{ ansible_local.domain.serverfqdn }}:3128/";

View File

@ -8,6 +8,13 @@
backup: yes
register: cfg_glib_users
- name: Setting system proxy
template:
src: org.gnome.system.proxy.gschema.override
dest: /usr/share/glib-2.0/schemas/org.gnome.system.proxy.gschema.override
backup: yes
register: cfg_glib_proxy
- name: Visualizing mounted drives on desktop
copy:
src: org.gnome.nautilus.desktop.gschema.override
@ -24,4 +31,5 @@
- name: Recompiling glib2 schemas
shell: glib-compile-schemas --strict /usr/share/glib-2.0/schemas/
when: cfg_glib_users|changed or cfg_glib_mounted|changed or cfg_keyb_layout|changed
sudo: yes
when: cfg_glib_proxy|changed or cfg_glib_users|changed or cfg_glib_mounted|changed or cfg_keyb_layout|changed

View File

@ -0,0 +1,8 @@
[org.gnome.system.proxy]
mode='manual'
[org.gnome.system.proxy.http]
host='{{ ansible_local.domain.serverfqdn }}'
port=3128
[org.gnome.system.proxy.https]
host='{{ ansible_local.domain.serverfqdn }}'
port=3128