SHOW:
|
|
- or go back to the newest paste.
1 | #My site.yml contains this: | |
2 | --- | |
3 | - hosts: all | |
4 | remote_user: test | |
5 | sudo: True | |
6 | name: Include all the plays | |
7 | roles: | |
8 | - common | |
9 | - streamers | |
10 | ||
11 | #streamer role's main.yml is just a bunch of includes: | |
12 | - name: RSYNC - rsync required files | |
13 | include: ../../../modules/rsync/rsync.yml | |
14 | ||
15 | #And the rsync.yml contains this: | |
16 | - name: RSYNC all the needed files for streamer | |
17 | synchronize: src=/home/test/streamer-image/opt/ dest=/opt/ rsync_timeout=5 #rsync_path="sudo rsync" | |
18 | #command: sudo rsync -avP -e "ssh -o StrictHostChecking=no" --partial [email protected]:/streamer-image/opt/ /opt/ | |
19 | #local_action: shell rsync -avP "ssh -p {{ansible_ssh_port}}" --partial --rsync-path="sudo rsync" /home/test/streamer-image/opt/ test@{{inventory_hostname}}:/opt/ | |
20 | when: roles_var == "str" | |
21 | ||
22 | - name: RSYNC all the needed files for encoder | |
23 | synchronize: src=/home/test/encoder-image/opt/ dest=/opt/ rsync_timeout=5 rsync_path="sudo rsync" | |
24 | #command: rsync -avP --partial [email protected]:/encoder-image/opt/ /opt/ | |
25 | #local_action: shell rsync -avP "ssh -p {{ansible_ssh_port}}" --partial --rsync-path="sudo rsync" /home/test/encoder-image/opt/ test@{{inventory_hostname}}:/opt/ | |
26 | when: roles_var == "enc" | |
27 | ||
28 | - name: RSYNC all the needed files for timeshift | |
29 | synchronize: src=/home/test/ts-image/opt/ dest=/opt/ rsync_timeout=5 rsync_path="sudo rsync" | |
30 | #command: rsync -avP --partial [email protected]:/ts-image/opt /opt | |
31 | #local_action: shell rsync -avP -e "ssh -p {{ansible_ssh_port}}" --partial --rsync-path="sudo rsync" /home/test/ts-image/opt/ test@{{inventory_hostname}}:/opt/ | |
32 | when: roles_var == "ts" |