playbook
---
- hosts: localhost
connection: local
tasks:
- name: facts about none-existing service
community.aws.ecs_service_info:
cluster: cluster-div
service: bla
details: true
register: output
- debug: msg ="{{ output }}"
output
TASK [facts about none-existing service] ****************************************************************************************************************************************************************************
ok: [localhost]
TASK [debug] ********************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": "Hello world!"
}