Files @ cf15a5f3d965
Branch filter:

Location: majic-ansible-roles/roles/database/tasks/main.yml

branko
MAR-218: Quote all octal modes to avoid ambiguity due to changes in YAML standard.
---

- name: "Create database {{ db_name }}"
  community.mysql.mysql_db:
    name: "{{ db_name }}"
    state: present
    login_unix_socket: "/var/run/mysqld/mysqld.sock"

- name: "Create database user {{ db_name }}"
  community.mysql.mysql_user:
    name: "{{ db_name }}"
    password: "{{ db_password }}"
    priv: "{{ db_name }}.*:ALL"
    state: present
    login_unix_socket: "/var/run/mysqld/mysqld.sock"
    column_case_sensitive: true

- name: Enable backup
  ansible.builtin.include_tasks: backup.yml
  when: enable_backup

- name: Explicitly run all handlers
  ansible.builtin.include_tasks: ../handlers/main.yml
  when: "run_handlers | default(False) | bool()"
  tags:
    - handlers