CentOS Stream 9
Sponsored Link

Puppet : How to use [group Resource]2023/10/17

 

This is the examples for [group] resource.

[1] It manages the configuration to keep [testgroup] group exists.
[root@dlp ~]#
vi /etc/puppetlabs/code/environments/production/manifests/group01.pp
group { 'testgroup': ensure => present }
[2] It specifies GID explicitly.
[root@dlp ~]#
vi /etc/puppetlabs/code/environments/production/manifests/group01.pp
group { 'testgroup':
  ensure => present,
  gid    => 2000,
}
[3] It manages the configuration to keep [testgroup] group does not exist. (If exists, it is deleted.)
[root@dlp ~]#
vi /etc/puppetlabs/code/environments/production/manifests/group01.pp
group { 'testgroup': ensure => absent }
Matched Content