Ability to add/remove scheduled task

This commit is contained in:
Michael Perzel 2015-06-30 12:06:16 -05:00 committed by Matt Clay
commit 28164d2ae4
2 changed files with 146 additions and 31 deletions

View file

@ -1,8 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Peter Mounce <public@neverrunwithscissors.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
@ -32,20 +29,45 @@ options:
name:
description:
- Name of the scheduled task
- Supports * as wildcard
required: true
enabled:
description:
- State that the task should become
- Enable/disable the task
required: false
choices:
- yes
- no
default: yes
author: Peter Mounce
state:
description:
- State that the task should become
required: false
choices:
- present
- absent
execute:
description:
- Command the scheduled task should execute
required: false
frequency:
description:
- The frequency of the command
choices:
- daily
- weekly
required: false
time:
description:
- Time to execute scheduled task
required: false
path:
description:
- Folder path of scheduled task
default: '\'
required: false
'''
EXAMPLES = '''
# Disable the scheduled tasks with "WindowsUpdate" in their name
win_scheduled_task: name="*WindowsUpdate*" enabled=no
# 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
'''