|
|
@ -161,6 +161,7 @@ class PlayContext(Base):
|
|
|
|
_private_key_file = FieldAttribute(isa='string', default=C.DEFAULT_PRIVATE_KEY_FILE)
|
|
|
|
_private_key_file = FieldAttribute(isa='string', default=C.DEFAULT_PRIVATE_KEY_FILE)
|
|
|
|
_timeout = FieldAttribute(isa='int', default=C.DEFAULT_TIMEOUT)
|
|
|
|
_timeout = FieldAttribute(isa='int', default=C.DEFAULT_TIMEOUT)
|
|
|
|
_shell = FieldAttribute(isa='string')
|
|
|
|
_shell = FieldAttribute(isa='string')
|
|
|
|
|
|
|
|
_connection_lockfd= FieldAttribute(isa='int')
|
|
|
|
|
|
|
|
|
|
|
|
# privilege escalation fields
|
|
|
|
# privilege escalation fields
|
|
|
|
_become = FieldAttribute(isa='bool')
|
|
|
|
_become = FieldAttribute(isa='bool')
|
|
|
@ -199,8 +200,7 @@ class PlayContext(Base):
|
|
|
|
self.password = passwords.get('conn_pass','')
|
|
|
|
self.password = passwords.get('conn_pass','')
|
|
|
|
self.become_pass = passwords.get('become_pass','')
|
|
|
|
self.become_pass = passwords.get('become_pass','')
|
|
|
|
|
|
|
|
|
|
|
|
# A temporary file (opened pre-fork) used by connection
|
|
|
|
# a file descriptor to be used during locking operations
|
|
|
|
# plugins for inter-process locking.
|
|
|
|
|
|
|
|
self.connection_lockfd = connection_lockfd
|
|
|
|
self.connection_lockfd = connection_lockfd
|
|
|
|
|
|
|
|
|
|
|
|
# set options before play to allow play to override them
|
|
|
|
# set options before play to allow play to override them
|
|
|
@ -326,11 +326,6 @@ class PlayContext(Base):
|
|
|
|
|
|
|
|
|
|
|
|
return new_info
|
|
|
|
return new_info
|
|
|
|
|
|
|
|
|
|
|
|
def copy(self, exclude_block=False):
|
|
|
|
|
|
|
|
new_me = super(PlayContext, self).copy()
|
|
|
|
|
|
|
|
new_me.connection_lockfd = self.connection_lockfd
|
|
|
|
|
|
|
|
return new_me
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def make_become_cmd(self, cmd, executable=None):
|
|
|
|
def make_become_cmd(self, cmd, executable=None):
|
|
|
|
""" helper function to create privilege escalation commands """
|
|
|
|
""" helper function to create privilege escalation commands """
|
|
|
|
|
|
|
|
|
|
|
|