Improve YAML examples - windows/win_user.py (#19401)
This commit is contained in:
parent
9b3d9e1780
commit
f57418c2c1
1 changed files with 11 additions and 14 deletions
|
@ -137,19 +137,16 @@ author:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Ad-hoc example
|
- name: Ensure user bob is present
|
||||||
$ ansible -i hosts -m win_user -a "name=bob password=Password12345 groups=Users" all
|
win_user:
|
||||||
$ ansible -i hosts -m win_user -a "name=bob state=absent" all
|
name: bob
|
||||||
|
password: B0bP4ssw0rd
|
||||||
|
state: present
|
||||||
|
groups:
|
||||||
|
- Users
|
||||||
|
|
||||||
# Playbook example
|
- name: Ensure user bob is absent
|
||||||
---
|
win_user:
|
||||||
- name: Add a user
|
name: bob
|
||||||
hosts: all
|
state: absent
|
||||||
gather_facts: false
|
|
||||||
tasks:
|
|
||||||
- name: Add User
|
|
||||||
win_user:
|
|
||||||
name: ansible
|
|
||||||
password: "@ns1bl3"
|
|
||||||
groups: ["Users"]
|
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue