I try to use ansible-pull and synchronize module to sync files from a remote server to the local server. I use ansible-pull it failed and shows 'skipping: no hosts matched' but when I copy the playbook file to my local server and run as ansible-playbook, it works.
my hosts setting
localhost ansible_connection=local
[sync_server]
sync_1 ansible_host=11.22.33.44
playbook file
---
- name: Sync Test
hosts: sync_server
tasks:
- name: Start Sync
synchronize:
mode: pull
src: /home/sourcefiles
dest: /home/syncfiles/
- ansible version 2.5.1
- python version 2.7.17
- Sync server and client os ubuntu 18.04
ansible-pullcommand and the output. - Vladimir Botka