Sha256: 9f28a573cda0ae768494d3d7b734c0cabaf0a236689d8a4ad0e1f682414bc72f

Contents?: true

Size: 1.15 KB

Versions: 24

Compression:

Stored size: 1.15 KB

Contents

require 'puppet/provider/package'
require 'puppet/util/package'

Puppet::Type.type(:package).provide :nim, :parent => :aix, :source => :aix do
  desc "Installation from NIM LPP source"

  # The commands we are using on an AIX box are installed standard
  # (except nimclient) nimclient needs the bos.sysmgt.nim.client fileset.
  commands    :nimclient => "/usr/sbin/nimclient"

  # If NIM has not been configured, /etc/niminfo will not be present.
  # However, we have no way of knowing if the NIM server is not configured
  # properly.
  confine  :exists => "/etc/niminfo"

  has_feature :versionable

  attr_accessor :latest_info

  def self.srclistcmd(source)
    [ command(:nimclient), "-o", "showres", "-a", "installp_flags=L", "-a", "resource=#{source}" ]
  end

  def install(useversion = true)
    unless source = @resource[:source]
      self.fail "An LPP source location is required in 'source'"
    end

    pkg = @resource[:name]

    pkg << " " << @resource.should(:ensure) if (! @resource.should(:ensure).is_a? Symbol) and useversion

    nimclient "-o", "cust", "-a", "installp_flags=acgwXY", "-a", "lpp_source=#{source}", "-a", "filesets='#{pkg}'"
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
puppet-2.6.18 lib/puppet/provider/package/nim.rb
puppet-2.6.17 lib/puppet/provider/package/nim.rb
puppet-2.6.16 lib/puppet/provider/package/nim.rb
puppet-2.6.15 lib/puppet/provider/package/nim.rb
puppet-2.6.14 lib/puppet/provider/package/nim.rb
puppet-2.6.13 lib/puppet/provider/package/nim.rb
puppet-2.7.6 lib/puppet/provider/package/nim.rb
puppet-2.6.12 lib/puppet/provider/package/nim.rb
puppet-2.7.5 lib/puppet/provider/package/nim.rb
puppet-2.6.11 lib/puppet/provider/package/nim.rb
puppet-2.7.4 lib/puppet/provider/package/nim.rb
puppet-2.6.10 lib/puppet/provider/package/nim.rb
puppet-2.7.3 lib/puppet/provider/package/nim.rb
puppet-2.7.1 lib/puppet/provider/package/nim.rb
puppet-2.6.9 lib/puppet/provider/package/nim.rb
puppet-2.6.8 lib/puppet/provider/package/nim.rb
puppet-2.6.7 lib/puppet/provider/package/nim.rb
puppet-2.6.6 lib/puppet/provider/package/nim.rb
puppet-2.6.5 lib/puppet/provider/package/nim.rb
puppet-2.6.4 lib/puppet/provider/package/nim.rb