You can run a command using the ansible.builtin.command module.
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/command_module.html
Example:
- name: Run command if /path/to/database does not exist (with 'args' keyword)
ansible.builtin.command: /usr/bin/make_database.sh db_user db_name
OR
- name: Run command using argv with mixed argument formats
ansible.builtin.command:
argv:
- /path/to/binary
- -v
- --debug
- --longopt
- value for longopt
- --other-longopt=value for other longopt
- positional
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/command_module.html#examples