mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Fix undefined variables, basestring usage, and some associated python3 issues
This commit is contained in:
parent
9f7b0dfc30
commit
225fa5d092
84 changed files with 652 additions and 963 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue