Files @ ca784c26d35c
Branch filter:

Location: majic-ansible-roles/roles/common/molecule/default/fixtures.yml

branko
MAR-150: Use Gimmecert for X.509 test fixtures in the common role:

- Drop the statically-generated X.509 certificates used for testing.
- Introduce fixture playbook in preparation phase that sets-up the
necessary certificates.
- Update the tests to use the fixture.
- Dynamically calculate the OpenSSL hash for CA certificate instead of
having the hard-coded value.
- Add the fixture artefacts to .gitignore files.
---

- hosts: localhost
  connection: local
  gather_facts: false

  tasks:

    - name: Remove existing X.509 material
      file:
        path: "tests/data/.gimmecert"
        state: absent

    - name: Initialise the CA hierarchy
      command: "gimmecert init --ca-hierarchy-depth 2"
      args:
        creates: "tests/data/.gimmecert"
        chdir: "tests/data/"

    - name: Link to the generated X.509 material
      file:
        src: ".gimmecert"
        dest: "tests/data/x509"
        state: link