Skip to content

Instantly share code, notes, and snippets.

@coderforhire
Created May 7, 2013 18:32
Show Gist options
  • Save coderforhire/5534943 to your computer and use it in GitHub Desktop.
Save coderforhire/5534943 to your computer and use it in GitHub Desktop.
require 'puppet/util/package'
Puppet::Type.type(:xpack).provide(:yum) do
desc "Installation of Exegy specific packages."
has_feature :versionable
commands :yum => "yum", :rpm => "rpm", :python => "python"
def exists?
Puppet.info("#{package_list}")
begin
rpm('-q', resource[:package_list])
rescue Puppet::ExecutionFailure => e
false
end
end
def create
end
def destroy
end
def install
end
def latest
end
def purge
end
end
Puppet::Type.newtype(:xpack) do
ensurable
newparam(:name, :namevar => true) do
desc 'list of packages to install'
end
newproperty(:version) do
end
newproperty(:package_list) do
end
end
~
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment