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 -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/01b575be-2468-469f-bab4-1114a9e49fa5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.