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
335bc1ee
Commit
335bc1ee
authored
11 years ago
by
Steve Tjoa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding -K flag for ask-sudo-pass to ansible-pull
parent
2d0e9cd7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
bin/ansible-pull
+4
-0
No files found.
bin/ansible-pull
View file @
335bc1ee
...
...
@@ -123,6 +123,8 @@ def main(args):
default
=
DEFAULT_REPO_TYPE
,
help
=
'Module name used to check out repository. '
'Default is
%
s.'
%
DEFAULT_REPO_TYPE
)
parser
.
add_option
(
'-K'
,
'--ask-sudo-pass'
,
default
=
False
,
dest
=
'ask_sudo_pass'
,
action
=
'store_true'
,
help
=
'ask for sudo password'
)
options
,
args
=
parser
.
parse_args
(
args
)
hostname
=
socket
.
getfqdn
()
...
...
@@ -180,6 +182,8 @@ def main(args):
cmd
=
'ansible-playbook
%
s
%
s'
%
(
base_opts
,
playbook
)
if
options
.
inventory
:
cmd
+=
' -i "
%
s"'
%
options
.
inventory
if
options
.
ask_sudo_pass
:
cmd
+=
' -K'
os
.
chdir
(
options
.
dest
)
# RUN THE PLAYBOOK COMMAND
...
...
This diff is collapsed.
Click to expand it.
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