---
- include_tasks: utils/once/flag.yml
- name: π¦ install the codex coding agent
ansible.builtin.command:
cmd: npm install -g {{ agnt_codex_package }}@{{ agnt_codex_version }}
register: agnt_codex_install
changed_when: "'added' in agnt_codex_install.stdout or 'changed' in agnt_codex_install.stdout"
- name: "π Verify the gateway contract for {{ application_id }}"
ansible.builtin.include_tasks: "{{ lookup('path_absolute', 'roles/svc-ai-litellm/tasks/utils/consumer_contract.yml') }}"
when: lookup('config', application_id, 'services.litellm.enabled', false) | bool
- name: π Point the agent at the model gateway
ansible.builtin.include_tasks: 01_gateway.yml
when: agnt_codex_configured | bool