[iyunv@sh-web1 ~]# puppet apply groupmeng.pp
Notice: Compiled catalog for sh-web1.localdomain in environment production in 0.06 seconds
Notice: /Stage[main]/Main/Group[meng]/ensure: created
Notice: Finished catalog run in 0.08 seconds
The members of the group. For platforms or directory services where group membership is stored in the group objects, not the users. This parameter’s behavior can be configured with auth_membership.
members参数:组成员存储在某个平台或者目录服务的组对象中,需要参数auth_membership.
1
2
3
4
5
6
7
[iyunv@sh-web1 ~]# cat groupmeng.pp
group {'meng':
ensure => present,
gid => '5560',
auth_membership => yes,
members => ['wangwu','lisi'],
}
1
2
3
4
5
6
7
8
[iyunv@sh-web1 ~]# puppet apply groupmeng.pp
Notice: Compiled catalog for sh-web1.localdomain in environment production in 0.06 seconds
Notice: /Stage[main]/Main/Group[meng]/ensure: created
Notice: Finished catalog run in 0.05 seconds
[iyunv@sh-web1 ~]# cat /etc/group
group group-
[iyunv@sh-web1 ~]# cat /etc/group | grep meng
meng:x:5560: