ansible hosts and user

Hy,

How to make that when one executes a playbook with a host parameter, ansible only recovers part of the host name as user.

Example:

ansible-playbook playbook.yml -l “hostuser1”

i want ansible to dynamically use user “user1”

if possible without script.

Thanks for answer guy !! :slight_smile:

Please ask on the Ansible mailing list or irc channel. This mailing list is for the AWX project.