--- - name: Verify representative Narratio configuration hosts: localhost gather_facts: false tasks: - name: Read the managed pipeline become: true ansible.builtin.slurp: src: /usr/local/etc/narratio/pipeline.yml register: narratio_managed_pipeline - name: Verify representative pipeline fields ansible.builtin.assert: that: - narratio_pipeline.workspace.cleanup_after_publish == false - narratio_pipeline.campaigns.default_campaign_id == '' - narratio_pipeline.spool.delete_audio_after_publish == false - narratio_pipeline.cache.s3_audio == false - narratio_pipeline.publish.enabled == false - narratio_pipeline.publish.outputs[0].source == 'narratio.transcript.final_markdown' - narratio_pipeline.publish.outputs[0].dest == 'transcripts/final.md' - narratio_pipeline.publish.outputs[0].required == false - narratio_pipeline.whisperx.retries == 0 - narratio_pipeline.seriatim.coalesce_gap == 0.0 - narratio_pipeline.seriatim.report == false - narratio_pipeline.audita.modules == [] - narratio_pipeline.audita.credentials == narratio_expected_audita_credentials - narratio_pipeline.audita.overlay == narratio_expected_audita_overlay - narratio_pipeline.audita.proposal_profile == narratio_expected_audita_proposal_profile - narratio_pipeline.audita.validation_profile == narratio_expected_audita_validation_profile - narratio_pipeline.notarius.credentials == narratio_expected_notarius_credentials - narratio_pipeline.notarius.config_overlay == narratio_expected_notarius_config_overlay - narratio_pipeline.notarius.resume == false - narratio_pipeline.notarius.chunk_cache == 'auto' - narratio_pipeline.scriptorium.credentials == narratio_expected_scriptorium_credentials - narratio_pipeline.trim.enabled == false - narratio_pipeline.trim.bounds.render_debug == false - narratio_pipeline.render.enabled == false - narratio_pipeline.render.include_metadata == false - "'configkit' not in narratio_pipeline" - "'storage' not in narratio_pipeline" - "'normalize' not in narratio_pipeline" vars: narratio_pipeline: "{{ narratio_managed_pipeline.content | b64decode | from_yaml }}" narratio_expected_audita_credentials: >- {{ narratio_test_audita_credentials | default(['NARRATIO_TEST_AUDITA_API_KEY', 'NARRATIO_TEST_NOTARIUS_API_KEY']) }} narratio_expected_audita_overlay: "{{ narratio_test_audita_overlay | default('representative-audita-overlay') }}" narratio_expected_audita_proposal_profile: "{{ narratio_test_audita_proposal_profile | default('representative-proposal') }}" narratio_expected_audita_validation_profile: "{{ narratio_test_audita_validation_profile | default('representative-validation') }}" narratio_expected_notarius_credentials: "{{ narratio_test_notarius_credentials | default(['NARRATIO_TEST_NOTARIUS_API_KEY']) }}" narratio_expected_notarius_config_overlay: "{{ narratio_test_notarius_config_overlay | default('representative-overlay') }}" narratio_expected_scriptorium_credentials: >- {{ narratio_test_scriptorium_credentials | default(['NARRATIO_TEST_AUDITA_API_KEY', 'NARRATIO_TEST_NOTARIUS_API_KEY']) }} - name: Verify composed Scriptorium artifacts ansible.builtin.assert: that: - narratio_pipeline.scriptorium.artifacts.disabled_fixture.enabled == false - narratio_pipeline.scriptorium.artifacts.additional_disabled_fixture.enabled == false vars: narratio_pipeline: "{{ narratio_managed_pipeline.content | b64decode | from_yaml }}" when: not (narratio_test_scriptorium_credentials_only | default(false)) - name: Verify the credential-only Scriptorium section ansible.builtin.assert: that: - "narratio_pipeline.scriptorium == {'credentials': []}" vars: narratio_pipeline: "{{ narratio_managed_pipeline.content | b64decode | from_yaml }}" when: narratio_test_scriptorium_credentials_only | default(false) - name: Validate the representative 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 environment: NARRATIO_TEST_NOTARIUS_API_KEY: "{{ lookup('ansible.builtin.env', 'NARRATIO_TEST_NOTARIUS_API_KEY') }}" NARRATIO_TEST_AUDITA_API_KEY: "{{ lookup('ansible.builtin.env', 'NARRATIO_TEST_AUDITA_API_KEY') }}" changed_when: false