Sha256: 0dadd75aa85b074934bb177d6eeae3ab7ce6f7f9b2d1d4102ebf305b522c2cba

Contents?: true

Size: 973 Bytes

Versions: 21

Compression:

Stored size: 973 Bytes

Contents

# HP-UX packaging.

require 'puppet/provider/package'

Puppet::Type.type(:package).provide :hpux, :parent => Puppet::Provider::Package do

  desc "HP-UX's packaging system."

  commands :swinstall => "/usr/sbin/swinstall",
    :swlist => "/usr/sbin/swlist",
    :swremove => "/usr/sbin/swremove"

  confine :operatingsystem => "hp-ux"

  defaultfor :operatingsystem => "hp-ux"

  def self.instances
    # TODO:  This is very hard on HP-UX!
    []
  end

  # source and name are required
  def install
    raise ArgumentError, "source must be provided to install HP-UX packages" unless resource[:source]
    args = standard_args + ["-s", resource[:source], resource[:name]]
    swinstall(*args)
  end

  def query
      swlist resource[:name]
      {:ensure => :present}
  rescue
      {:ensure => :absent}
  end

  def uninstall
    args = standard_args + [resource[:name]]
    swremove(*args)
  end

  def standard_args
    ["-x", "mount_all_filesystems=false"]
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
puppet-2.6.18 lib/puppet/provider/package/hpux.rb
puppet-2.6.17 lib/puppet/provider/package/hpux.rb
puppet-2.6.16 lib/puppet/provider/package/hpux.rb
puppet-2.6.15 lib/puppet/provider/package/hpux.rb
puppet-2.6.14 lib/puppet/provider/package/hpux.rb
puppet-2.6.13 lib/puppet/provider/package/hpux.rb
puppet-2.6.12 lib/puppet/provider/package/hpux.rb
puppet-2.6.11 lib/puppet/provider/package/hpux.rb
puppet-2.6.10 lib/puppet/provider/package/hpux.rb
puppet-2.7.3 lib/puppet/provider/package/hpux.rb
puppet-2.7.1 lib/puppet/provider/package/hpux.rb
puppet-2.6.9 lib/puppet/provider/package/hpux.rb
puppet-2.6.8 lib/puppet/provider/package/hpux.rb
puppet-2.6.7 lib/puppet/provider/package/hpux.rb
puppet-2.6.6 lib/puppet/provider/package/hpux.rb
puppet-2.6.5 lib/puppet/provider/package/hpux.rb
puppet-2.6.4 lib/puppet/provider/package/hpux.rb
puppet-2.6.3 lib/puppet/provider/package/hpux.rb
puppet-2.6.2 lib/puppet/provider/package/hpux.rb
puppet-2.6.1 lib/puppet/provider/package/hpux.rb