Sha256: e88c37c5192effbbef9853397e9e9a3ce2be429c094f5615e416b66d13e9d493

Contents?: true

Size: 708 Bytes

Versions: 24

Compression:

Stored size: 708 Bytes

Contents

require 'puppet/provider/nameservice/objectadd'

Puppet::Type.type(:group).provide :groupadd, :parent => Puppet::Provider::NameService::ObjectAdd do
  desc "Group management via `groupadd` and its ilk. The default for most platforms.

  "

  commands :add => "groupadd", :delete => "groupdel", :modify => "groupmod"

  has_feature :system_groups

  verify :gid, "GID must be an integer" do |value|
    value.is_a? Integer
  end

  def addcmd
    cmd = [command(:add)]
    if gid = @resource.should(:gid)
      unless gid == :absent
        cmd << flag(:gid) << gid
      end
    end
    cmd << "-o" if @resource.allowdupe?
    cmd << "-r" if @resource.system?
    cmd << @resource[:name]

    cmd
  end
end

Version data entries

24 entries across 24 versions & 3 rubygems

Version Path
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/provider/group/groupadd.rb
puppet-3.0.0.rc5 lib/puppet/provider/group/groupadd.rb
puppet-3.0.0.rc4 lib/puppet/provider/group/groupadd.rb
puppet-2.7.19 lib/puppet/provider/group/groupadd.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/group/groupadd.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/provider/group/groupadd.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/group/groupadd.rb
puppet-2.7.18 lib/puppet/provider/group/groupadd.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/group/groupadd.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/group/groupadd.rb
puppet-2.7.17 lib/puppet/provider/group/groupadd.rb
puppet-2.7.16 lib/puppet/provider/group/groupadd.rb
puppet-2.7.14 lib/puppet/provider/group/groupadd.rb
puppet-2.7.13 lib/puppet/provider/group/groupadd.rb
supply_drop-0.9.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/group/groupadd.rb
supply_drop-0.8.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/group/groupadd.rb
supply_drop-0.8.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/group/groupadd.rb
puppet-2.7.12 lib/puppet/provider/group/groupadd.rb
puppet-2.7.11 lib/puppet/provider/group/groupadd.rb
supply_drop-0.7.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/group/groupadd.rb