diff --git a/README.md b/README.md index f4d77e90..ea1e6ba8 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 diff --git a/lib/puppet/type/docker_volume.rb b/lib/puppet/type/docker_volume.rb index 0e7cfedf..705da70e 100644 --- a/lib/puppet/type/docker_volume.rb +++ b/lib/puppet/type/docker_volume.rb @@ -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 diff --git a/spec/unit/lib/puppet/type/docker_volume_spec.rb b/spec/unit/lib/puppet/type/docker_volume_spec.rb index 992449b4..c2de5acf 100644 --- a/spec/unit/lib/puppet/type/docker_volume_spec.rb +++ b/spec/unit/lib/puppet/type/docker_volume_spec.rb @@ -7,13 +7,13 @@ [ :name, :provider, + :options, ] end let :properties do [ :driver, - :options, :mountpoint, ] end