r/useproxy: Configure system-wide proxy
The *useproxy* role configures the `http_proxy` et al. environmet variables for systemd services and interactive shells. Additionally, it configures Yum repositories to use a single mirror via the `baseurl` setting, rather than a list of mirrors via `metalink`, since the proxy a) the proxy only allows access to _dl.fedoraproject.org_ and b) the proxy caches RPM files, but this is only effective if all clients use the same mirror all the time. The `useproxy.yml` playbook applies this role to servers in the *needproxy* group.
This commit is contained in:
10
group_vars/Fedora.yml
Normal file
10
group_vars/Fedora.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
useproxy_yum_repos:
|
||||
- file: fedora
|
||||
name: fedora
|
||||
baseurl: http://dl.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
|
||||
- file: fedora-cisco-openh264
|
||||
name: fedora-cisco-openh264
|
||||
baseurl: https://codecs.fedoraproject.org/openh264/$releasever/$basearch/os/
|
||||
- file: fedora-updates
|
||||
name: updates
|
||||
baseurl: http://dl.fedoraproject.org/pub/fedora/linux/updates/$releasever/Everything/$basearch/
|
||||
4
group_vars/needproxy.yml
Normal file
4
group_vars/needproxy.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
http_proxy: http://proxy.pyrocufflink.blue:3128
|
||||
https_proxy: '{{ http_proxy }}'
|
||||
all_proxy: '{{ http_proxy }}'
|
||||
no_proxy: localhost,pyrocufflink.blue,*.pyrocufflink.blue,127.0.0.1,172.30.0.*,172.30.0.0/24
|
||||
Reference in New Issue
Block a user