Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MODULES-10628] Update documentation for docker volume and set options as parameter #599

Merged
merged 1 commit into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,12 +552,9 @@ You can pass additional mount options to the `local` driver. For mounting an NFS
docker_volume { 'nfs-volume':
ensure => present,
driver => 'local',
options => {
type => 'nfs4',
o => 'addr=10.10.10.10,rw',
device => ':/exports/data'
},
options => ['type=nfs','o=addr=%{custom_manager},rw','device=:/srv/blueocean']
}

```

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

Available parameters for `options` depend on the used volume driver. For details, see
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/docker_volume.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
desc 'The volume driver used by the volume'
end

newproperty(:options) do
newparam(:options) do
desc 'Additional options for the volume driver'
end

Expand Down
2 changes: 1 addition & 1 deletion spec/unit/lib/puppet/type/docker_volume_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
[
:name,
:provider,
:options,
]
end

let :properties do
[
:driver,
:options,
:mountpoint,
]
end
Expand Down