Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
4707e3a4
Commit
4707e3a4
authored
Nov 14, 2013
by
jctanner
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4895 from nextus/cron
Fix: absent state removing whole cron.d file instead of specific job
parents
91e55693
17cbbcdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
library/system/cron
+4
-1
No files found.
library/system/cron
View file @
4707e3a4
...
...
@@ -455,6 +455,9 @@ def main():
if
job
is
None
and
do_install
:
module
.
fail_json
(
msg
=
"You must specify 'job' to install a new cron job"
)
if
job
and
name
is
None
and
not
do_install
:
module
.
fail_json
(
msg
=
"You must specify 'name' to remove a cron job"
)
if
reboot
:
if
special_time
:
module
.
fail_json
(
msg
=
"reboot and special_time are mutually exclusive"
)
...
...
@@ -466,7 +469,7 @@ def main():
(
backuph
,
backup_file
)
=
tempfile
.
mkstemp
(
prefix
=
'crontab'
)
crontab
.
write
(
backup_file
)
if
crontab
.
cron_file
and
not
do_install
:
if
crontab
.
cron_file
and
not
name
and
not
do_install
:
changed
=
crontab
.
remove_job_file
()
module
.
exit_json
(
changed
=
changed
,
cron_file
=
cron_file
,
state
=
state
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment