Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit.

  • Loading branch information...
commit 9989d85cde644903b2f8da900fa07f55442019d6 0 parents
@kbarber kbarber authored
1  .gitignore
@@ -0,0 +1 @@
+pkg/
17 LICENSE
@@ -0,0 +1,17 @@
+Puppet OpenNebula Module - Puppet module for managing OpenNebula
+
+Copyright (C) 2011 Puppet Labs Inc
+
+Puppet Labs can be contacted at: info@puppetlabs.com
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
8 Modulefile
@@ -0,0 +1,8 @@
+name 'puppetlabs-kvm'
+version '0.0.1'
+source 'git://github.com/puppetlabs/puppetlabs-kvm.git'
+author 'puppetlabs'
+license 'ASL 2.0'
+summary 'KVM Module'
+description 'Manages installation and configuration of KVM'
+project_page 'https://github.com/puppetlabs/puppetlabs-kvm'
9 README.markdown
@@ -0,0 +1,9 @@
+# KVM Module
+
+This module installs and configures Linux KVM.
+
+# Quick Start
+
+ node "kvm1" {
+ class { "kvm": }
+ }
37 manifests/init.pp
@@ -0,0 +1,37 @@
+# Install and configure KVM user space tools such as qemu-kvm.
+#
+# == Parameters
+#
+# [qemu_package]
+# *Optional* Specify qemu-kvm package name to install.
+# [qemu_version]
+# *Optional* Specify qemu-kvm version to install.
+#
+# == Variables
+#
+# N/A
+#
+# == Examples
+#
+# class { 'kvm': }
+#
+# == Authors
+#
+# Ken Barber <ken@bob.sh>
+#
+# == Copyright
+#
+# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
+#
+class kvm (
+
+ $qemu_package = $kvm::params::qemu_package,
+ $qemu_version = $kvm::params::qemu_version
+
+ ) inherits kvm::params {
+
+ package { $qemu_package:
+ ensure => $qemu_version,
+ }
+
+}
37 manifests/params.pp
@@ -0,0 +1,37 @@
+# KVM parameter class. Not to be used directly.
+#
+# == OS Support
+#
+# * Debian 7.0 (wheezy)
+# * Ubuntu
+#
+# == Variables
+#
+# This is a list of variables that must be set for each operating system.
+#
+# [qemu_package]
+# Package(s) for installing qemu-kvm.
+# [qemu_version]
+# Version for qemu-kvm tool.
+#
+# == Authors
+#
+# Ken Barber <ken@bob.sh>
+#
+# == Copyright
+#
+# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
+#
+class kvm::params {
+
+ case $operatingsystem {
+ 'ubuntu', 'debian': {
+ $qemu_package = "qemu-kvm"
+ $qemu_version = "installed"
+ }
+ default : {
+ fail("Operating system ${operatingsystem} is not supported")
+ }
+ }
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.