add centrify dzdo escalation (#15219)

add dzdo context, and test
This commit is contained in:
Tegan Snyder 2016-04-25 10:24:26 -05:00 committed by Brian Coca
commit bf0da4aa3c
5 changed files with 19 additions and 8 deletions

View file

@ -530,6 +530,12 @@ class PlayContext(Base):
#FIXME: make shell independant
becomecmd = '%s %s echo %s && %s %s env ANSIBLE=true %s' % (exe, flags, success_key, exe, flags, cmd)
elif self.become_method == 'dzdo':
exe = self.become_exe or 'dzdo'
becomecmd = '%s -u %s %s -c %s' % (exe, self.become_user, executable, success_cmd)
else:
raise AnsibleError("Privilege escalation method not found: %s" % self.become_method)