mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
8592b3b40d
This changes the gid option to group. One may provide a primary group as either a gid or a name. The module will then check to verify that the group already exists. If the group does not already exist, the module will fail.
23 lines
798 B
YAML
23 lines
798 B
YAML
---
|
|
# this is a demo of how the user commands work and how to reference salted passwords
|
|
# in vars sections. You could also use vars_files if you like (see other examples)
|
|
|
|
- hosts: all
|
|
user: root
|
|
vars:
|
|
# created with:
|
|
# crypt.crypt('This is my Password', '$1$SomeSalt')
|
|
password: $1$SomeSalt$UqddPX3r4kH3UL5jq5/ZI.
|
|
|
|
tasks:
|
|
|
|
# Walk through account creation, modification, and deletion
|
|
- name: test basic user account creation
|
|
action: user name=tset comment=TsetUser group=100 shell=/sbin/nologin createhome=no
|
|
|
|
# the following is just a simple example of how you don't have to include
|
|
# the 'name' element for each task
|
|
|
|
- action: user name=tset comment=NyetUser
|
|
- action: user name=tset password=$password
|
|
- action: user name=tset state=absent
|