Files
ansible-role-narratio/tests/verify-baseline.yml

32 lines
960 B
YAML

---
- name: Validate the managed Narratio pipeline
hosts: localhost
gather_facts: false
tasks:
- name: Read the baseline pipeline
become: true
ansible.builtin.slurp:
src: /usr/local/etc/narratio/pipeline.yml
register: narratio_baseline_pipeline
- name: Verify null downstream fields are omitted
ansible.builtin.assert:
that:
- "'audita' not in narratio_pipeline"
- "'notarius' not in narratio_pipeline"
- "'scriptorium' not in narratio_pipeline"
vars:
narratio_pipeline: "{{ narratio_baseline_pipeline.content | b64decode | from_yaml }}"
- name: Validate the pipeline as the Narratio account
become: true
become_user: narratio
ansible.builtin.command:
argv:
- /usr/local/bin/narratio
- config
- validate
- --config
- /usr/local/etc/narratio/pipeline.yml
changed_when: false