An ansible role to setup the proxy environment in shell environment ( /etc/profile & /etc/csh_cshrc ) and the package manager. The following package managers are supported:
- apt
- pacman
- pkgng
- Suse (on Suse /etc/sysconfig/proxy is configured)
- yum
None
- proxy:
- env: false (default) / text / absent. The proxy variable.
- no_proxy: false (default) / text / absent The no_proxy variable.
- protocols: Array with the protocols to configure. Defaults ( - http, - https, - ftp )
- etc_profile_proxy: false / {{ proxy.env }} (default) / absent.
- etc_profile_no_proxy: false / {{ proxy.no_proxy }} (default) / absent.
- etc_csh_cshrc_proxy: false / {{ proxy.env }} (default) / absent.
- etc_csh_cshrc_no_proxy: false / {{ proxy.no_proxy }} (default) / absent.
- pkg_mgr_proxy: false / {{ proxy.env }} (default) / absent.
Proxy setting variables;
- false or undef: The no_proxy/proxy environment are not altered.
- text: The no_proxy/proxy environment are updated to text.
- absent: The no_proxy/proxy environment is removed
None
- name: setup proxy on internal hosts
hosts: all:!dmz:!k8s
become: true
vars:
proxy:
env: "http://proxy:3128"
roles:
- stafwag.proxy_env
- name: setup proxy on k8s hosts
hosts: k8s
become: true
vars:
proxy:
env: absent
no_proxy: absent
pkg_mgr_proxy: http://proxy:3128
roles:
- stafwag.proxy_env
- name: setup proxy
hosts: all
become: true
vars:
proxy:
env: absent
roles:
- stafwag.proxy_env
MIT/BSD
Created by Staf Wagemakers, email: [email protected], website: http://www.wagemakers.be.