Created
May 7, 2013 18:32
-
-
Save coderforhire/5534943 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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