Class: Wright::Provider::Group
- Inherits:
-
Wright::Provider
- Object
- Wright::Provider
- Wright::Provider::Group
- Defined in:
- lib/wright/provider/group.rb,
lib/wright/provider/group/gnu_passwd.rb,
lib/wright/provider/group/darwin_directory_service.rb more...
Overview
Group provider. Used as a base class for Resource::Group providers.
Direct Known Subclasses
Defined Under Namespace
Classes: DarwinDirectoryService, GnuPasswd
Constant Summary
Constants inherited from Wright::Provider
Instance Method Summary collapse
-
#create ⇒ void
Creates or updates the group.
-
#remove ⇒ void
Removes the group.
Methods inherited from Wright::Provider
Constructor Details
This class inherits a constructor from Wright::Provider
Instance Method Details
permalink #create ⇒ void
This method returns an undefined value.
Creates or updates the group.
12 13 14 15 16 17 18 19 |
# File 'lib/wright/provider/group.rb', line 12 def create unless_uptodate(:create, "group already created: '#{group_name}'") do unless_dry_run("create group: '#{group_name}'") do ensure_group_exists set_members unless members_uptodate? end end end |
permalink #remove ⇒ void
This method returns an undefined value.
Removes the group.
24 25 26 27 28 29 30 |
# File 'lib/wright/provider/group.rb', line 24 def remove unless_uptodate(:remove, "group already removed: '#{group_name}'") do unless_dry_run("remove group: '#{group_name}'") do remove_group end end end |