-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds readme notes for rsync.yml, updates comments, updates _staging.e…
…xample
- Loading branch information
1 parent
fc4bccc
commit bef74bb
Showing
3 changed files
with
29 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
# rename this file to _staging, uncomment the lines below, | ||
# and add your own staging hostname | ||
## rename this file to _staging, uncomment the lines below, | ||
## and add your own staging hosts | ||
|
||
#[staging] | ||
#your_staging_hostname_or_ip | ||
# ansible-pocs-1 ansible_ssh_host=your_host_ip_1 | ||
# ansible-pocs-2 ansible_ssh_host=your_host_ip_2 | ||
|
||
# [staging] | ||
# ansible-pocs-1 | ||
# ansible-pocs-2 | ||
|
||
## ForwardAgent is necessary when running a task that connects | ||
## a remote host to another remote host/server, e.g. running | ||
## rsync, or pulling from Github | ||
# [staging:vars] | ||
# ansible_ssh_extra_args="-o ForwardAgent=yes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,15 @@ | |
|
||
tasks: | ||
|
||
# try writing a task with hosts defined at task level? | ||
|
||
- name: sync local folder to remote folder | ||
synchronize: | ||
src: /Users/patrick/Documents/syncthis | ||
dest: /home/admin | ||
|
||
## This playbook is run against host ansible-pocs-1, but this task is | ||
## delegated to ansible-pocs-2. In practice this means that the task | ||
## first logs into ansible-pocs-2 and then runs rsync from there back | ||
## to ansible-pocs-1. | ||
- name: sync remote folder to remote folder | ||
synchronize: | ||
src: /home/admin/syncthis | ||
|
@@ -24,5 +26,3 @@ | |
# mode: push ## default is push | ||
delegate_to: ansible-pocs-2 | ||
|
||
# - name: use rsync manually | ||
# command: "rsync [email protected]:~/syncthis ~/" |