Giter Club home page Giter Club logo

ansible-percona's Introduction

Ansible Role: Percona

Ansible playbook to install percona MySQL server in Debian/Ubuntu servers

Build Status

Requirements

None.

Role Variables

Available variables are listed below with its default values.

root_password: reallylongpassword

Define the MySQL root password, this password will be used to create a /root/.my.cnf to allow root mysql connections without password

port: 3306
bind_address: 0.0.0.0

Define port and bind address for MySQL connections

max_allowed_packet: 16M
key_buffer: 16M
thread_stack: 192K
thread_cache_size: 8

Define some values to tuning the database server

sqldebug: true
log_slow_queries: log_slow_queries    = /var/log/mysql/mysql-slow.log
long_query_time: long_query_time      = 2
log_queries_not_using_indexes: log-queries-not-using-indexes

If sqldebug is true this playbook will configure Percona MySQL with slow queries debug logs, if you want to disable this debug information you have to set sqldebug: false

create_app_db: true
db_name: mydatabase
db_collation: utf8_general_ci
db_user: myuser
db_user_password: anotherreallylongpassword
db_host: "%"
db_dump_file: ""

If create_app_db is true this playbook will configura an application database, you can set a path for a SQL dump file if you want to restore data in the new application database

Dependencies

None.

Example Playbook

---
- hosts: all
  user: vagrant
  sudo: true
  vars:
	  - db_name: mydb
	  - db_user: myuser
	  - db_host: localhost
	  - db_user_password: mypassword
	  - db_dump_file: /tmp/dump.sql.bz2
  roles:
	  - overdrive3000.ansible-percona

License

MIT / BSD

Notes

This is my first playbook it is a beta version and can be improved, please help me to improve and fix bugs for this playbook.

Thanks.

ansible-percona's People

Contributors

overdrive3000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ansible-percona's Issues

Galaxy role name incorrect

Hey @overdrive3000

Good job on this, works a treat.

I installed it via Galaxy (https://galaxy.ansible.com/detail#/role/1021), but since the name is just 'percona' the example in the README.md is incorrect, as it uses the name 'ansible-percona'.

user@host:/etc/ansible# ansible-playbook test.yml
ERROR: cannot find role in /etc/ansible/roles/overdrive3000.ansible-percona or /etc/ansible/overdrive3000.ansible-percona or /etc/ansible/roles/overdrive3000.ansible-percona

Assume it's easier to rename in Galaxy than change the repo name and docs, so I won't submit a Pull Request for the docs.

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.