---

- name: Ensure Mariadb database are present
  mysql_db:
    name: "{{ item.name }}"
    collation: "{{ item.collation | default('utf8_general_ci') }}"
    encoding: "{{ item.encoding | default('utf8') }}"
    state: "{{ item.state | default('present') }}"
    target: "{{ item.target | default(omit) }}"
    login_unix_socket: "{{ mariadb_socket }}"
  with_items: "{{ mariadb_database }}"
  run_once: true
  no_log: true
