<commit_before># Ansible roles

This library ships several ansible roles for deployment of python applications.
To use these roles, add the ``git-agile/ansible/roles`` path to the ``roles_path``
in the ``ansible.cfg`` file.
```
[defaults]
roles_path  = ../../git-agile/ansible/roles
```
## Pyserver Role

Install packages needed to build python using [pyenv](https://github.com/yyuu/pyenv).
Some of the code was taken from [ansible-galaxy-pyenv](https://github.com/avanov/ansible-galaxy-pyenv)
and subsequently modified.

## Grant github user Role

Grant a developer the admin rights on a machine by installing the developer
public keys from github.
Github public keys are available for a given developer at https://github.com/qmboot.keys
for example.

The plybook works only if the selected user actually has some public keys on
github.

To add a key on your github account simply generate one:
```
ssh-keygen -t rsa -b 4096 -C "<EMAIL>"
```


## Nginx Role

Install and configure nginx. The key variable is the list of ``nginx_domains``
to install in the server. This list contains objects of the form
```yml
{
    name: "mydomain.com",
    certificate: "certificate/location",
    websocket: true,
    host: "local.domain",
    port: "5050"
}
```

## Redis Role

Install and configure redis (ubuntu 15+ only)


## Lux Role

This role is a template for deploying a [lux](https://github.com/quantmind/lux) powered web servers.
The role install the server software from a **github_repository**.

<commit_msg>Update ansible.md<commit_after># Ansible roles

This library ships several ansible roles for deployment of python applications from github repositories.
To use these roles, add the ``git-agile/ansible/roles`` path to the ``roles_path``
in the ``ansible.cfg`` file.
```
[defaults]
roles_path  = ../../git-agile/ansible/roles
```
## Common Role

This role is required by all roles inlcluded in this library.

It defines a series of variables shared across roles and nothing else.

#### python_version

The version of python to use for serving applications

**default**: 3.5.1


## Pyserver Role

Install packages needed to build python using [pyenv](https://github.com/yyuu/pyenv).
Some of the code was taken from [ansible-galaxy-pyenv](https://github.com/avanov/ansible-galaxy-pyenv)
and subsequently modified.

## Grant github user Role

Grant a developer the admin rights on a machine by installing the developer
public keys from github.
Github public keys are available for a given developer at https://github.com/qmboot.keys
for example.

The plybook works only if the selected user actually has some public keys on
github.

To add a key on your github account simply generate one:
```
ssh-keygen -t rsa -b 4096 -C "<EMAIL>"
```


## Nginx Role

Install and configure nginx. The key variable is the list of ``nginx_domains``
to install in the server. This list contains objects of the form
```yml
{
    name: "mydomain.com",
    certificate: "certificate/location",
    websocket: true,
    host: "local.domain",
    port: "5050"
}
```

## Redis Role

Install and configure redis (ubuntu 15+ only)


## Lux Role

This role is a template for deploying a [lux](https://github.com/quantmind/lux) powered web servers.
The role install the server software from a **github_repository**.

#### command

The command to run, one of **install**, **create_supersuer**, **stop**

**default*: install


#### Additional variables
A list of additional variables, name (default value), for twicking installation. These variables should be overwritten in the ``vars`` directory of the ``inventories`` role in your application roles.

* ``install_npm`` (``false``) install node dependencies from ``package.json``
{'fraction_non_alphanumeric': 0.10283400809716599, 'fraction_numerical': 0.006207827260458839, 'mean_word_length': 4.286733238231099, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5954974', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1049, 'n_words': 468}