Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

fetch module

ANSIBLE VERSION

ansible 2.3.2.0 (detached HEAD c7052b42c7) last updated 2017/08/06 09:06:45 (GMT +300)
config file =
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]

OS / ENVIRONMENT

ansible is running from Ubuntu 16.04 and manages various debian jessie hosts.

SUMMARY

fetch can't properly handle authentication failure for some reason.

Seems to be duplicate of closed #16877

STEPS TO REPRODUCE

NB: gather_facts: false matters.

- hosts: all
gather_facts: false
tasks:
- name: mktemp
command: mktemp -td boot_id.XXXXXXXX
register: tmp
run_once: true
delegate_to: localhost
- name: fetch kernel/random/boot_id
fetch: src=/proc/sys/kernel/random/boot_id dest={{tmp.stdout}}/{{inventory_hostname}} flat=yes fail_on_missing=yes

EXPECTED RESULTS

I expected the host to report some sort of failure as with ping module:

$ ansible -m ping ooni-fdroid-build.infra.ooni.io
ooni-fdroid-build.infra.ooni.io | UNREACHABLE! => {
"changed": false,
"msg": "SSH Error: data could not be sent to remote host \"ooni-fdroid-build.infra.ooni.io\". Make sure this host can be reached over ssh",
"unreachable": true
}

ACTUAL RESULTS

TASK [fetch kernel/random/boot_id] *************************************************************************************************************************************************************************
task path: /home/darkk/oo/sysadmin/ansible/check-inventory.yml:16
Using module file /home/darkk/contrib-src/ansible/lib/ansible/modules/files/stat.py
<ooni-fdroid-build.infra.ooni.io> ESTABLISH SSH CONNECTION FOR USER: None
<ooni-fdroid-build.infra.ooni.io> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/darkk/.ansible/cp/7735c2afbf ooni-fdroid-build.infra.ooni.io '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
ok: [ooni-fdroid-build.infra.ooni.io] => {
"changed": false,
"file": "/proc/sys/kernel/random/boot_id",
"msg": "unable to calculate the checksum of the remote file"
}

Issue 2:
ISSUE TYPE

Bug Report

ANSIBLE VERSION

ansible 2.1.0
config file =
configured module search path = Default w/o overrides

CONFIGURATION

OS / ENVIRONMENT

Ubuntu 14.04

Docker version 1.10.3, build 20f81dd (also tried version 1.11.0 with same error)

Docker-Py version 1.8.0

SUMMARY

I get the error "cannot unmarshal array into Go value" when I try to launch a docker container with volumes attached to it. The error only occurs when I specify a mounting point.

STEPS TO REPRODUCE

Just run ansible-playbook test2.yml

---
- hosts: dl2
tasks:
- name: Launch ubuntu
docker:
state: started
image: ubuntu
command: sleep 1d
volumes:
- "/tmp:/inbox"

EXPECTED RESULTS

ACTUAL RESULTS

short version of output

PLAY [dl2] *********************************************************************

TASK [setup] *******************************************************************
ok: [dl2]

TASK [Launch ubuntu] ***********************************************************
fatal: [dl2]: FAILED! => {"changed": false, "failed": true, "msg": "Docker API Error: json: cannot unmarshal array into Go value of type string"}

NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @test2.retry

PLAY RECAP *********************************************************************
dl2 : ok=1 changed=0 unreachable=0 failed=1

verbose version of output

No config file found; using defaults
Loaded callback default of type stdout, v2.0

PLAYBOOK: test2.yml ************************************************************
1 plays in test2.yml

PLAY [dl2] *********************************************************************

TASK [setup] *******************************************************************
<dl2> ESTABLISH LOCAL CONNECTION FOR USER: daniel
<dl2> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1461163032.16-7353653514461 `" && echo "` echo $HOME/.ansible/tmp/ansible-tmp-1461163032.16-7353653514461 `" )'
<dl2> PUT /tmp/tmpg0NEE7 TO /home/daniel/.ansible/tmp/ansible-tmp-1461163032.16-7353653514461/setup
<dl2> EXEC /bin/sh -c 'LANG=en_US LC_ALL=en_US LC_MESSAGES=en_US /usr/bin/python /home/daniel/.ansible/tmp/ansible-tmp-1461163032.16-7353653514461/setup; rm -rf "/home/daniel/.ansible/tmp/ansible-tmp-1461163032.16-7353653514461/" > /dev/null 2>&1'
ok: [dl2]

TASK [Launch ubuntu] ***********************************************************
task path: .../test2.yml:4
<dl2> ESTABLISH LOCAL CONNECTION FOR USER: daniel
<dl2> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1461163032.75-245772432711048 `" && echo "` echo $HOME/.ansible/tmp/ansible-tmp-1461163032.75-245772432711048 `" )'
<dl2> PUT /tmp/tmpX_tBFI TO /home/daniel/.ansible/tmp/ansible-tmp-1461163032.75-245772432711048/docker
<dl2> EXEC /bin/sh -c 'LANG=en_US LC_ALL=en_US LC_MESSAGES=en_US /usr/bin/python /home/daniel/.ansible/tmp/ansible-tmp-1461163032.75-245772432711048/docker; rm -rf "/home/daniel/.ansible/tmp/ansible-tmp-1461163032.75-245772432711048/" > /dev/null 2>&1'
fatal: [dl2]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"cap_add": null, "cap_drop": null, "command": "sleep 1d", "count": 1, "cpu_set": null, "cpu_shares": 0, "debug": false, "detach": true, "devices": null, "dns": null, "docker_api_version": "1.22", "docker_url": null, "docker_user": null, "domainname": null, "email": null, "entrypoint": null, "env": null, "env_file": null, "expose": null, "extra_hosts": null, "hostname": null, "image": "ubuntu", "insecure_registry": false, "labels": {}, "links": null, "log_driver": null, "log_opt": null, "lxc_conf": null, "memory_limit": "0", "memory_swap": "0", "name": null, "net": null, "password": null, "pid": null, "ports": null, "privileged": false, "publish_all_ports": false, "pull": "missing", "read_only": null, "registry": null, "restart_policy": null, "restart_policy_retry": 0, "signal": null, "state": "started", "stdin_open": false, "stop_timeout": 10, "timeout": 60, "tls_ca_cert": null, "tls_client_cert": null, "tls_client_key": null, "tls_hostname": null, "tty": false, "ulimits": null, "use_tls": null, "username": null, "volumes": ["/tmp:/inbox"], "volumes_from": null}, "module_name": "docker"}, "msg": "Docker API Error: json: cannot unmarshal array into Go value of type string"}

NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @test2.retry

PLAY RECAP *********************************************************************
dl2 : ok=1 changed=0 unreachable=0 failed=1