Git Product home page Git Product logo

ansible-proxy's Introduction

stone-payments.proxy

Role for Ansible which configures the proxy client parameters in GNU/Linux and Windows systems.

Usage

Just include the role and set the variables in the defaults/main.yml file:

- name: configure proxy client
  hosts: all
  roles:
    - stone-payments.proxy
  vars:
    proxy_address: "some.server.example.com"
    proxy_port: "3128"

Advanced usage

You may also setup another proxy protocol than HTTP (SOCKS or SOCKS5, maybe) and setup authentication by using the following vars:

proxy_proto: "http" #may be http, socks or socks5
proxy_address: ""
proxy_port: ""
proxy_auth: false
proxy_user: ""
proxy_pass: ""
proxy_whitelist:
  - "127.0.0.1"
  - "localhost"

If you're going to use authentication, you need both to inform the user/pass and enable it by setting proxy_auth to true.

You may also pass a list in proxy_whitelist with names or IPs that you do not want to use the proxy and access directly.

Testing

This role implements unit tests with Molecule on Vagrant for Windows tests. Notice that we only support Molecule 2.0 or greater. You can install Molecule inside a virtual environment with the following command:

virtualenv .venv
.venv/bin/activate
pip install molecule

You can install Vagrant with your distro package-manager (out of scope), but you will also need some plugins to interact with Windows trough the WinRM interface:

vagrant plugin install winrm{,-fs,-elevated}

After having Molecule setup within the virtualenv, you can run the tests with:

molecule converge [-s scenario_name]

Where scenario_name is the name of a test case under molecule.

Contributing

Just open a PR. We love PRs!

License

This code is licensed under the MIT license.

ansible-proxy's People

Contributors

bcdonadio avatar renatocmaia avatar raphaelcardoso avatar iblackman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.