group?
Determine if a gid or group name is a group in ruby
Basic Usage
require 'kanrisuru'
host = Kanrisuru::Remote::Host.new(host: '127.0.1.1', username: 'ubuntu', keys: ['~/.ssh/id_rsa'])
host.group?('ubuntu')
true
host.group?('centos')
false
host.group?(0)
true
Parameters
Field | Type | Description |
---|---|---|
group |
string
integer
|
Required name / gid of the group to determine if it exists on the remote host. |
Tested On
- Ubuntu, Debian, Centos, Fedora, Redhat, OpenSuse, SLES