# "Unsupported config option" error with the docker\_service module

**URL:** <https://forum.ansible.com/t/unsupported-config-option-error-with-the-docker-service-module/22493>\
**Category:** Ansible Project\
**Created:** [September 6, 2016, 12:38pm UTC](https://forum.ansible.com/t/unsupported-config-option-error-with-the-docker-service-module/22493 "2016-09-06T12:38:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valentin\_Chartier](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@Valentin\_Chartier](https://forum.ansible.com/u/Valentin_Chartier)\
**Post date:** [September 6, 2016, 12:38pm UTC](https://forum.ansible.com/t/unsupported-config-option-error-with-the-docker-service-module/22493/1 "2016-09-06T12:38:11Z")

</div>

Hello,  
I am having some trouble using the docker\_service module and I 'm looking for some suggestions on how to troubleshoot this.

I have the docker\_container working properly.  
The issue is with the new docker\_service module.

According to the docker\_service module ([http://docs.ansible.com/ansible/docker\_service\_module.html](http://docs.ansible.com/ansible/docker_service_module.html)) the prereqs on the remote host are :  
python \>= 2.6  
docker-compose \>= 1.7.0  
Docker API \>= 1.20  
PyYAML \>= 3.11

On my remote host I have :

# python --version

Python 2.7.5

# docker-compose --version

docker-compose version 1.8.0, build f3628c7

# pip list | grep -i pyyaml

PyYAML (3.12)

Not sure what to check for Docker API.

# docker --version

Docker version 1.12.1, build 23cf638

Here is my docker\_service task :

- docker\_service:  
project\_name: “my project”  
definition:  
version: ‘2’  
services:  
proxy:  
image: nginx  
state: started  
restart: “yes”  
become: yes  
become\_user: root  
register: compose  
tags: compose

I am getting this error :

TASK [my stack] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [jenkins2]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “Configuration error - The Compose file ‘/tmp/ansible9p01QT/docker-compose.yml’ is invalid because:\nUnsupported config option for services.proxy: ‘state’”}

Looks like version: ‘2’ is not taken into account or we are not using the correct version of docker-compose. But I am not seeing the reason for that.

I run Ansible 2.1.1.0 on a Mac, installed it with pip, and the remote host is a CentOS.

Any suggestion ?
