gantsign.gnome-proxy
Ansible Role: Gnome Proxy
This role sets up proxy settings for Gnome applications and other apps that use Gnome's proxy settings (like Google Chrome).
Requirements
Ansible version 2.9 or higher
- Note: Older Ansible versions may work but haven't been tested.
Linux Distribution
Debian Family
Ubuntu
- Bionic (18.04)
- Focal (20.04)
Note: Other versions may work but haven't been tested.
Role Variables
These variables can change how this role works (default values are shown below):
# The proxy mode (none, manual or auto)
gnome_proxy_mode:
# The URL of the proxy auto-config (PAC) file
gnome_proxy_autoconfig_url:
# List of hostnames / IP addresses to bypass the proxy
gnome_proxy_ignore_hosts:
# Use the same proxy for all protocols
gnome_proxy_use_same_proxy:
# The hostname / IP address for the HTTP proxy
gnome_proxy_http_host:
# The port for the HTTP proxy
gnome_proxy_http_port:
# Does the HTTP proxy require a username and password?
gnome_proxy_http_use_authentication:
# Username for the HTTP proxy
gnome_proxy_http_authentication_user:
# Password for the HTTP proxy
gnome_proxy_http_authentication_password:
# Is the HTTP proxy enabled?
gnome_proxy_http_enabled:
# The hostname / IP address for the HTTPS proxy
gnome_proxy_https_host:
# The port for the HTTPS proxy
gnome_proxy_https_port:
# The hostname / IP address for the FTP proxy
gnome_proxy_ftp_host:
# The port for the FTP proxy
gnome_proxy_ftp_port:
# The hostname / IP address for the SOCKS proxy
gnome_proxy_socks_host:
# The port for the SOCKS proxy
gnome_proxy_socks_port:
# Where the GLib schemas are located
gnome_proxy_glib_schemas_directory: '/usr/share/glib-2.0/schemas'
# Name of the file to override gnome_proxy settings
gnome_proxy_overide_filename: '20_ansible-proxy.gschema.override'
Example Playbooks
Auto-proxy
- hosts: servers
roles:
- role: gantsign.gnome-proxy
gnome_proxy_mode: 'auto'
gnome_proxy_autoconfig_url: 'http://wpad.example.com/wpad.dat' # URL for auto-proxy
Manual-proxy
- hosts: servers
roles:
- role: gantsign.gnome-proxy
gnome_proxy_mode: 'manual'
gnome_proxy_ignore_hosts:
- 'localhost'
- '127.0.0.0/8'
- '::1'
gnome_proxy_use_same_proxy: yes
gnome_proxy_http_host: 'proxy.example.com'
gnome_proxy_http_port: 3128
gnome_proxy_http_enabled: yes
More Roles From GantSign
Explore more roles from GantSign on Ansible Galaxy.
Development & Testing
This project uses Molecule for development and testing; the role is unit tested with Testinfra and pytest.
To develop or test, you'll need:
Since installation can be tricky, this project includes Molecule Wrapper, a script that installs Molecule and its dependencies (except Linux) and then runs Molecule with your command.
To test the role using Molecule Wrapper, run the following command from the project root:
./moleculew test
Note: Some dependencies may need sudo
permission to install.
License
MIT
Author Information
John Freeman
GantSign Ltd. Company No. 06109112 (registered in England)
Role for configuring the proxy settings for Gnome applications.
ansible-galaxy install gantsign.gnome-proxy