Closed diegolima closed 6 years ago
That type/provider expects an array for the options, not a hash.
I've tested successfully with the following hieara entry
docker::volume:
blueocean:
driver: local
options:
- ['type=nfs','o=addr=%{custom_manager},rw','device=:/srv/blueocean']
==> node-01: Debug: Executing: '/usr/bin/docker volume create --driver=local --opt=type=nfs --opt=o=addr=,rw --opt=device=:/srv/blueocean blueocean'
Hi! Thanks for the input! I think that we could use some better documentation for the volume type, as currently there is once single example that doesn't even have multiple options. Declaring as an array got things working though.
agreed, ill make sure it’s updated for the next release
Updated in README PR #204
I'm wondering if a non-hieara example can be given, or tested?
I've not been able to get volume to work.
docker_volume { 'am-pipeline-data':
ensure => present,
driver => 'local',
options => [ 'type=none', 'o=bind', 'device=/cihmz/am-pipeline-data']
}
is giving me:
russell@huntsman:~$ docker volume inspect am-pipeline-data
[
{
"CreatedAt": "2019-05-01T13:53:40-04:00",
"Driver": "local",
"Labels": {},
"Mountpoint": "/var/lib/docker/volumes/am-pipeline-data/_data",
"Name": "am-pipeline-data",
"Options": {
"type": "none"
},
"Scope": "local"
}
]
What you expected to happen?
Volume is created using multiple options provided as a list
What happened?
Volume gets created using only the first option
How to reproduce it?
I currently have this on a hiera file:
And this on the puppet manifest:
Versions:
Logs: