Add readme

pull/6/head
Emilien Mantel 2015-07-13 15:22:42 +02:00
parent 1da1c01446
commit 32bca3d780
2 changed files with 44 additions and 76 deletions

View File

@ -1,38 +1,71 @@
Role Name
=========
MySQL vendors for Debian Ansible role
======================================
A brief description of the role goes here.
Install and configure MySQL or MariaDB or Percona Server. Create users and databases.
IMPORTANT: due to this [bug](https://mariadb.atlassian.net/browse/MDEV-8457), MariaDB don't work on Debian Jessie.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
None.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
- `mysql_origin`: origin of the package ("default", "mariadb", "percona")
- `mysql_vendor`: "mysql", "mariadb" or "percona"
### Configuration
- mysql\_cnf: key/value hash see [defaults/main.yml](default vars file)
- `mysql_root_password`: root password (should be protected with [vault](http://docs.ansible.com/playbooks_vault.html))
### Databases
- `mysql_databases`: list...
### Users
Example:
```
mysql\_users:
- name: 'kiki'
password: '123'
priv: hihi.*:ALL
```
Check "priv" syntax in [http://docs.ansible.com/mysql_user_module.html](mysql_user module documentation)
### Packaging
- `mariadb_version`: 5.5 (Debian Wheezy only) or 10.0
- `mariadb_repository`: MariaDB upstream APT repository (see: [http://mariadb.org/mariadb/repositories/](MariaDB repositories tool))
- `percona_version`: Percona version 5.5 or 5.6
- `percona_repository`: Percona upstream APT repository (see: [http://www.percona.com/doc/percona-server/5.5/installation/apt_repo.html](Percona APT doc))
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
None.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
- { role: HanXHX.mysql, mysql_origin: 'mariadb', mysql_vendor: 'mariadb' }
License
-------
BSD
GPLv2
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
- You can find many other roles in my GitHub "lab": https://github.com/HanXHX/my-ansible-playbooks
- All issues, pull-request are welcome :)

View File

@ -1,65 +0,0 @@
MySQL role
==========
Actions
-------
- Install minimal packages
- Install [MariaDB](https://mariadb.org) or [MySQL](http://www.mysql.com) or [Percona Server](http://www.percona.com/software/percona-server)
- Configuration
- Secure your service
- Create databases
- Create users
Variables
---------
- mysql\_vendor: 'mariadb' or 'mysql' or 'percona' (mariadb is default)
- mysql\_root\_password: default password used when installing database service
### Configuration
- mysql\_cnf: key/value hash see [defaults/main.yml](default vars file)
### Databases
- mysql\_databases: list
### Users
Example:
```
mysql\_users:
- name: 'kiki'
password: '123'
priv: hihi.*:ALL
```
Check "priv" syntax in [http://docs.ansible.com/mysql_user_module.html](mysql_user module documentation)
### MariaDB
- mariadb\_version (5.5, 10.0, 10.1)
- mariadb\_repository (see: [http://mariadb.org/mariadb/repositories/](MariaDB repositories tool))
### Percona
- percona\_version (5.5, 5.6)
- percona\_repository (see: [http://www.percona.com/doc/percona-server/5.5/installation/apt_repo.html](Percona APT doc))
Notes
-----
- NEVER (yes NEVER), change your mysql\_vendor or versions! This role don't manage migrations/upgrades/downgrades.
- Be careful! If you use 'mysql' you can have 2 versions: 5.5 (from Debian repository) and 5.6 from [Dotdeb](https://www.dotdeb.org)
TODO
----
- Support Jessie
- Test "official" releases of MySQL [http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/](http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/)
- Manage Galera and other tools
- Manage replication
- You can secure your password with [http://docs.ansible.com/playbooks_vault.html](Ansible Vault)