On Wed, 21 Aug 2019 at 10:33, Karther <[email protected]> wrote:
>
> Hey,
>
> I thinks you have not understand.
>
> I have my inventory host with this content :
>
> my_host_1   ansible_user=wildfly
> my_host_1   ansible_user=toto
>
> When i play my playbook, ansible run playbook only on the first line 
> my_host_1   ansible_user=wildfly and not on the second line.
> So, same when i use serial: 1 in my playbook, ansible run only the first line.
>
> I think ansible refers only to the host name and does not execute every line 
> of my inventory ...?

Ansible doesn't "execute lines of the inventory", it executes plays in
a playbook.
The inventory is to list the hosts you are targeting, so in this case
a single host.
Just have your inventory look like:

my_host_1

And then iterate over your play(s), using a different value for ansible_user.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwM0VRmnmAP%3DNoA6yx%2BQ%2BHq-zX48CQcZy%2B1uJP8QSEMyHg%40mail.gmail.com.

Reply via email to