diff options
author | James Shubin <james@shubin.ca> | 2012-07-26 16:01:22 -0400 |
---|---|---|
committer | James Shubin <james@shubin.ca> | 2012-07-26 16:01:22 -0400 |
commit | 04b30ca4c784e2bfaadeea28f33214e666f1222b (patch) | |
tree | 6c6166c067cde426a421da9c4c45133238056dd7 /manifests/client.pp | |
parent | 61cf89af55bd57a224f0e600746a05a71fdb4c95 (diff) | |
download | puppet-gluster-04b30ca4c784e2bfaadeea28f33214e666f1222b.tar.gz puppet-gluster-04b30ca4c784e2bfaadeea28f33214e666f1222b.tar.xz puppet-gluster-04b30ca4c784e2bfaadeea28f33214e666f1222b.zip |
Change tabs to spaces as per bodepd's insistence :)
Diffstat (limited to 'manifests/client.pp')
-rw-r--r-- | manifests/client.pp | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/manifests/client.pp b/manifests/client.pp index d6d0e45..b4123e9 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -17,62 +17,62 @@ # XXX: try mounting with: glusterfs --volfile-server=<server-address> --volfile-id=<volume-name> <mount-point> --xlator-option='*dht*.assert-no-child-down=yes' # TODO: quotes or not? define gluster::client( - $server, # NOTE: use a vip as server hostname - $rw = false, # mount read only (true) or rw (false) -# $suid = false, # mount with suid (true) or nosuid (false) # TODO: will this work with gluster ? - $mounted = true # useful if we want to pull in the group - # defs, but not actually mount (testing) + $server, # NOTE: use a vip as server hostname + $rw = false, # mount read only (true) or rw (false) +# $suid = false, # mount with suid (true) or nosuid (false) # TODO: will this work with gluster ? + $mounted = true # useful if we want to pull in the group + # defs, but not actually mount (testing) ) { - #mount -t glusterfs brick1.example.com:/test /test - include gluster::client::base + #mount -t glusterfs brick1.example.com:/test /test + include gluster::client::base - $rw_bool = $rw ? { - true => 'rw', - default => 'ro', - } + $rw_bool = $rw ? { + true => 'rw', + default => 'ro', + } - # TODO: will this work with gluster ? - #$suid_bool = $suid ? { - # true => 'suid', - # default => 'nosuid', - #} - - $mounted_bool = $mounted ? { - true => mounted, - default => unmounted, - } - - # make an empty directory for the mount point - file { "${name}": - ensure => directory, # make sure this is a directory - recurse => false, # don't recurse into directory - purge => false, # don't purge unmanaged files - force => false, # don't purge subdirs and links - } - - # Mount Options: - # * backupvolfile-server=server-name - # * fetch-attempts=N (where N is number of attempts) - # * log-level=loglevel - # * log-file=logfile - # * direct-io-mode=[enable|disable] - # * ro (for readonly mounts) - # * acl (for enabling posix-ACLs) - # * worm (making the mount WORM - Write Once, Read Many type) - # * selinux (enable selinux on GlusterFS mount - mount { "${name}": - atboot => true, - ensure => $mounted_bool, - device => "${server}", - fstype => 'glusterfs', - options => "defaults,_netdev,${rw_bool}", # TODO: will $suid_bool work with gluster ? - dump => '0', # fs_freq: 0 to skip file system dumps - pass => '0', # fs_passno: 0 to skip fsck on boot - require => [ - Package[['glusterfs', 'glusterfs-fuse']], - File["${name}"], # the mountpoint - Exec['gluster-fuse'], # ensure fuse is loaded - ], - } + # TODO: will this work with gluster ? + #$suid_bool = $suid ? { + # true => 'suid', + # default => 'nosuid', + #} + + $mounted_bool = $mounted ? { + true => mounted, + default => unmounted, + } + + # make an empty directory for the mount point + file { "${name}": + ensure => directory, # make sure this is a directory + recurse => false, # don't recurse into directory + purge => false, # don't purge unmanaged files + force => false, # don't purge subdirs and links + } + + # Mount Options: + # * backupvolfile-server=server-name + # * fetch-attempts=N (where N is number of attempts) + # * log-level=loglevel + # * log-file=logfile + # * direct-io-mode=[enable|disable] + # * ro (for readonly mounts) + # * acl (for enabling posix-ACLs) + # * worm (making the mount WORM - Write Once, Read Many type) + # * selinux (enable selinux on GlusterFS mount + mount { "${name}": + atboot => true, + ensure => $mounted_bool, + device => "${server}", + fstype => 'glusterfs', + options => "defaults,_netdev,${rw_bool}", # TODO: will $suid_bool work with gluster ? + dump => '0', # fs_freq: 0 to skip file system dumps + pass => '0', # fs_passno: 0 to skip fsck on boot + require => [ + Package[['glusterfs', 'glusterfs-fuse']], + File["${name}"], # the mountpoint + Exec['gluster-fuse'], # ensure fuse is loaded + ], + } } |