@ -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 ' , default = None )
# privilege escalation fields
# privilege escalation fields
_become = FieldAttribute ( isa = ' bool ' )
_become = FieldAttribute ( isa = ' bool ' )
@ -244,6 +245,11 @@ class PlayContext(Base):
if options . connection :
if options . connection :
self . connection = options . connection
self . connection = options . connection
# The lock file is opened in the parent process, and the workers will
# inherit the open file, so we just need to help them find it.
if options . connection_lockfile :
self . connection_lockfd = options . connection_lockfile . fileno ( )
self . remote_user = options . remote_user
self . remote_user = options . remote_user
self . private_key_file = options . private_key_file
self . private_key_file = options . private_key_file