ansible/ansible — pull request #6890 by softzilla (2014-04-08 12:55:21+00:00)
Title: docker: added support for read-only volume access. Fix #6884

Allow specify volumes with access protection: "/var/cloud:/tmp/cloud:ro"

Mount /var/cloud with read-only access to /tmp/cloud. Try write file "echo" into write-protected directory.
```
- name: "TEST"
docker:
image: ubuntu
volumes:
- "/var/cloud:/tmp/cloud:ro"
command: /bin/bash -c 'echo 1 > /tmp/cloud/echo'
tags:
- deploy
```

Result:
```
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
472c1e055df9 ubuntu:latest /bin/bash -c echo 1 2 seconds ago Exit 1

docker logs 472c1e055df9
/bin/bash: /tmp/cloud/echo: Read-only file system
```