What's the best practice to define two mount resources with same name, but different fstypes or ensure parameter ? In my particular case, I have the following :Two mounts defined as virtual resources with same name but different fstype. One is is ensuring present, other absent. Puppet doesn't like it,Looking at a bug report earlier ( http://projects.puppetlabs.com/issues/7491 ), I followed the suggestion, but it doesn't help. puppet throws this error :
Two mounts defined as virtual resources with same name but different fstype. One is is ensuring present, other absent. Puppet doesn't like it,Looking at a bug report earlier ( http://projects.puppetlabs.com/issues/7491 ), I followed the suggestion, but it doesn't help. puppet throws this error :
You cannot declare multiple configurations of the same resource for the same target node. This constraint covers all resource declarations equally, including those of virtual and exported resources. Where it knows how to do so, Puppet intentionally recognizes and blocks attempts to disguise multiple declarations by use of different resource titles (contrary to some of the comments on issue 7491, but imho correctly).
umounted to make sure the filesystem is in the filesystem table
but not mounted (if the filesystem is currently mounted, it will be
unmounted). Set it to absent to unmount (if necessary) and remove
the filesystem from the fstab. Set to mounted to add it to the
fstab and mount it. Set to present to add to fstab but not change
mount/unmount status. Valid values are defined (also called present), unmounted, absent, mounted.
On Jan 18, 2013 11:31 AM, "jcbollinger" <John.Bo...@stjude.org> wrote:
>
>
>
> On Friday, January 18, 2013 12:11:42 PM UTC-6, iamauser wrote:
>>
>> What's the best practice to define two mount resources with same name, but different fstypes or ensure parameter ? In my particular case, I have the following :
>>
>> Two mounts defined as virtual resources with same name but different fstype. One is is ensuring present, other absent. Puppet doesn't like it,
>> Looking at a bug report earlier ( http://projects.puppetlabs.com/issues/7491 ), I followed the suggestion, but it doesn't help. puppet throws this error :
>
> Instead, declare the resource once, and either set its parameters conditionally or override them, where needed, by one of the supported mechanisms for doing so.
>
>
> John
If I understand correctly the conditional would be based on the current fstype of the mount. It seems like a custom fact would be needed.