-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.go
37 lines (35 loc) · 791 Bytes
/
user.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package goansible
type UserModuleArgs struct {
//name of the user to create, remove or modify.
Name string
//append user to groups,if false,remove them from all other groups.
Append bool
//description of user account
Comment string
//create user home directory
CreateHome bool `map:"create_home"`
Force bool
//user's primary group
Group string
//list of groups user will be added to,separate by commaparated
Groups string
//user home directory
Home string
//remove directories, same as `userdel --remove'
Remove bool
//user's shell
Shell string
State string
//UID
Uid int
}
func NewUserModule() *ModuleRunner {
return &ModuleRunner{
"user",
NewAdHocRunner(),
&UserModuleArgs{},
&ModuleAdHocOptions{},
&ConnectionOptions{},
&PrivilegeOptions{},
}
}