I keep my hosts file in /ansible/.
I have a play I'm trying to figure out that does a very simple thing,
copies a small file from the Linux control machine (pi) to Windows machine
or two.
However, when I run it, I get an error.
Here's my hosts file:
root@Raspi_Ctrl:/ansible/playbook# cat /ansible/hosts
[win]
100.(removed for this post)
100.(removed for this post)
[nuc:vars]
ansible_user=(removed for this post)
ansible_password=(removed for this post)
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore
ansible_winrm_scheme=https
ansible_winrm_transport=basic
#ansible_port=5986
#ansible_winrm_path=/ansible/lib/ansible/plugins/connection/
[pi]
100.(removed for this post)
[pi:vars]
ansible_user=(removed for this post)
ansible_password=(removed for this post)
And here is my /ansible/playbook/test.yml:
GNU nano 2.7.4 File: /ansible/playbook/test.yml
---
- hosts: /ansible/hosts
tasks:
- name: Copies file to Windows
win_copy: src=/ansible/ansible.cfg dest=C:\Users\YRunner\Desktop
When I run it, I get:
root@Raspi_Ctrl:/ansible/playbook# ansible-playbook
/ansible/playbook/test.yml
* [WARNING]: Could not match supplied host pattern, ignoring: all*
* [WARNING]: provided hosts list is empty, only localhost is available*
* [WARNING]: Could not match supplied host pattern, ignoring:
/ansible/hosts*
PLAY [/ansible/hosts]
**********************************************************
skipping: no hosts matched
PLAY RECAP
*********************************************************************
So my question is, what am I doing wrong? I want it to reference the "win"
group in the hosts file.
Thanks in advance!
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/bb85db6e-f827-4f01-a2f8-4ad30b3d04dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.