mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Merge branch 'devel' of https://github.com/tgolly/ansible into tgolly-devel
This commit is contained in:
@@ -354,6 +354,8 @@ class CronTab(object):
|
||||
return "su %s -c '%s -l'" % (pipes.quote(self.user), pipes.quote(CRONCMD))
|
||||
elif platform.system() == 'AIX':
|
||||
return "%s -l %s" % (pipes.quote(CRONCMD), pipes.quote(self.user))
|
||||
elif platform.system() == 'HP-UX':
|
||||
return "%s %s %s" % (CRONCMD , '-l', pipes.quote(self.user))
|
||||
else:
|
||||
user = '-u %s' % pipes.quote(self.user)
|
||||
return "%s %s %s" % (CRONCMD , user, '-l')
|
||||
@@ -364,7 +366,7 @@ class CronTab(object):
|
||||
"""
|
||||
user = ''
|
||||
if self.user:
|
||||
if platform.system() in [ 'SunOS', 'AIX' ]:
|
||||
if platform.system() in ['SunOS', 'HP-UX', 'AIX']:
|
||||
return "chown %s %s ; su '%s' -c '%s %s'" % (pipes.quote(self.user), pipes.quote(path), pipes.quote(self.user), CRONCMD, pipes.quote(path))
|
||||
else:
|
||||
user = '-u %s' % pipes.quote(self.user)
|
||||
|
||||
Reference in New Issue
Block a user