Create user filebeat Ansible playbook

Hello people!
I’m doing project to create user and role for filebeat directly in the Ansible playbook for my opensearch but without success.

I tried a few ways but do not worked:

  • Create URI module for PUT json file with permissions

I not sure but Have no info about
Does anyone have a model ?

Isn’t the roles.yml and internal_users.yml an option?