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

Commit

Permalink
Add Debian/Ubuntu specific packaging changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
purpleidea committed May 7, 2014
1 parent 9722c05 commit e1d3c37
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 18 deletions.
4 changes: 3 additions & 1 deletion data/tree/Debian.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# gluster/data/tree/Debian.yaml
---

gluster::params::package_glusterfs: 'glusterfs-client'
gluster::params::package_glusterfs_api: '' # doesn't exist
gluster::params::package_glusterfs_fuse: '' # doesn't exist
# vim: ts=8
21 changes: 12 additions & 9 deletions manifests/api.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@
default => "gluster-${version}",
}

package { "${::gluster::params::package_glusterfs_api}":
ensure => "${version}" ? {
'' => present,
default => "${version}",
},
require => $repo ? {
false => undef,
default => Gluster::Repo["${rname}"],
},
# certain packages don't exist on certain operating systems
if "${::gluster::params::package_glusterfs_api}" != '' {
package { "${::gluster::params::package_glusterfs_api}":
ensure => "${version}" ? {
'' => present,
default => "${version}",
},
require => $repo ? {
false => undef,
default => Gluster::Repo["${rname}"],
},
}
}
}

Expand Down
12 changes: 8 additions & 4 deletions manifests/mount.pp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@
alias => "${short_name}", # don't allow duplicates name's
}

$packages = "${::gluster::params::package_glusterfs_fuse}" ? {
'' => ["${::gluster::params::package_glusterfs}"],
default => [
"${::gluster::params::package_glusterfs}",
"${::gluster::params::package_glusterfs_fuse}",
],
}
# Mount Options:
# * backupvolfile-server=server-name
# * fetch-attempts=N (where N is number of attempts)
Expand All @@ -163,10 +170,7 @@
dump => '0', # fs_freq: 0 to skip file system dumps
pass => '0', # fs_passno: 0 to skip fsck on boot
require => [
Package[
["${::gluster::params::package_glusterfs}",
"${::gluster::params::package_glusterfs_fuse}"]
],
Package[$packages],
File["${long_name}"], # the mountpoint
Exec['gluster-fuse'], # ensure fuse is loaded!
],
Expand Down
15 changes: 12 additions & 3 deletions manifests/mount/base.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,22 @@
ensure_resource('gluster::repo', "${rname}", $params)
}

package { ["${::gluster::params::package_glusterfs}",
"${::gluster::params::package_glusterfs_fuse}"]:
$packages = "${::gluster::params::package_glusterfs_fuse}" ? {
'' => ["${::gluster::params::package_glusterfs}"],
default => [
"${::gluster::params::package_glusterfs}",
"${::gluster::params::package_glusterfs_fuse}",
],
}
package { $packages:
ensure => "${version}" ? {
'' => present,
default => "${version}",
},
before => Package["${::gluster::params::package_glusterfs_api}"],
before => "${::gluster::params::package_glusterfs_api}" ? {
'' => undef,
default => Package["${::gluster::params::package_glusterfs_api}"],
},
require => $repo ? {
false => undef,
default => Gluster::Repo["${rname}"],
Expand Down
5 changes: 4 additions & 1 deletion manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@
'' => present,
default => "${version}",
},
before => Package["${::gluster::params::package_glusterfs_api}"],
before => "${::gluster::params::package_glusterfs_api}" ? {
'' => undef,
default => Package["${::gluster::params::package_glusterfs_api}"],
},
require => $repo ? {
false => undef,
default => Gluster::Repo["${rname}"],
Expand Down

0 comments on commit e1d3c37

Please sign in to comment.