diff --git a/pytest_ansible/module_dispatcher/v28.py b/pytest_ansible/module_dispatcher/v28.py index 1487542b..6b7b1067 100644 --- a/pytest_ansible/module_dispatcher/v28.py +++ b/pytest_ansible/module_dispatcher/v28.py @@ -114,6 +114,8 @@ def _run(self, *module_args, **complex_args): play_ds = dict( name="pytest-ansible", hosts=self.options['host_pattern'], + become=self.options['become'], + become_user=self.options['become_user'], gather_facts='no', tasks=[ dict(