Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Include glusterfs-api package for client and server.
Browse files Browse the repository at this point in the history
In the future this package should only be pulled in when a known
dependency tells puppet-gluster that it needs it. For now it's fine.
In any case, this is Mostly Harmless (tm).
  • Loading branch information
purpleidea committed Apr 10, 2014
1 parent b0f645e commit b948c83
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
39 changes: 39 additions & 0 deletions manifests/api.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# GlusterFS module by James
# Copyright (C) 2010-2013+ James Shubin
# Written by James Shubin <james@shubin.ca>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

class gluster::api(
$repo = true, # are we using the automatic repo ?
$version = '' # pick a specific version (defaults to latest)
) {
$rname = "${version}" ? {
'' => 'gluster',
default => "gluster-${version}",
}

package { 'glusterfs-api':
ensure => "${version}" ? {
'' => present,
default => "${version}",
},
require => $repo ? {
false => undef,
default => Gluster::Repo["${rname}"],
},
}
}

# vim: ts=8
7 changes: 7 additions & 0 deletions manifests/mount/base.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,19 @@
'' => present,
default => "${version}",
},
before => Package['glusterfs-api'],
require => $repo ? {
false => undef,
default => Gluster::Repo["${rname}"],
},
}

$api_params = {
'repo' => $repo,
'version' => "${version}",
}
ensure_resource('class', 'gluster::api', $api_params)

# FIXME: choose a reliable and correct way to ensure fuse is loaded
# dmesg | grep -i fuse
# modprobe fuse
Expand Down
7 changes: 7 additions & 0 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,19 @@
'' => present,
default => "${version}",
},
before => Package['glusterfs-api'],
require => $repo ? {
false => undef,
default => Gluster::Repo["${rname}"],
},
}

$api_params = {
'repo' => $repo,
'version' => "${version}",
}
ensure_resource('class', 'gluster::api', $api_params)

# NOTE: not that we necessarily manage anything in here at the moment...
file { '/etc/glusterfs/':
ensure => directory, # make sure this is a directory
Expand Down

0 comments on commit b948c83

Please sign in to comment.