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

Update to reflect the upstream repositories and package renaming #16

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
4 changes: 3 additions & 1 deletion manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#
class glusterfs::client {

package { 'glusterfs-fuse': ensure => installed }
package { 'glusterfs-client': ensure => installed,
require => Class['glusterfs']
}

}

75 changes: 75 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# == Class: glusterfs
#
# Sets up basic packaging for Debian
#
# === Parameters
#
# [*major*]
# major version for glusterfs
# [*minor*]
# minor version for glusterfs
# [*release*]
# release number
# [*gpg_key_id*]
# optional GPG key ID
#
# === Examples
#
# class { 'glusterfs':
# $major => '3',
# $minor => '7',
# $release => '6',
# }
#
# === Authors
#
# Braiins Systems s.r.o.
#
# === Copyright
#
# Copyright 2016 Braiins Systems s.r.o.
#
class glusterfs (
$major,
$minor,
$release,
$gpg_key_id='A4703C37D3F4DE7F1819E980FE79BB52D5DC52DC',
) {

$maj_min = "${major}.${minor}"
$download_host = 'download.gluster.org'
$url_base = "https://${download_host}/pub/gluster/glusterfs/old-releases/${maj_min}/${maj_min}.${release}"
# GFS bug: https://github.com/gluster/glusterfs-debian/issues/11
$ensure = $lsbdistcodename ? {
'stretch' => absent,
default => present,
}

# Temp workaround for broken SSL cert: https://github.com/gluster/glusterfs-debian/issues/4
# fixed on 2017-07-11, since then present with "absent" to remove the file from all hosts
file { '/etc/apt/apt.conf.d/80glusterignorecert':
mode => '0644',
content => "Acquire::https::${download_host}::Verify-Peer \"false\";\n",
ensure => $lsbdistcodename ? {
default => absent,
# 'wheezy' => present # They fixed that already
}
} ->
apt::key { $gpg_key_id:
key_source => "${url_base}/pub.key",
ensure => $ensure,
} ->
apt::source { 'gluster':
location => "${url_base}/Debian/${lsbdistcodename}/apt",
release => $lsbdistcodename,
repos => 'main',
include_src => false,
ensure => $ensure,
}
apt::pin { 'gluster':
priority => '700',
packages => 'gluster*',
origin => $download_host,
ensure => $ensure,
}
}
2 changes: 1 addition & 1 deletion manifests/mount.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
device => $device,
fstype => 'glusterfs',
options => $options,
require => Package['glusterfs-fuse'],
require => Package['glusterfs-client'],
}

}
Expand Down