Add kickstart.user functions

This commit is contained in:
Bruno Tavares
2014-02-22 16:48:09 -03:00
parent 7ca421e645
commit d4ad417027
5 changed files with 54 additions and 1 deletions

View File

@ -0,0 +1,14 @@
# kickstart.print_with_separator separator [arguments...]
Print the list of `arguments` separated by `separator`
### Example
```bash
$ kickstart.print_with_separator , a b c
a,b,c
$ kickstart.print_with_separator '|' a b c
a|b|c
```

View File

@ -0,0 +1,12 @@
# kickstart.user.is_on_group user group
Return 0 if `user` is on `group`, and 1 if not.
### Example
```bash
$ kickstart.user.is_on_group vagrant vagrant && echo yup
yup
$ kickstart.user.is_on_group vagrant no_group || echo nope
nope
```

View File

@ -0,0 +1,8 @@
# kickstart.user.remove_group user group
Check if `user` is part of `group` and remove it from `group`
### Example
```bash
$ kickstart.user.remove_group vagrant admin
```