https://github.com/monolithprojects/ansible-http_proxy_client
This Ansible role will setup HTTP/HTTPS/FTP Proxy client.
https://github.com/monolithprojects/ansible-http_proxy_client
apt client ftp http https proxy proxy-client
Last synced: 5 months ago
JSON representation
This Ansible role will setup HTTP/HTTPS/FTP Proxy client.
- Host: GitHub
- URL: https://github.com/monolithprojects/ansible-http_proxy_client
- Owner: MonolithProjects
- License: mit
- Created: 2020-09-17T13:52:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-11T17:55:45.000Z (about 5 years ago)
- Last Synced: 2025-03-16T20:21:27.354Z (10 months ago)
- Topics: apt, client, ftp, http, https, proxy, proxy-client
- Homepage: https://galaxy.ansible.com/monolithprojects/http_proxy_client
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Proxy client setup (Ansible Role)
[](https://galaxy.ansible.com/monolithprojects/http_proxy_client)
[](https://galaxy.ansible.com/monolithprojects/http_proxy_client)
[](https://galaxy.ansible.com/monolithprojects/http_proxy_client)
[](https://github.com/MonolithProjects/ansible-http_proxy_client/actions)
[](https://github.com/MonolithProjects/ansible-http_proxy_client/blob/master/LICENSE)
This Ansible role will setup HTTP/HTTPS/FTP Proxy client in the Linux system (/etc/environment), Advanced Package Tool (APT) and Docker service.
**Note:** This Ansible role can run eather befor or after the Docker service is installed.
## Requirements
* Role works on most Linux distributions
* Weekly tested on:
* CentOS/RHEL 7,8
* Debian 9,10
* Fedora 31,32
* Ubuntu 16,18,20
* Root privilegies
* Ansible 2.6+.
## Role Variables
This is a copy from `defaults/main.yml`
```yaml
# Set the Proxy server address value (i.e. http://1.2.3.4:3128)
# Addresses excluded from the traffic via Proxy
no_proxy: "localhost,127.0.0.1"
# Proxy server address for HTTP traffic
# http_proxy:
# Proxy server address for HTTPS traffic
# https_proxy:
# Proxy server address for FTP traffic
# ftp_proxy:
# Exclude environment settings from the setup
exclude_env: no
# Exclude apt from the setup
exclude_apt: no
# Exclude Docker services from the setup
exclude_docker: no
# Exclude Git (global) from the setup
exclude_git: no
```
## Example Playbook
In this example the Ansible role will setup HTTP Proxy in the system environment, Docker, Giy and exclude APT proxy setup.
```yaml
---
- name: Setup Proxy
hosts: all
user: ansible
become: yes
vars:
- http_proxy: http://1.2.3.4:567
- exclude_apt: yes
roles:
- role: monolithprojects.http_proxy_client
```
In this example the Ansible role will setup HTTP/HTTPS/FTP Proxy in the system environment, in APT, Docker service and Git.
```yaml
---
---
- name: Setup Proxy
hosts: all
user: ansible
become: yes
vars:
- http_proxy: http://1.2.3.4:567
- https_proxy: http://1.2.3.4:567
- ftp_proxy: http://1.2.3.4:567
roles:
- role: monolithprojects.http_proxy_client
```
## License
MIT
## Author Information
Created in 2020 by Michal Muransky