Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #My site.yml contains this:
- ---
- - hosts: all
- remote_user: test
- sudo: True
- name: Include all the plays
- roles:
- - common
- - streamers
- #streamer role's main.yml is just a bunch of includes:
- - name: RSYNC - rsync required files
- include: ../../../modules/rsync/rsync.yml
- #And the rsync.yml contains this:
- - name: RSYNC all the needed files for streamer
- synchronize: src=/home/test/streamer-image/opt/ dest=/opt/ rsync_timeout=5 #rsync_path="sudo rsync"
- #command: sudo rsync -avP -e "ssh -o StrictHostChecking=no" --partial [email protected]:/streamer-image/opt/ /opt/
- #local_action: shell rsync -avP "ssh -p {{ansible_ssh_port}}" --partial --rsync-path="sudo rsync" /home/test/streamer-image/opt/ test@{{inventory_hostname}}:/opt/
- when: roles_var == "str"
- - name: RSYNC all the needed files for encoder
- synchronize: src=/home/test/encoder-image/opt/ dest=/opt/ rsync_timeout=5 rsync_path="sudo rsync"
- #command: rsync -avP --partial [email protected]:/encoder-image/opt/ /opt/
- #local_action: shell rsync -avP "ssh -p {{ansible_ssh_port}}" --partial --rsync-path="sudo rsync" /home/test/encoder-image/opt/ test@{{inventory_hostname}}:/opt/
- when: roles_var == "enc"
- - name: RSYNC all the needed files for timeshift
- synchronize: src=/home/test/ts-image/opt/ dest=/opt/ rsync_timeout=5 rsync_path="sudo rsync"
- #command: rsync -avP --partial [email protected]:/ts-image/opt /opt
- #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/
- when: roles_var == "ts"
Advertisement
Add Comment
Please, Sign In to add comment