From f57418c2c1361491129731785fd7350d5c8faa85 Mon Sep 17 00:00:00 2001 From: Fabio Alessandro Locati Date: Thu, 15 Dec 2016 23:56:04 +0100 Subject: [PATCH] Improve YAML examples - windows/win_user.py (#19401) --- lib/ansible/modules/windows/win_user.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/lib/ansible/modules/windows/win_user.py b/lib/ansible/modules/windows/win_user.py index 3158208db6f..882d060e901 100644 --- a/lib/ansible/modules/windows/win_user.py +++ b/lib/ansible/modules/windows/win_user.py @@ -137,19 +137,16 @@ author: ''' EXAMPLES = ''' -# Ad-hoc example -$ ansible -i hosts -m win_user -a "name=bob password=Password12345 groups=Users" all -$ ansible -i hosts -m win_user -a "name=bob state=absent" all +- name: Ensure user bob is present + win_user: + name: bob + password: B0bP4ssw0rd + state: present + groups: + - Users -# Playbook example ---- -- name: Add a user - hosts: all - gather_facts: false - tasks: - - name: Add User - win_user: - name: ansible - password: "@ns1bl3" - groups: ["Users"] +- name: Ensure user bob is absent + win_user: + name: bob + state: absent '''