Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Ansible role manages users and databases for a MySQL compatible DB server like MySQL, Galera etc.

Notifications You must be signed in to change notification settings

Rheinwerk/ansible-role-mysql_users

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Users

This roles manages users and databases for a MySQL compatible DB server like MySQL, Galera etc.

Build Status

Requirements

None.

Role Variables

There are two variables that drive this role: _mysql_users and RW_APT_CACHE_UPDATE. _mysql_users is a map that contains all configuration and settings for this role. RW_APT_CACHE_UPDATE may be specified as an extra variable on invocation of Ansible in order to force apt-get update.

Dependencies

None.

Example Playbook

The general contract of this role is to take the variables map _mysql_users from defaults/main.yml as a template for your configuration and pass that configuration as a parameter to this role.

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

    - hosts: <HOST THAT IS ALLOWED TO MANAGE MYSQL>
      var:
        MYSQL_USERS:
          host: <HOST MYSQL IS RUNNING ON>
          root:
            password: <ADMIN_PASSWORD>
          users:
            grafana:
              state: present
              name: grafana
              password: <DB_USER_PASSWORD>
              privileges: "grafana.*:ALL,GRANT"
              hosts:
                - <HOST ALLOWED TO QUERY>
          databases:
            grafana:
              name: grafana
              state: present
      roles:
         - { role: mysql_users, tags: [ 'mysql_users' ], _mysql_users: "{{ MYSQL_USERS }}" }

License

Please see LICENSE.

Author Information

Original author is Lukas Pustina as member of the Rheinwerk project.

About

Ansible role manages users and databases for a MySQL compatible DB server like MySQL, Galera etc.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •