Added sample-run for tensorflow
This commit is contained in:
26
sample-run/tensorflow/roles/rsync/tasks/main.yml
Normal file
26
sample-run/tensorflow/roles/rsync/tasks/main.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
# Configure the rsync daemon on the master
|
||||
- name: copy rsync.conf up to the server
|
||||
copy:
|
||||
src: "{{ rsync.config_file.src }}"
|
||||
dest: "{{ rsync.config_file.dest }}"
|
||||
notify:
|
||||
- restart the rsync service
|
||||
when: inventory_hostname == rsync.master
|
||||
|
||||
- name: configure rsync on the server
|
||||
service:
|
||||
enabled: yes
|
||||
name: "{{ rsync.service_name }}"
|
||||
state: started
|
||||
when: inventory_hostname == rsync.master
|
||||
|
||||
# Synchronize the data folder across hosts
|
||||
- name: synchronize the data folder
|
||||
delegate_to: "{{ rsync.master }}"
|
||||
synchronize:
|
||||
src: "{{ sync.source }}"
|
||||
dest: "{{ sync.destination }}"
|
||||
rsync_opts: "{{ rsync.options }}"
|
||||
use_ssh_args: yes
|
||||
when: inventory_hostname != rsync.master
|
||||
Reference in New Issue
Block a user