# Output format

### Human-readable

Best way to format output for easy debugging is running with one level of verbose `-v` and config `ANSIBLE_STDOUT_CALLBACK=debug` for callback output login, also print pure `stdout`&#x20;

Or add `stdout_callback = debug` to file `ansible.cfg`

```yaml
TASK [Config backend directory] ************************************************
changed: [default] => {
    "changed": true, 
    "gid": 33, 
    "group": "www-data", 
    "mode": "0775", 
    "owner": "www-data", 
    "path": "/var/www", 
    "size": 4096, 
    "state": "directory", 
    "uid": 33
}

TASK [shell] *******************************************************************
changed: [default] => {
    "changed": true, 
    "cmd": "cp -r /home/ubuntu/* /****/", 
    "delta": "0:00:00.003310", 
    "end": "2019-02-20 04:27:35.078530", 
    "rc": 0, 
    "start": "2019-02-20 04:27:35.075220"
}

TASK [copy] ********************************************************************
changed: [default] => {
    "changed": true, 
    "checksum": "827c6dd2d1f982794c8bf413708c9b8207252c5b", 
    "dest": "/etc/supervisor/conf.d/msg-worker-supervisord.conf", 
    "gid": 0, 
    "group": "****", 
    "md5sum": "6d007a703729673056bc9b0ec4a1367b", 
    "mode": "0775", 
    "owner": "****", 
    "size": 261, 
    "src": "/****/msg-worker-supervisord.conf", 
    "state": "file", 
    "uid": 0
}

TASK [Run migration on template subdomain] *************************************
changed: [default] => {
    "changed": true, 
    "cmd": "runuser --user=www-data -- /var/www/backend-symfony/current/bin/console doctrine:migrations:migrate --instance=instance_template.ahihi.io --env=prod", 
    "delta": "0:00:00.458270", 
    "end": "2019-02-20 04:27:37.223567", 
    "rc": 0, 
    "start": "2019-02-20 04:27:36.765297"
}

STDOUT:

****@instance_template: 
                                                              
                    Application Migrations                    
                                                              

Migrating up to 20190218074800 from 20190215121527

  ++ migrating 20190218074800

     -> DELETE FROM contents_status_translations WHERE status_id IN (1, 2, 3, 4)
     -> INSERT INTO contents_status_translations (status_id, `language`, field, `value`) VALUES (1, 'de', 'name', 'Idee'), (2, 'de', 'name', 'In Produktion'), (3, 'de', 'name', 'Veröffentlicht'), (4, 'de', 'name', 'Abgelehnt')

  ++ migrated (0.06s)

  ------------------------

  ++ finished in 0.06s
  ++ 1 migrations executed
  ++ 2 sql queries
```

### Reference

1. Docs: <https://docs.ansible.com/ansible/devel/plugins/callback.html>
2. Comparison: <https://rndmh3ro.github.io/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledge.tracelog.in/automation/ansible/output-format.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
