- hosts: containers name: Sync mailu ignore_unreachable: false tasks: - name: Syncing mailu ansible.builtin.shell: 'rsync -ra /share/docker_data/mailu2/* admin@192.168.77.246:/share/docker_data/mailu2' when: inventory_hostname in groups['nas']