@ -528,19 +528,13 @@ class PlayContext(Base):
command = success_cmd
command = success_cmd
# set executable to use for the privilege escalation method, with various overrides
# set executable to use for the privilege escalation method, with various overrides
exe = self . become_method
exe = self . become_exe or getattr ( self , ' %s _exe ' % self . become_method , self . become_method )
for myexe in ( getattr ( self , ' %s _exe ' % self . become_method , None ) , self . become_exe ) :
if myexe :
exe = myexe
break
# set flags to use for the privilege escalation method, with various overrides
# set flags to use for the privilege escalation method, with various overrides
flags = ' '
flags = self . become_flags or getattr ( self , ' %s _flags ' % self . become_method , ' ' )
for myflag in ( getattr ( self , ' %s _flags ' % self . become_method , None ) , self . become_flags ) :
if myflag is not None :
flags = myflag
break
print ( exe )
print ( flags )
if self . become_method == ' sudo ' :
if self . become_method == ' sudo ' :
# If we have a password, we run sudo with a randomly-generated
# If we have a password, we run sudo with a randomly-generated
# prompt set using -p. Otherwise we run it with default -n, which makes
# prompt set using -p. Otherwise we run it with default -n, which makes