Skip to content

Commit 7a16fb5

Browse files
author
Daniel Carabas
committed
Update documentation for docker volume and set options as parameter
1 parent c1e2ef9 commit 7a16fb5

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

README.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -552,12 +552,9 @@ You can pass additional mount options to the `local` driver. For mounting an NFS
552552
docker_volume { 'nfs-volume':
553553
ensure => present,
554554
driver => 'local',
555-
options => {
556-
type => 'nfs4',
557-
o => 'addr=10.10.10.10,rw',
558-
device => ':/exports/data'
559-
},
555+
options => ['type=nfs','o=addr=%{custom_manager},rw','device=:/srv/blueocean']
560556
}
557+
561558
```
562559

563560
The name value and the `ensure` parameter are required. If you do not include the `driver` value, the default `local` is used.
@@ -574,9 +571,7 @@ docker::volumes:
574571
ensure: present
575572
driver: local
576573
options:
577-
type: "nfs"
578-
o: "addr=%{custom_manager},rw",
579-
device: ":/srv/blueocean"
574+
- ['type=nfs','o=addr=%{custom_manager},rw','device=:/srv/blueocean']
580575
```
581576

582577
Available parameters for `options` depend on the used volume driver. For details, see

lib/puppet/type/docker_volume.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
desc 'The volume driver used by the volume'
1414
end
1515

16-
newproperty(:options) do
16+
newparam(:options) do
1717
desc 'Additional options for the volume driver'
1818
end
1919

spec/unit/lib/puppet/type/docker_volume_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
[
88
:name,
99
:provider,
10+
:options,
1011
]
1112
end
1213

1314
let :properties do
1415
[
1516
:driver,
16-
:options,
1717
:mountpoint,
1818
]
1919
end

0 commit comments

Comments
 (0)