with_inventory_hostname error

37 views
Skip to first unread message

Aurel

unread,
Feb 2, 2016, 8:21:17 AM2/2/16
to Ansible Project
Hello, 

The documentation mentions "with_inventory_hostname" (http://docs.ansible.com/ansible/playbooks_loops.html#looping-over-the-inventory) as an attribute for a task :
# show all the hosts in the inventory
- debug: msg={{ item }}
  with_inventory_hostname: all

# show all the hosts matching the pattern, ie all but the group www
- debug: msg={{ item }}
  with_inventory_hostname: all:!www
But my playbook raise the following error (with ansible 2.0.0.2, installed via pip) for the same task:
"ERROR! 'with_inventory_hostname' is not a valid attribute for a Task

I did not find any mention of "with_inventory_hostname" in the source code. 

Is it an old feature not removed from the docs ? Did I miss something else ?

Thanks in advance, 
Aurel

Brian Coca

unread,
Feb 2, 2016, 9:34:47 AM2/2/16
to Ansible Project
missing an 's', with_inventory_hostnames


--
Brian Coca

Brian Coca

unread,
Feb 2, 2016, 9:38:59 AM2/2/16
to Ansible Project
made fix to docs, which were wrong.


--
Brian Coca

Aurel

unread,
Feb 2, 2016, 9:49:25 AM2/2/16
to Ansible Project
Thank you very much for this and for everything !
Reply all
Reply to author
Forward
0 new messages