Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add encoding and collation in create user table #47

Open
jphilip opened this issue Nov 30, 2020 · 1 comment
Open

Add encoding and collation in create user table #47

jphilip opened this issue Nov 30, 2020 · 1 comment

Comments

@jphilip
Copy link

jphilip commented Nov 30, 2020

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
@guntis-liepins
Copy link

I just tried to use this module and stumbled on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants