mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Move playbook for user commands into examples dir
This commit is contained in:
25
examples/playbooks/user_commands.yml
Normal file
25
examples/playbooks/user_commands.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
# 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 gid=100 shell=/sbin/nologin createhome=no
|
||||
|
||||
- name: test user account modification
|
||||
action: user name=tset comment=NyetUser
|
||||
|
||||
- name: test user account password change
|
||||
action: user name=tset password=$password
|
||||
|
||||
- name: test user account modification
|
||||
action: user name=tset state=absent
|
||||
Reference in New Issue
Block a user