Coder Social home page Coder Social logo

ansible-mariadb's Introduction

MariaDB

This role installs MariaDB on Debian. It also installs python-mysqldb.

On first run, the test database and test user is removed. A .my.cnf config file is written in /root so you can connect without entering a password with any mariadb/mysql client as user root.

Requirements

Debian Wheezy/Jessie with the package python-pycurl and python-software-properties installed.

Role Variables

All the following variables are set in defaults.

Obviously, the mariadb_root_password would be a good candidate to set. if you add passwords to a version control system, use ansible-vault, or git-crypt

Because this role is for a clean install - it assumes an empty root password. The tasks for resetting the root password are only run on install/first activation of the service.

# The root password is set, and added to .my.cnf for the root user
mariadb_root_password: "secret"

mariadb_base_dir: "/usr"
mariadb_bind_address: "127.0.0.1"
mariadb_charsets_dir: "/usr/share/mysql/charsets"
mariadb_config: "/etc/mysql/my.cnf"
mariadb_data_dir: "/var/lib/mysql"
mariadb_install_db_bin: "/usr/bin/mysql_install_db"
mariadb_log_bin: false
mariadb_long_query_time: 10
mariadb_mysql_errorlog: "/var/log/mysql/mysql.err"
mariadb_mysqld_errorlog: "/var/log/mysql/mysqld.err"
mariadb_mysqld_slowlog: "/var/log/mysql/mysqld.slow"
mariadb_pid: "/var/run/mysqld/mysqld.pid"
mariadb_port: 3306
mariadb_query_cache_limit: false  # 128K
mariadb_query_cache_size: false   # 64M
mariadb_root_password: "secret"
mariadb_server_id: 1
mariadb_share_dir: "/usr/share/mysql"
mariadb_skip_charset_handshake: true
mariadb_skip_networking: false
mariadb_socket: "/var/run/mysqld/mysqld.sock"
mariadb_version: 10.2

Example Playbook

- hosts: servers
  roles:
     - { role: f500.mariadb, mariadb_root_password: some_random_string }

License

LGPLv3

Author Information

Jasper N. Brouwer, [email protected]

Ramon de la Fuente, [email protected]

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.