mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Native YAML - windows (#3602)
* Native YAML - windows * Fix baskslash * Sorry
This commit is contained in:
parent
684045a316
commit
d11a5bd492
3 changed files with 27 additions and 10 deletions
lib/ansible/modules/extras/windows
|
@ -42,7 +42,8 @@ EXAMPLES = '''
|
||||||
path: 'C:\Windows\System32\cmd.exe'
|
path: 'C:\Windows\System32\cmd.exe'
|
||||||
register: exe_file_version
|
register: exe_file_version
|
||||||
|
|
||||||
- debug: msg="{{exe_file_version}}"
|
- debug:
|
||||||
|
msg: '{{ exe_file_version }}'
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
|
@ -75,5 +75,14 @@ options:
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Create a scheduled task to open a command prompt
|
# Create a scheduled task to open a command prompt
|
||||||
win_scheduled_task: name="TaskName" execute="cmd" frequency="daily" time="9am" description="open command prompt" path="example" enable=yes state=present
|
- win_scheduled_task:
|
||||||
|
name: TaskName
|
||||||
|
execute: cmd
|
||||||
|
frequency: daily
|
||||||
|
time: 9am
|
||||||
|
description: open command prompt
|
||||||
|
path: example
|
||||||
|
enable: yes
|
||||||
|
state: present
|
||||||
|
user: SYSTEM
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -70,14 +70,21 @@ notes:
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Install all security, critical, and rollup updates
|
# Install all security, critical, and rollup updates
|
||||||
win_updates:
|
- win_updates:
|
||||||
category_names: ['SecurityUpdates','CriticalUpdates','UpdateRollups']
|
category_names:
|
||||||
|
- SecurityUpdates
|
||||||
|
- CriticalUpdates
|
||||||
|
- UpdateRollups
|
||||||
|
|
||||||
# Install only security updates
|
# Install only security updates
|
||||||
win_updates: category_names=SecurityUpdates
|
- win_updates:
|
||||||
|
category_names: SecurityUpdates
|
||||||
|
|
||||||
# Search-only, return list of found updates (if any), log to c:\ansible_wu.txt
|
# Search-only, return list of found updates (if any), log to c:\ansible_wu.txt
|
||||||
win_updates: category_names=SecurityUpdates state=searched log_path=c:/ansible_wu.txt
|
- win_updates:
|
||||||
|
category_names: SecurityUpdates
|
||||||
|
state: searched
|
||||||
|
log_path: c:\ansible_wu.txt
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
Loading…
Reference in a new issue