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 received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/zFyQznaUtBQJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Friday, June 22, 2012 11:20:45 AM UTC-5, Stefan Schulte wrote:> > 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 > > Thanks!Charles -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/F-0E8CjXhK0J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.