now correctly picks up old become password host vars

pull/11510/head
Brian Coca 9 years ago
parent d74cf46778
commit a6aedbcc51

@ -165,8 +165,10 @@ class ConnectionInformation:
# backwards compat
self.sudo_exe = None
self.sudo_flags = None
self.sudo_pass = None
self.su_exe = None
self.su_flags = None
self.su_pass = None
# general flags (should we move out?)
self.verbosity = 0
@ -295,6 +297,13 @@ class ConnectionInformation:
if variable_name in variables:
setattr(new_info, attr, variables[variable_name])
# become legacy updates
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)
elif new_info.become_method == 'su' and new_info.su_pass:
setattr(new_info, 'become_pass', new_info.su_pass)
return new_info
def make_become_cmd(self, cmd, executable=C.DEFAULT_EXECUTABLE):

@ -1 +1 @@
Subproject commit abdd96ed1e966a290cdcdb4cb9f8d2a7c03ae59e
Subproject commit ff69ce7912e2cee53e6737e377853a49c0482b1c

@ -1 +1 @@
Subproject commit 195ef57bfb254e719aa7ea3a6ad30729e3036b87
Subproject commit 4e48ef9ecace3a6eb92e3e4d2ef1a3ea2b7e33ab
Loading…
Cancel
Save