Fix undefined variables, basestring usage, and some associated python3 issues

This commit is contained in:
Toshio Kuratomi 2017-07-22 18:15:46 -07:00
parent 9f7b0dfc30
commit 225fa5d092
84 changed files with 652 additions and 963 deletions

View file

@ -319,6 +319,10 @@ class PlayContext(Base):
'''
Sets attributes from the task if they are set, which will override
those from the play.
:arg task: the task object with the parameters that were set on it
:arg variables: variables from inventory
:arg templar: templar instance if templating variables is needed
'''
new_info = self.copy()
@ -403,9 +407,9 @@ class PlayContext(Base):
# become legacy updates -- from commandline
if not new_info.become_pass:
if new_info.become_method == 'sudo' and new_info.sudo_pass:
setattr(new_info, 'become_pass', new_info.sudo_pass)
new_info.become_pass = new_info.sudo_pass
elif new_info.become_method == 'su' and new_info.su_pass:
setattr(new_info, 'become_pass', new_info.su_pass)
new_info.become_pass = new_info.su_pass
# become legacy updates -- from inventory file (inventory overrides
# commandline)