ansible-playbook error for load_config()

dear team,

this is my actual yml file

Hello,

I’ve got similar errors on Ubuntu 16.04 and Ansible 2.0.0.2:

a)

TASK [pull an image] ***********************************************************

fatal: [127.0.0.1]: FAILED! => {“changed”: false, “failed”: true, “module_stderr”: “”, “module_stdout”: “Traceback (most recent call last):\r\n File "/root/.ansible/tmp/ansible-tmp-1521712725.99-162454626235165/docker_image", line 2391, in \r\n main()\r\n File "/root/.ansible/tmp/ansible-tmp-1521712725.99-162454626235165/docker_image", line 381, in main\r\n manager = DockerImageManager(module)\r\n File "/root/.ansible/tmp/ansible-tmp-1521712725.99-162454626235165/docker_image", line 279, in init\r\n self.client = docker.Client(\r\nAttributeError: ‘module’ object has no attribute ‘Client’\r\n”, “msg”: “MODULE FAILURE”, “parsed”: false}

b)

127.0.0.1 | FAILED! => {

“changed”: false,

“msg”: “Error pulling image ubuntu:latest - pull() got an unexpected keyword argument ‘decode’”

}

to fix the error a)

I executed the command:

pip install -U ansible

to fix the error b)

I executed the command:pip install -U docker-compose

To test the docker_* modules you can use the module directly, without a playbook:
ansible localhost -m docker_image -a “name=ubuntu”

As soon as the module invocation woks,
you can proceed and add it to your playbook.