---
- hosts: "{{ host | default(localhost) }}"
tasks:
- name: show OS version info
debug: msg="{{ansible_distribution}} {{ansible_distribution_version}}"
# ansible-playbook -i hosts dist.ymlPLAY [{{host | default(localhost)}}] ******************************************skipping: no hosts matched
# ansible-playbook -i hosts dist.yml --extra-vars 'host=localhost'PLAY [localhost] **************************************************************...
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
---
- hosts: "{{ host | default(localhost) }}"
---
- hosts: "{{ host | default('localhost') }}"
If you are attempting to drive the host spec based on inventory variables, this won't work.If you drive it with input from -e, it will.You can't use inventory variables to drive the host spec.
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a62bd7de-c95b-42e0-829e-4cbb615cd906%40googlegroups.com.