Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for glusterfs service on Debian #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
#
class glusterfs::client {

package { 'glusterfs-fuse': ensure => installed }
package { 'glusterfs-fuse':
ensure => installed,
name => $::osfamily ? {
debian => 'glusterfs-client',
default => 'glusterfs-fuse'
}
}

}

7 changes: 6 additions & 1 deletion manifests/peer.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
#
define glusterfs::peer () {

$peer_dir = $::osfamily ? {
debian => '/etc/glusterd/peers',
default => '/var/lib/glusterd/peers'
}

exec { "/usr/sbin/gluster peer probe ${title}":
unless => "/bin/egrep '^hostname.+=${title}$' /var/lib/glusterd/peers/*",
unless => "/bin/egrep '^hostname.+=${title}$' ${peer_dir}/*",
require => Service['glusterd'],
}

Expand Down
4 changes: 4 additions & 0 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
enable => true,
ensure => running,
hasstatus => true,
name => $::osfamily ? {
debian => 'glusterfs-server',
default => 'glusterd'
},
require => Package['glusterfs-server'],
}

Expand Down
7 changes: 6 additions & 1 deletion manifests/volume.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@
$create_options
) {

$vols_dir = $::osfamily ? {
debian => '/etc/glusterd/vols',
default => '/var/lib/glusterd/vols'
}

exec { "gluster volume create ${title}":
command => "/usr/sbin/gluster volume create ${title} ${create_options}",
creates => "/var/lib/glusterd/vols/${title}",
creates => "${vols_dir}/${title}",
require => Class['glusterfs::server'],
}

Expand Down