Sha256: 7450b32c6b39e35e56eb7af2c9678c57eb2be5663acfd020d4184d729b3a9726
Contents?: true
Size: 936 Bytes
Versions: 11
Compression:
Stored size: 936 Bytes
Contents
module Sprinkle module Installers class Group < Installer # The user installer helps add groups. You may pass flags as an option. # # == Example Usage # # package :users do # add_group 'webguys', :flags => "--shell /usr/bin/zsh" # # verify do # has_group 'webguys' # end # end api do def add_group(group, options={}, &block) install Group.new(self, group, options, &block) end end verify_api do def has_group(group) @commands << "id -g #{group}" end end def initialize(package, groupname, options, &block) #:nodoc: super package, options, &block @groupname = groupname end protected def install_commands #:nodoc: "addgroup #{@options[:flags]} #{@groupname}" end end end end
Version data entries
11 entries across 11 versions & 1 rubygems