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

Allows glusterfs-server version to be specified #17

Open
wants to merge 1 commit 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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ service to be running :
require => [ Exec['mkfs /dev/vg0/gv0'], File['/export/gv0'] ],
}
class { 'glusterfs::server':
peers => $::hostname ? {
peers => $::hostname ? {
'server1' => '192.168.0.2',
'server2' => '192.168.0.1',
},
# version sets ensure on the package - if not set it defaults to 'installed'
version => 'latest',
}
glusterfs::volume { 'gv0':
create_options => 'replica 2 192.168.0.1:/export/gv0 192.168.0.2:/export/gv0',
Expand Down
6 changes: 3 additions & 3 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
# }
#
class glusterfs::server (
$peers = []
$peers = [],
$version = 'installed'
) {

# Main package and service it provides
package { 'glusterfs-server': ensure => installed }
package { 'glusterfs-server': ensure => $version }
service { 'glusterd':
enable => true,
ensure => running,
Expand All @@ -31,4 +32,3 @@
glusterfs::peer { $peers: }

}