# Pass arguments to molecule.yml

**URL:** <https://forum.ansible.com/t/pass-arguments-to-molecule-yml/10704>\
**Category:** Get Help\
**Created:** [November 5, 2024, 11:59am UTC](https://forum.ansible.com/t/pass-arguments-to-molecule-yml/10704 "2024-11-05T11:59:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![miloszskrzypek239](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@miloszskrzypek239](https://forum.ansible.com/u/miloszskrzypek239)\
**Post date:** [November 5, 2024, 11:59am UTC](https://forum.ansible.com/t/pass-arguments-to-molecule-yml/10704/1 "2024-11-05T11:59:25Z")

</div>

Is it possible to pass arguments to molecule.yml?  
More specifically, I want to use a delegated driver to run a few playbooks on a host with a rather specific way to access it. First, I need to grab an username and password from the person running the playbook, and then use that as a jump to the actual ansible user, since direct access to the ansible user is blocked.  
Worst case scenario I can template them in using an external tool, but I’d rather avoid overcomplicated solutions.

---

<div class="post-metadata">

**Author:** ![mahespth](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mahespth/32/252_2.png) [@mahespth](https://forum.ansible.com/u/mahespth)\
**Post date:** [November 13, 2024, 1:40pm UTC](https://forum.ansible.com/t/pass-arguments-to-molecule-yml/10704/2 "2024-11-13T13:40:17Z")

</div>

Hi,

Molecule can indeed utilise regular Ansible flags.

ie. `molecule test -- -u remote_user`

If its to run as the user running the tests then this can be easily done using the environment vars.

Regards
