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
08896e2c
Commit
08896e2c
authored
Mar 21, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enabled vault password file and fixed prompting for connection password on local
parent
edb1bd25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
v2/bin/ansible
+8
-18
No files found.
v2/bin/ansible
View file @
08896e2c
...
@@ -30,6 +30,7 @@ from ansible.parsing import DataLoader
...
@@ -30,6 +30,7 @@ from ansible.parsing import DataLoader
from
ansible.parsing.splitter
import
parse_kv
from
ansible.parsing.splitter
import
parse_kv
from
ansible.playbook.play
import
Play
from
ansible.playbook.play
import
Play
from
ansible.utils.cli
import
base_parser
,
validate_conflicts
,
normalize_become_options
,
ask_passwords
from
ansible.utils.cli
import
base_parser
,
validate_conflicts
,
normalize_become_options
,
ask_passwords
from
ansible.utils.vault
import
read_vault_file
from
ansible.vars
import
VariableManager
from
ansible.vars
import
VariableManager
########################################################
########################################################
...
@@ -76,9 +77,9 @@ class Cli(object):
...
@@ -76,9 +77,9 @@ class Cli(object):
pattern
=
args
[
0
]
pattern
=
args
[
0
]
#-------------------------------------------------------------------------------
if
options
.
connection
==
"local"
:
# FIXME: the password asking stuff needs to be ported over still
options
.
ask_pass
=
False
#-------------------------------------------------------------------------------
sshpass
=
None
sshpass
=
None
becomepass
=
None
becomepass
=
None
vault_pass
=
None
vault_pass
=
None
...
@@ -86,23 +87,12 @@ class Cli(object):
...
@@ -86,23 +87,12 @@ class Cli(object):
normalize_become_options
(
options
)
normalize_become_options
(
options
)
(
sshpass
,
becomepass
,
vault_pass
)
=
ask_passwords
(
options
)
(
sshpass
,
becomepass
,
vault_pass
)
=
ask_passwords
(
options
)
if
options
.
vault_password_file
:
#options.ask_pass = options.ask_pass or C.DEFAULT_ASK_PASS
## Never ask for an SSH password when we run with local connection
#if options.connection == "local":
# options.ask_pass = False
#options.ask_sudo_pass = options.ask_sudo_pass or C.DEFAULT_ASK_SUDO_PASS
#options.ask_su_pass = options.ask_su_pass or C.DEFAULT_ASK_SU_PASS
#options.ask_vault_pass = options.ask_vault_pass or C.DEFAULT_ASK_VAULT_PASS
#
#(sshpass, sudopass, su_pass, vault_pass) = utils.ask_passwords(ask_pass=options.ask_pass, ask_sudo_pass=options.ask_sudo_pass, ask_su_pass=options.ask_su_pass, ask_vault_pass=options.ask_vault_pass)
#
# read vault_pass from a file
# read vault_pass from a file
#if not options.ask_vault_pass and options.vault_password_file:
vault_pass
=
read_vault_file
(
options
.
vault_password_file
)
# vault_pass = utils.read_vault_file(options.vault_password_file)
#-------------------------------------------------------------------------------
# FIXME: needs vault password
, after the above is fixed
# FIXME: needs vault password
loader
=
DataLoader
()
loader
=
DataLoader
()
variable_manager
=
VariableManager
()
variable_manager
=
VariableManager
()
...
...
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