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
2288a11b
Commit
2288a11b
authored
Jul 29, 2013
by
Timothy Appnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented setup method in rsync action module.
parent
4a9635e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lib/ansible/runner/action_plugins/synchronize.py
+5
-4
No files found.
lib/ansible/runner/action_plugins/synchronize.py
View file @
2288a11b
...
...
@@ -38,6 +38,11 @@ class ActionModule(object):
else
:
return
path
def
setup
(
self
,
module_name
,
inject
):
''' Always default to localhost as delegate if None defined '''
if
inject
.
get
(
'delegate_to'
)
is
None
:
inject
[
'delegate_to'
]
=
'127.0.0.1'
def
run
(
self
,
conn
,
...
...
@@ -65,10 +70,6 @@ class ActionModule(object):
except
KeyError
:
pass
# the localhost is the default delegate in an rsync task
if
inject
.
get
(
'delegate_to'
)
is
None
:
conn
.
delegate
=
'127.0.0.1'
inject
[
'delegate_to'
]
=
'127.0.0.1'
src_host
=
inject
[
'delegate_to'
]
dest_host
=
inject
.
get
(
'ansible_ssh_host'
,
inject
[
'inventory_hostname'
])
if
options
.
get
(
'mode'
,
'push'
)
==
'pull'
:
...
...
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