Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
2814828b
Commit
2814828b
authored
Nov 22, 2013
by
Aleksey Ovcharenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added existing_only options to skip creating new files on receiver
parent
32986c4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
library/files/synchronize
+10
-0
No files found.
library/files/synchronize
View file @
2814828b
...
...
@@ -46,6 +46,12 @@ options:
choices: [ 'yes', 'no' ]
default: 'yes'
required: false
existing_only:
description:
- Skip creating new files on receiver.
choices: [ 'yes', 'no' ]
default: 'no'
required: false
delete:
description:
- Delete files that don't exist (after transfer, not before) in the C(src) path.
...
...
@@ -154,6 +160,7 @@ def main():
private_key
=
dict
(
default
=
None
),
rsync_path
=
dict
(
default
=
None
),
archive
=
dict
(
default
=
'yes'
,
type
=
'bool'
),
existing_only
=
dict
(
default
=
'no'
,
type
=
'bool'
),
dirs
=
dict
(
default
=
'no'
,
type
=
'bool'
),
recursive
=
dict
(
type
=
'bool'
),
links
=
dict
(
type
=
'bool'
),
...
...
@@ -174,6 +181,7 @@ def main():
rsync
=
module
.
params
.
get
(
'local_rsync_path'
,
'rsync'
)
rsync_timeout
=
module
.
params
.
get
(
'rsync_timeout'
,
'rsync_timeout'
)
archive
=
module
.
params
[
'archive'
]
existing_only
=
module
.
params
[
'existing_only'
],
dirs
=
module
.
params
[
'dirs'
]
# the default of these params depends on the value of archive
recursive
=
module
.
params
[
'recursive'
]
...
...
@@ -188,6 +196,8 @@ def main():
cmd
=
cmd
+
' --dry-run'
if
delete
:
cmd
=
cmd
+
' --delete-after'
if
existing_only
:
cmd
=
cmd
+
' --existing'
if
archive
:
cmd
=
cmd
+
' --archive'
if
recursive
is
False
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment