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) 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 ?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6a725def-682c-4e22-a7b2-17ba1e8b180a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to