Files @ 92011aae7258
Branch filter:

Location: majic-ansible-roles/roles/database/molecule/default/playbook.yml

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.
---


- hosts: parameters-mandatory
  become: yes
  roles:
    - role: database
      db_name: testdb
      db_password: testdbpassword

      # database_server role
      db_root_password: "root_password"

- hosts: backup
  become: yes
  roles:
    - role: database
      db_name: testdb
      db_password: testdbpassword
      enable_backup: yes

      # database_server
      db_root_password: "root_password"

      # backup_client
      backup_client_username: "bak-localhost"
      backup_encryption_key: "{{ lookup('file', 'tests/data/gnupg/parameters-optional.asc') }}"
      backup_server: localhost
      backup_server_host_ssh_public_keys:
        - "{{ lookup('file', 'tests/data/ssh/server_dsa.pub') }}"
        - "{{ lookup('file', 'tests/data/ssh/server_rsa.pub') }}"
        - "{{ lookup('file', 'tests/data/ssh/server_ed25519.pub') }}"
        - "{{ lookup('file', 'tests/data/ssh/server_ecdsa.pub') }}"
      backup_ssh_key: "{{ lookup('file', 'tests/data/ssh/parameters-optional' ) }}"