View | Details | Raw Unified | Return to bug 209789 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	ansible
4
PORTNAME=	ansible
5
PORTVERSION?=	2.0.2.0
5
PORTVERSION?=	2.0.2.0
6
PORTREVISION?=	1
6
PORTREVISION?=	2
7
CATEGORIES=	sysutils python
7
CATEGORIES=	sysutils python
8
MASTER_SITES=	http://releases.ansible.com/ansible/
8
MASTER_SITES=	http://releases.ansible.com/ansible/
9
9
(-)files/patch-cron.py (+29 lines)
Line 0 Link Here
1
commit b5e012b47fa9e242a38c3f66678aa2f47946a9c9
2
Author: Dmitry Marakasov <amdmi3@amdmi3.ru>
3
Date:   Thu May 26 17:37:28 2016 +0300
4
5
    Fix crontab argument order for writing
6
    
7
    Currently, when writing user's crontab, ansible calls
8
    
9
        crontab <file> -u <user>
10
    
11
    This is incorrect according to crontab(1) on both FreeBSD and Linux,
12
    which suggest that file argument should be the last.
13
    
14
    At least on FreeBSD, this leads to incorrect cron module bahavior which
15
    writes to root's crontab instead of users's
16
17
diff --git system/cron.py system/cron.py
18
index ab97606..b9f0940 100644
19
--- lib/ansible/modules/core/system/cron.py
20
+++ lib/ansible/modules/core/system/cron.py
21
@@ -488,7 +488,7 @@ class CronTab(object):
22
                 return "chown %s %s ; su '%s' -c '%s %s'" % (pipes.quote(self.user), pipes.quote(path), pipes.quote(self.user), CRONCMD, pipes.quote(path))
23
             else:
24
                 user = '-u %s' % pipes.quote(self.user)
25
-        return "%s %s %s" % (CRONCMD , pipes.quote(path), user)
26
+        return "%s %s %s" % (CRONCMD , user, pipes.quote(path))
27
 
28
 
29
 

Return to bug 209789