ansible/playbooks/sync_mailu2_data.yaml
ladislav.dusa afc7817a81 conf added
2024-12-11 16:33:42 +01:00

14 lines
669 B
YAML
Executable File

- hosts: containers
name: Sync mailu
ignore_unreachable: false
tasks:
- name: Syncing mailu
ansible.builtin.shell: 'chown -R admin. /share/docker_data/'
become: true
when: inventory_hostname in groups['raspberry'] or inventory_hostname in groups['raspberrypi5']
- 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']
- name: Syncing mailu
ansible.builtin.shell: 'rsync -ra /share/docker_data/mailu2/* admin@192.168.77.238:/share/docker_data/mailu2'
when: inventory_hostname in groups['nas']