On Tuesday, 25 March 2014 17:01:03 UTC, jcbollinger wrote:
>
>
>
> On Monday, September 2, 2013 5:57:44 AM UTC-5, kashif wrote:
>>
>>
>> Hi 
>> I am using create_resource to create a dir and then mount it. I am using 
>> two create_resources and want one to be completed before other. 
>>
>> $mount_point = hiera('test::mount_point', []) 
>> $defaults = {
>>  'ensure' => 'directory',
>> }
>> $mountit = hiera('test::mountit')
>> create_resources (file, $mount_point, $defaults)
>> create_resources (mount, $mountit)
>>
>>
>
> Do be aware, however, that it is distinctly problematic to manage a mount 
> point directory with Puppet, because the operating system actively 
> obfuscates the distinction between the mount point itself and the root of 
> the remote filesystem mounted on it (if any).  This is an intentional 
> feature of UNIX and similar systems.  That will present a problem for you 
> if you want to manage the mount point, but you don't want to (or can't) 
> manage the mounted filesystem root, which is a rather common situation.
>
> As it happens, another current thread suggests as good a solution as I've 
> ever come across: use an Exec to create the mount point directory if it is 
> absent.  That would look something like this:
>
> exec { "Mount point $mountpoint":
>   command => "/usr/bin/install -u root -g root -m 0755 -d $mountpoint",
>   creates => $mountpoint,
>   before => Mount[$mountpoint]
> }
>
>
John - many thanks for the detailed answer. I wasn't aware of the 'keys' 
function of stdlib - this is very useful. For my particular problem, using 
an Exec (with the Before metaparameter) fits perfectly.
Regards

Adam

-- 
This message may contain confidential material. If you are not the intended 
recipient, please notify the sender and destroy all copies.
We may monitor communications to and from our network.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e69f2fdd-c013-4b6d-8b2c-94f88bc64fc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to