Hello All, I am new with Ansible and trying to write a yml to scp the file from . . .

Ansari Faheem:
Hello All, I am new with Ansible and trying to write a yml to scp the file from ansible master server to works. can you please help:
Output: *[WARNING]: Could not match supplied host pattern, ignoring: /etc/ansible/host*

PLAY [Ansible Copy Example Local to Remote] ********************************************************************************************************************
skipping: no hosts matched

PLAY RECAP *****************************************************************************************************************************************************

- name: Ansible Copy Example Local to Remote
 hosts: /etc/ansible/host
 tasks:
  - name: copying file with playbook
   become: true 
   copy:
    src: /etc/yum.repos.d/cloudera-manager.repo
    dest: /etc/yum.repos.d/cloudera-manager.repo

Al West:
You have a file path for hosts. It should reference a group in your inventory or be all

Ansari Faheem:

  • name: Ansible Copy Example Local to Remote
    hosts: all
    tasks:
    • name: copying file with playbook
      become: true
      copy:
      src: /etc/yum.repos.d/cloudera-manager.repo
      dest: /etc/yum.repos.d/cloudera-manager.repo

Ansari Faheem:
Thanks