Stefan Schulte
unread,Jun 22, 2012, 12:20:45 PM6/22/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
On Fri, Jun 22, 2012 at 05:57:21AM -0700, cnjohnson wrote:
> This is my first foray into using puppet for creating and maintaining bind
> mounts (see man 8 mount). I am unsure of how to describe the state I want
> puppet to achieve. This is for creating files systems in a chroot jail. I
> am primarily unsure of how to set the "options". Is it a string, and array,
> a hash? Any help would be appreciated. Thanks!
>
> mount { "/gpfs20/home":
> ensure => mounted,
> name => "/chroot/centos5/home",
> fstype => "none",
> options => "rw,bind",
> }
>
You pass the options as a string but I see another problem here: You are
setting the title of the resource to "/gpfs20/home". The title can be
completly random (as long as it is unique) but it will also implicitly set
the name parameter as long as you don't overwrite it explicitly. The name
parameter determines the mountpoint. So I guess what you really want is
mount { '/chroot/centos5/home':
ensure => mounted,
device => '/gpfs20/home',
fstype => 'none',
options => 'rw,bind',
}
As you can see I omitted the name parameter (the mountpoint) because it is
implicitly set to the resource's title ("/chroot/centos5/home")
-Stefan