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
4198b0a9
Commit
4198b0a9
authored
Feb 02, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6641 from kavu/6346_accept_hostkey_and_key_file
Add key_file and accept_hostkey to ansible-pull
parents
3d858b7c
9e8dae74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
+13
-1
bin/ansible-pull
+13
-1
No files found.
bin/ansible-pull
View file @
4198b0a9
...
...
@@ -40,7 +40,6 @@
import
os
import
shutil
import
subprocess
import
sys
import
datetime
import
socket
...
...
@@ -137,6 +136,10 @@ def main(args):
help
=
'ask for sudo password'
)
parser
.
add_option
(
'-t'
,
'--tags'
,
dest
=
'tags'
,
default
=
False
,
help
=
'only run plays and tasks tagged with these values'
)
parser
.
add_option
(
'--accept-host-key'
,
default
=
False
,
dest
=
'accept_host_key'
,
action
=
'store_true'
,
help
=
'adds the hostkey for the repo url if not already added'
)
parser
.
add_option
(
'--key-file'
,
dest
=
'key_file'
,
help
=
"Pass '-i <key_file>' to the SSH arguments used by git."
)
options
,
args
=
parser
.
parse_args
(
args
)
hostname
=
socket
.
getfqdn
()
...
...
@@ -170,6 +173,15 @@ def main(args):
if
options
.
checkout
:
repo_opts
+=
' version=
%
s'
%
options
.
checkout
# Only git module is supported
if
options
.
module_name
==
DEFAULT_REPO_TYPE
:
if
options
.
accept_host_key
:
repo_opts
+=
' accept_hostkey=yes'
if
options
.
key_file
:
repo_opts
+=
' key_file=
%
s'
%
options
.
key_file
path
=
utils
.
plugins
.
module_finder
.
find_plugin
(
options
.
module_name
)
if
path
is
None
:
sys
.
stderr
.
write
(
"module '
%
s' not found.
\n
"
%
options
.
module_name
)
...
...
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