Ansible poses an error - {“changed”: false, “failed”: true, “msg”: “bind mode needs to either be "ro" or "rw"”}
I was facing a lot of issues with volumes earlier when i was using :ro (manual deployment) which went away after simply using :Z. Now ansible is not letting me use it and the same images are posing errors when starting. Can you please tell me why it is not allowed and how to come around this thing ?
You can specify a read mode for the mount with either C(ro) or C(rw). Starting at version 2.1, SELinux hosts can
additionally use C(z) or C(Z) mount options to use a shared or private label for the volume.
If I’m understanding the above correctly, options z and Z became available for SE Linux hosts in Ansible 2.1.
Also, I wonder if the format of - /mydata/folder:/opt/mydata/:Z might be incorrect? I would remove the last ‘/’, changing it to - /mydata/folder:/opt/mydata:Z