Sha256: a31ebd84680508c950fb869e4edb4a54fe0a1f2b049f30d07249d2140233cdcb

Contents?: true

Size: 986 Bytes

Versions: 28

Compression:

Stored size: 986 Bytes

Contents

=begin rdoc
== Group

The group resource ensures there is a group created on the nodes

== Usage

  has_group(:name => '...') do
    # More options. 
    # This block is optional
  end

== Options

* <tt>name</tt> Name of the service to be running
* <tt>gid</tt> gid of the user
* <tt>members</tt> Members that belong in the group

== Examples

  has_group "admins"
=end
module PoolParty
  module Resources
    
    class Group < Resource
      
      default_options(
        :action   => :create,
        :gid      => nil,
        :members  => nil,
        :append   => false
      )
      
      def print_to_chef
        str = "group \"<%= name %>\" do\n   action :<%= (action ? action : (exists ? :create : :remove)) %>"
        str << "  gid <%= print_variable(gid) %>\n" if gid
        str << "  members <%= print_variable(members) %>\n" if members
        str << "  append <%= print_variable(append) %>\n" if append
        str << "\nend"
      end
      
    end
    
  end
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 lib/poolparty/resources/group.rb
auser-poolparty-1.3.1 lib/poolparty/resources/group.rb
auser-poolparty-1.3.10 lib/poolparty/resources/group.rb
auser-poolparty-1.3.11 lib/poolparty/resources/group.rb
auser-poolparty-1.3.12 lib/poolparty/resources/group.rb
auser-poolparty-1.3.13 lib/poolparty/resources/group.rb
auser-poolparty-1.3.14 lib/poolparty/resources/group.rb
auser-poolparty-1.3.15 lib/poolparty/resources/group.rb
auser-poolparty-1.3.16 lib/poolparty/resources/group.rb
auser-poolparty-1.3.17 lib/poolparty/resources/group.rb
auser-poolparty-1.3.2 lib/poolparty/resources/group.rb
auser-poolparty-1.3.3 lib/poolparty/resources/group.rb
auser-poolparty-1.3.4 lib/poolparty/resources/group.rb
auser-poolparty-1.3.5 lib/poolparty/resources/group.rb
auser-poolparty-1.3.6 lib/poolparty/resources/group.rb
auser-poolparty-1.3.7 lib/poolparty/resources/group.rb
auser-poolparty-1.3.8 lib/poolparty/resources/group.rb
fairchild-poolparty-1.3.17 lib/poolparty/resources/group.rb
fairchild-poolparty-1.3.5 lib/poolparty/resources/group.rb
poolparty-1.3.15 lib/poolparty/resources/group.rb