https://github.com/shalomb/ansible-bootstrap-http-proxy
Role to setup HTTP_PROXY and related environmental variables
https://github.com/shalomb/ansible-bootstrap-http-proxy
ansible ansible-role bootstrap http-proxy proxy raw
Last synced: 3 months ago
JSON representation
Role to setup HTTP_PROXY and related environmental variables
- Host: GitHub
- URL: https://github.com/shalomb/ansible-bootstrap-http-proxy
- Owner: shalomb
- Created: 2018-02-17T17:46:45.000Z (over 8 years ago)
- Default Branch: develop
- Last Pushed: 2021-03-25T10:04:46.000Z (over 5 years ago)
- Last Synced: 2025-01-10T14:52:52.689Z (over 1 year ago)
- Topics: ansible, ansible-role, bootstrap, http-proxy, proxy, raw
- Language: Shell
- Size: 99.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
ansible-bootstrap-http-proxy
============================
- [`master`](https://github.com/shalomb/ansible-bootstrap-http-proxy/tree/master) [](https://travis-ci.org/shalomb/ansible-bootstrap-http-proxy/branches)
- [`develop`](https://github.com/shalomb/ansible-bootstrap-http-proxy/tree/develop) [](https://travis-ci.org/shalomb/ansible-bootstrap-http-proxy/branches)
Ansible role to configure the following HTTP/HTTPS/FTP proxy
environment variables in `/etc/environment` using shell commands and
the `raw:` module. This is needed on targets behind a proxy that
require this configuration to complete the bootstrap of
python2.x
- `HTTP_PROXY` and `http_proxy`
- `HTTPS_PROXY` and `https_proxy`
- `FTP_PROXY` and `ftp_proxy`
- `NO_PROXY` and `no_proxy`
Both upper-case and lower-case variables are set even if either variant
is provided.
Requirements
------------
The targets are linux systems and environment variables can be set
in `/etc/environment`
Role Variables
--------------
Role Inputs
-----------
- `HTTP_PROXY`
- `http_proxy`
- `HTTPS_PROXY`
- `https_proxy`
- `FTP_PROXY`
- `ftp_proxy`
- `NO_PROXY`
- `no_proxy`
Dependencies
------------
The following shell utilities (which are typically available on most
GNU/Linux systems) are utilized by the role.
- `cat(1)` from [GNU Coreutils](https://www.gnu.org/software/coreutils/coreutils.html)
- `echo(1)` from [GNU Coreutils](https://www.gnu.org/software/coreutils/coreutils.html)
- `grep(1)`
- `sed(1)`
- `tee(1)` from [GNU Coreutils](https://www.gnu.org/software/coreutils/coreutils.html)
Example Playbook
----------------
All the relevant proxy environment variables (`HTTPS?_PROXY`, `FTPS?_PROXY` and
their lower-case equivalents) are configured even though only
`http_proxy` is provided.
- name: Configure http/https/ftp proxy environment variables
hosts: all
any_errors_fatal: True
gather_facts: no
roles:
- name: ansible-bootstrap-http-proxy
http_proxy: 'http://proxy.example.org:9091'
tags:
- http-proxy