Merge pull request #12 from paulfantom/more_cleanup

Variables cleanup & README colors
This commit is contained in:
Paweł Krupa 2018-06-25 15:54:07 +02:00 committed by GitHub
commit 78956bfbdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 68 additions and 73 deletions

View File

@ -1,75 +1,102 @@
Ansible Role: Minio
===================
<p><img src="https://avatars0.githubusercontent.com/u/695951?s=200&v=4" alt="minio logo" title="minio" align="right" height="60" /></p>
# Ansible Role: Minio
[![Build Status](https://travis-ci.org/atosatto/ansible-minio.svg?branch=master)](https://travis-ci.org/atosatto/ansible-minio)
[![License](https://img.shields.io/badge/license-MIT%20License-brightgreen.svg)](https://opensource.org/licenses/MIT)
[![Ansible Role](https://img.shields.io/badge/ansible%20role-atosatto.minio-blue.svg)](https://galaxy.ansible.com/atosatto/minio/)
[![GitHub tag](https://img.shields.io/github/tag/atosatto/ansible-minio.svg)](https://github.com/atosatto/ansible-minio/tags)
Install and configure the [Minio](https://minio.io/) S3 compatible object storage server
on RHEL/CentOS and Debian/Ubuntu.
Requirements
------------
## Requirements
None.
Role Variables
--------------
## Role Variables
Available variables are listed below, along with default values (see `defaults/main.yml`):
minio_server_bin: /usr/local/bin/minio
minio_client_bin: /usr/local/bin/mc
```yaml
minio_server_bin: /usr/local/bin/minio
minio_client_bin: /usr/local/bin/mc
```
Installation path of the Minio server and client binaries.
minio_user: minio
minio_group: minio
```yaml
minio_user: minio
minio_group: minio
```
Name and group of the user running the minio server.
**NB**: This role automatically creates the minio user and/or group if these does not exist in the system.
minio_server_envfile: /etc/default/minio
```yaml
minio_server_envfile: /etc/default/minio
```
Path to the file containing the minio server configuration ENV variables.
minio_server_addr: ":9091"
```yaml
minio_server_addr: ":9091"
```
The Minio server listen address.
minio_server_datadirs: [ ]
```yaml
minio_server_datadirs: [ ]
```
Directories of the folder containing the minio server data
**NB**: This variable must always be set by the role, otherwise the minio service will not start.
minio_server_opts: ""
```yaml
minio_server_make_datadirs: true
```
Create directories from `minio_server_datadirs`
```yaml
minio_server_opts: ""
```
Additional CLI options that must be appended to the minio server start command.
minio_access_key: ""
minio_secret_key: ""
```yaml
minio_access_key: ""
minio_secret_key: ""
```
Minio access and secret keys.
minio_install_server: false
minio_install_client: false
```yaml
minio_install_server: true
minio_install_client: true
```
Switches to disable minio server and/or minio client installation.
Dependencies
------------
## Dependencies
None.
Example Playbook
----------------
## Example Playbook
$ cat playbook.yml
- name: "Install Minio"
hosts: all
roles:
- { role: atosatto.minio,
minio_server_datadirs: [ "/tmp" ] }
```yaml
- name: "Install Minio"
hosts: all
roles:
- atosatto.minio
vars:
minio_server_datadirs: [ "/minio-test" ]
```
License
-------
## Changelog
See [changelog](CHANGELOG.md).
## License
MIT

View File

@ -1,7 +1,4 @@
---
- name: include os-specific variables
include_vars: "{{ ansible_os_family }}.yml"
- name: add the python sni support to legacy python installations
include: python_sni.yml
when:
@ -13,11 +10,13 @@
package:
name: "{{ item }}"
state: present
with_items: "{{ minio_ansible_support_packages }}"
with_items:
- ca-certificates
register: _install_packages
until: _install_packages is succeeded
retries: 5
delay: 2
when: ansible_os_family == 'Debian'
- name: create minio group
group:

View File

@ -1,23 +1,17 @@
---
- name: install python-pip
- name: install python-pip and SNI support packages
package:
name: "{{ item }}"
state: present
with_items: "{{ python_pip_packages }}"
register: _install_packages
until: _install_packages is succeeded
retries: 5
delay: 2
- name: install the Python SNI support packages
package:
name: "{{ item }}"
state: present
with_items: "{{ python_sni_support_packages }}"
register: _install_sni_packages
until: _install_sni_packages is succeeded
register: _install_python_packages
until: _install_python_packages is succeeded
retries: 5
delay: 2
with_items:
- python-pip
- python-dev
- libssl-dev
- libffi-dev
# There extra pip dependencies are needed to add SSL SNI support to
# Python version prior to 2.7.9. SNI support is needed by the Ansible

View File

@ -1,14 +0,0 @@
---
# packages providing python-pip
python_pip_packages:
- python-pip
# extra packages required to add SNI support to legacy python versions
python_sni_support_packages:
- python-dev
- libssl-dev
- libffi-dev
# extra packages needed by ansible to correctly configure the system
minio_ansible_support_packages:
- ca-certificates

View File

@ -1,11 +0,0 @@
---
# packages providing python-pip
python_pip_packages:
- epel-release
- python-pip
# extra packages required to add SNI support to legacy python versions
python_sni_support_packages: [ ]
# extra packages needed by ansible to correctly configure the system
minio_ansible_support_packages: [ ]