diff --git a/ansible_mitogen/transport_config.py b/ansible_mitogen/transport_config.py index d46eb565..8ef49ebb 100644 --- a/ansible_mitogen/transport_config.py +++ b/ansible_mitogen/transport_config.py @@ -352,7 +352,11 @@ class PlayContextSpec(Spec): mitogen.core.to_text(term) for s in ( self._play_context.sudo_flags, - self._play_context.become_flags + self._play_context.become_flags, + # Ansible 2.3. + getattr(C, 'DEFAULT_BECOME_FLAGS', ''), + getattr(C, 'DEFAULT_SUDO_FLAGS', ''), + ) for term in ansible.utils.shlex.shlex_split(s or '') ]