Files @ 92011aae7258
Branch filter:

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

branko
MAR-128: Upgraded tests for php_website role:

- Switch to new Molecule configuration.
- Updated set-up playbook to use become: yes.
- Moved some preparatory steps outside of the main playbook (eases
idempotence tests).
- Updated tests to reference the yml inventory file.
- Updated tests to use new fixture (host instead of individual ones).
- Switched to extracting hostname instead of hard-coding it in a
couple of tests.
- Fixed some linting issues.
- Updated hostname to include Debian version.
---

- name: "Create database {{ db_name }}"
  mysql_db:
    name: "{{ db_name }}"
    state: present

- name: "Create database user {{ db_name }}"
  mysql_user:
    name: "{{ db_name }}"
    password: "{{ db_password }}"
    priv: "{{ db_name }}.*:ALL"
    state: present

- name: Enable backup
  include: backup.yml
  when: enable_backup

- name: Explicitly run all handlers
  include: ../handlers/main.yml
  when: "handlers | default(False) | bool() == True"
  tags:
    - handlers