# is log\_driver must even for "json-file"?

**URL:** <https://forum.ansible.com/t/is-log-driver-must-even-for-json-file/25064>\
**Category:** Ansible Project\
**Created:** [July 24, 2017, 10:02am UTC](https://forum.ansible.com/t/is-log-driver-must-even-for-json-file/25064 "2017-07-24T10:02:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kavya\_KULSHRESHTHA](https://avatars.discourse-cdn.com/v4/letter/k/aeb1de/32.png) [@kavya\_KULSHRESHTHA](https://forum.ansible.com/u/kavya_KULSHRESHTHA)\
**Post date:** [July 24, 2017, 10:02am UTC](https://forum.ansible.com/t/is-log-driver-must-even-for-json-file/25064/1 "2017-07-24T10:02:28Z")

</div>

Hi,

I started a container using ansible without specifying log-driver as “json-file” is the default one, but I added below log\_options:

log\_options:  
max-size: “10m”  
max-file: “2”

Ansible version: 2.2.1.0

What I expected?  
Container should run with these log\_options as json-file is default

What I found?  
docker inspect showed no log\_options were configred.  
“LogConfig”: {  
“Type”: “json-file”,  
“Config”: {}  
},

Upon specifying “json-file” as the log\_driver, I was able to see log\_options.  
Playbook:  
log\_driver: “json-file”  
log\_options:  
max-size: “10m”  
max-file: “2”

docker inspect:  
“LogConfig”: {  
“Type”: “json-file”,  
“Config”: {  
“max-file”: “2”,  
“max-size”: “10m”  
}

Doesnt Ansible assumes default log\_driver like docker does?

Regards,  
Kavya K
