I've got this playbook:
---
- hosts: all
tasks:
- command: echo {{ item }}
with_items: [ itemforhost1, itemforhost2]
And this is the output:
TASK [command] *****************************************************************
changed: [host1] => (item=itemforhost1)
changed: [host2] => (item=itemforhost1)
changed: [host1] => (item=itemforhost2)
changed: [host2] => (item=itemforhost2)
Each host is reading the same line, but I want host1 to only read itemforhost1 and same for host2. How should I go about doing this? I want something like this:
TASK [command] *****************************************************************
changed: [host1] => (item=itemforhost1)
changed: [host2] => (item=itemforhost2)