<commit_before># Ansible Fabio

Master: [![Build Status](https://travis-ci.org/lobsterdore/ansible-fabio.svg?branch=master)](https://travis-ci.org/lobsterdore/ansible-fabio)
Develop: [![Build Status](https://travis-ci.org/lobsterdore/ansible-fabio.svg?branch=develop)](https://travis-ci.org/lobsterdore/ansible-fabio)

* [To install](#to-install)
* [How to use](#how-to-use)
* [Tags](#tags)
* [Development](#development)
* [Contributing](#contributing)

Installs and configures [Fabio](https://github.com/eBay/fabio).




## To install

The easiest installation method is via Ansible Galaxy:

```BASH
ansible-galaxy install lobsterdore.fabio
```

In requirements file:

```BASH
---
# requirements.yml

- src: lobsterdore.fabio
  version: v1.0.0

```

To see available versions please check this roles [Ansible Galaxy page](https://galaxy.ansible.com/lobsterdore/fabio/).




## How to use

This role will install Fabio as a system service, the installation process can be from src
or from a release binary. Once installed this role will write out a properties file for Fabio
and ensure that the service is started.

### Installing Fabio from src

The default installation method is from src with Go 1.7.4 by default, if you wish to
install using a different version of Go then you can update the following vars:

```YAML
---

fabio_go_checksum: "47fda42e46b4c3ec93fa5d4d4cc6a748aa3f9411a2a2b7e08e3a6d80d753ec8b"
fabio_go_version: 1.7.4

```

### Installing a Fabio binary

This will download a pre-compiled version of Fabio from the projects Github repository:

```YAML
fabio_install_from_source: false
fabio_version: 1.3.4
```

### Configuring Fabio

To configure Fabio you can use the following variables:

```YAML
---

# Set Fabio's port
fabio_properties_port: 443
# Set arbitrary config options
fabio_properties_additional:
  proxy.keepalivetimeout: "2s"
  proxy.dialtimeout: "30s"
  proxy.maxconn: "5000"

```

The hash ```fabio_properties_additional``` can be used to set any property in Fabio's
[fabio.properties](https://raw.githubusercontent.com/eBay/fabio/master/fabio.properties) file,
keys and values will end up in the form:<commit_msg>[GITHUB-21] Update readme for bin install<commit_after># Ansible Fabio

Master: [![Build Status](https://travis-ci.org/lobsterdore/ansible-fabio.svg?branch=master)](https://travis-ci.org/lobsterdore/ansible-fabio)
Develop: [![Build Status](https://travis-ci.org/lobsterdore/ansible-fabio.svg?branch=develop)](https://travis-ci.org/lobsterdore/ansible-fabio)

* [To install](#to-install)
* [How to use](#how-to-use)
* [Tags](#tags)
* [Development](#development)
* [Contributing](#contributing)

Installs and configures [Fabio](https://github.com/eBay/fabio).




## To install

The easiest installation method is via Ansible Galaxy:

```BASH
ansible-galaxy install lobsterdore.fabio
```

In requirements file:

```BASH
---
# requirements.yml

- src: lobsterdore.fabio
  version: v1.0.0

```

To see available versions please check this roles [Ansible Galaxy page](https://galaxy.ansible.com/lobsterdore/fabio/).




## How to use

This role will install Fabio as a system service, the installation process can be from src
or from a release binary. Once installed this role will write out a properties file for Fabio
and ensure that the service is started.

### Installing a Fabio binary

By default this role will download a pre-compiled version of Fabio from the projects Github repository,
you can change the version installed via the fabio_version var:

```YAML
fabio_version: 1.4.2
```

### Installing Fabio from src

This installation method will install from src with Go 1.8.1, if you wish to
install using a different version of Go then you can update the following vars:

```YAML
---

fabio_go_checksum: "47fda42e46b4c3ec93fa5d4d4cc6a748aa3f9411a2a2b7e08e3a6d80d753ec8b"
fabio_go_version: 1.7.4
fabio_install_from_source: false

```


### Configuring Fabio

To configure Fabio you can use the following variables:

```YAML
---

# Set Fabio's port
fabio_properties_port: 443
# Set arbitrary config options
fabio_properties_additional:
  proxy.keepalivetimeout: "2s"
  proxy.dialtimeout: "30s"
  proxy.maxconn: "5000"

```

The hash ```fabio_properties_additional``` can be used to set any property in Fabio's
[fabio.properties](https://raw.githubusercontent.com/eBay/fabio/master/fabio.properties) file,
keys and values will end up in the form:
{'fraction_non_alphanumeric': 0.1118436008183678, 'fraction_numerical': 0.02636962946124119, 'mean_word_length': 5.002728512960436, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5656901', 'n_tokens_mistral': 1601, 'n_tokens_neox': 1477, 'n_words': 435}