If you need a shell environment, use the shell module.
Command:
ansible <host in inventory> -m ansible.builtin.shell -a '<shell command>'
Example
-ansible webservers -m ansible.builtin.shell -a 'mkdir MyTestFolder'
If you need a shell environment, use the shell module.
Command:
ansible <host in inventory> -m ansible.builtin.shell -a '<shell command>'
Example
-ansible webservers -m ansible.builtin.shell -a 'mkdir MyTestFolder'
If your are using a clear password in your YAML file, you can encrypt the file via Ansible-vault.