--- - name: Remove Kottos AI Agent Platform hosts: ubuntu become: true tasks: - name: Check if host has kottos service ansible.builtin.set_fact: has_kottos_service: "{{ 'kottos' in services | default([]) }}" - name: Skip hosts without kottos service ansible.builtin.meta: end_host when: not has_kottos_service - name: Stop and disable kottos service ansible.builtin.systemd: name: kottos state: stopped enabled: false ignore_errors: true - name: Remove systemd service file ansible.builtin.file: path: /etc/systemd/system/kottos.service state: absent - name: Reload systemd daemon ansible.builtin.systemd: daemon_reload: true - name: Remove Kottos directory ansible.builtin.file: path: "{{ kottos_directory }}" state: absent