Skip to content

Add encoding and collation in create user table #47

@jphilip

Description

@jphilip

To create a tale in a different encoding/collation than the default, I suppose currently one can create a table in the default encoding/collation and then modify it in a post-creation script, but it would be nice to be able to just add them in the vars section as for example:

    mariadb_databases:
      - name: my_db
        encoding: utf8mb4
        collation: utf8mb4_general_ci

It would just require adding a couple of lines to the Create user defined databases task:

- name: Create user defined databases
  mysql_db:
    name: "{{ item.name }}"
    encoding: "{{ item.encoding }}"
    collation: "{{ item.collation }}"
    login_user: root
    login_password: "{{ mariadb_root_password }}"
    login_unix_socket: "{{ mariadb_socket }}"
    state: present
  with_items: "{{ mariadb_databases }}"
  register: db_creation
  tags: mariadb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions