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
78e1a7ed
Commit
78e1a7ed
authored
Jan 19, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Fix: Add support for SSL protocol version configuration option"
parent
566a8d1b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
15 deletions
+4
-15
examples/ansible.cfg
+0
-9
lib/ansible/constants.py
+0
-1
lib/ansible/module_utils/urls.py
+4
-4
v2/ansible/constants.py
+0
-1
No files found.
examples/ansible.cfg
View file @
78e1a7ed
...
@@ -212,12 +212,3 @@ accelerate_daemon_timeout = 30
...
@@ -212,12 +212,3 @@ accelerate_daemon_timeout = 30
# is "no".
# is "no".
#accelerate_multi_key = yes
#accelerate_multi_key = yes
[ssl]
# SSL/TLS Protocol
# Configure the default protocol strength of any SSL/TLS connections
# made by Ansible. Valid values are
# SSLv2 - 0
# SSLv3 - 1
# SSLv23 - 2
# TLSv1 - 3
ssl_protocol = 3
lib/ansible/constants.py
View file @
78e1a7ed
...
@@ -166,7 +166,6 @@ ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'AN
...
@@ -166,7 +166,6 @@ ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'AN
ANSIBLE_SSH_CONTROL_PATH
=
get_config
(
p
,
'ssh_connection'
,
'control_path'
,
'ANSIBLE_SSH_CONTROL_PATH'
,
"
%(directory)
s/ansible-ssh-
%%
h-
%%
p-
%%
r"
)
ANSIBLE_SSH_CONTROL_PATH
=
get_config
(
p
,
'ssh_connection'
,
'control_path'
,
'ANSIBLE_SSH_CONTROL_PATH'
,
"
%(directory)
s/ansible-ssh-
%%
h-
%%
p-
%%
r"
)
ANSIBLE_SSH_PIPELINING
=
get_config
(
p
,
'ssh_connection'
,
'pipelining'
,
'ANSIBLE_SSH_PIPELINING'
,
False
,
boolean
=
True
)
ANSIBLE_SSH_PIPELINING
=
get_config
(
p
,
'ssh_connection'
,
'pipelining'
,
'ANSIBLE_SSH_PIPELINING'
,
False
,
boolean
=
True
)
PARAMIKO_RECORD_HOST_KEYS
=
get_config
(
p
,
'paramiko_connection'
,
'record_host_keys'
,
'ANSIBLE_PARAMIKO_RECORD_HOST_KEYS'
,
True
,
boolean
=
True
)
PARAMIKO_RECORD_HOST_KEYS
=
get_config
(
p
,
'paramiko_connection'
,
'record_host_keys'
,
'ANSIBLE_PARAMIKO_RECORD_HOST_KEYS'
,
True
,
boolean
=
True
)
SSL_PROTOCOL
=
get_config
(
p
,
'ssl'
,
'ssl_protocol'
,
'SSL_PROTOCOL'
,
3
,
integer
=
True
)
# obsolete -- will be formally removed in 1.6
# obsolete -- will be formally removed in 1.6
ZEROMQ_PORT
=
get_config
(
p
,
'fireball_connection'
,
'zeromq_port'
,
'ANSIBLE_ZEROMQ_PORT'
,
5099
,
integer
=
True
)
ZEROMQ_PORT
=
get_config
(
p
,
'fireball_connection'
,
'zeromq_port'
,
'ANSIBLE_ZEROMQ_PORT'
,
5099
,
integer
=
True
)
ACCELERATE_PORT
=
get_config
(
p
,
'accelerate'
,
'accelerate_port'
,
'ACCELERATE_PORT'
,
5099
,
integer
=
True
)
ACCELERATE_PORT
=
get_config
(
p
,
'accelerate'
,
'accelerate_port'
,
'ACCELERATE_PORT'
,
5099
,
integer
=
True
)
...
...
lib/ansible/module_utils/urls.py
View file @
78e1a7ed
...
@@ -55,7 +55,7 @@ import os
...
@@ -55,7 +55,7 @@ import os
import
re
import
re
import
socket
import
socket
import
tempfile
import
tempfile
from
ansible
import
constants
as
C
# This is a dummy cacert provided for Mac OS since you need at least 1
# This is a dummy cacert provided for Mac OS since you need at least 1
# ca cert, regardless of validity, for Python on Mac OS to use the
# ca cert, regardless of validity, for Python on Mac OS to use the
...
@@ -91,7 +91,7 @@ class CustomHTTPSConnection(httplib.HTTPSConnection):
...
@@ -91,7 +91,7 @@ class CustomHTTPSConnection(httplib.HTTPSConnection):
if
self
.
_tunnel_host
:
if
self
.
_tunnel_host
:
self
.
sock
=
sock
self
.
sock
=
sock
self
.
_tunnel
()
self
.
_tunnel
()
self
.
sock
=
ssl
.
wrap_socket
(
sock
,
keyfile
=
self
.
key_file
,
certfile
=
self
.
cert_file
,
ssl_version
=
C
.
SSL_PROTOCOL
)
self
.
sock
=
ssl
.
wrap_socket
(
sock
,
keyfile
=
self
.
key_file
,
certfile
=
self
.
cert_file
,
ssl_version
=
ssl
.
PROTOCOL_TLSv1
)
class
CustomHTTPSHandler
(
urllib2
.
HTTPSHandler
):
class
CustomHTTPSHandler
(
urllib2
.
HTTPSHandler
):
...
@@ -292,12 +292,12 @@ class SSLValidationHandler(urllib2.BaseHandler):
...
@@ -292,12 +292,12 @@ class SSLValidationHandler(urllib2.BaseHandler):
s
.
sendall
(
'
\r\n
'
)
s
.
sendall
(
'
\r\n
'
)
connect_result
=
s
.
recv
(
4096
)
connect_result
=
s
.
recv
(
4096
)
self
.
validate_proxy_response
(
connect_result
)
self
.
validate_proxy_response
(
connect_result
)
ssl_s
=
ssl
.
wrap_socket
(
s
,
ca_certs
=
tmp_ca_cert_path
,
cert_reqs
=
ssl
.
CERT_REQUIRED
,
ssl_version
=
C
.
SSL_PROTOCOL
)
ssl_s
=
ssl
.
wrap_socket
(
s
,
ca_certs
=
tmp_ca_cert_path
,
cert_reqs
=
ssl
.
CERT_REQUIRED
)
else
:
else
:
self
.
module
.
fail_json
(
msg
=
'Unsupported proxy scheme:
%
s. Currently ansible only supports HTTP proxies.'
%
proxy_parts
.
get
(
'scheme'
))
self
.
module
.
fail_json
(
msg
=
'Unsupported proxy scheme:
%
s. Currently ansible only supports HTTP proxies.'
%
proxy_parts
.
get
(
'scheme'
))
else
:
else
:
s
.
connect
((
self
.
hostname
,
self
.
port
))
s
.
connect
((
self
.
hostname
,
self
.
port
))
ssl_s
=
ssl
.
wrap_socket
(
s
,
ca_certs
=
tmp_ca_cert_path
,
cert_reqs
=
ssl
.
CERT_REQUIRED
,
ssl_version
=
C
.
SSL_PROTOCOL
)
ssl_s
=
ssl
.
wrap_socket
(
s
,
ca_certs
=
tmp_ca_cert_path
,
cert_reqs
=
ssl
.
CERT_REQUIRED
)
# close the ssl connection
# close the ssl connection
#ssl_s.unwrap()
#ssl_s.unwrap()
s
.
close
()
s
.
close
()
...
...
v2/ansible/constants.py
View file @
78e1a7ed
...
@@ -173,7 +173,6 @@ ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'AN
...
@@ -173,7 +173,6 @@ ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'AN
ANSIBLE_SSH_CONTROL_PATH
=
get_config
(
p
,
'ssh_connection'
,
'control_path'
,
'ANSIBLE_SSH_CONTROL_PATH'
,
"
%(directory)
s/ansible-ssh-
%%
h-
%%
p-
%%
r"
)
ANSIBLE_SSH_CONTROL_PATH
=
get_config
(
p
,
'ssh_connection'
,
'control_path'
,
'ANSIBLE_SSH_CONTROL_PATH'
,
"
%(directory)
s/ansible-ssh-
%%
h-
%%
p-
%%
r"
)
ANSIBLE_SSH_PIPELINING
=
get_config
(
p
,
'ssh_connection'
,
'pipelining'
,
'ANSIBLE_SSH_PIPELINING'
,
False
,
boolean
=
True
)
ANSIBLE_SSH_PIPELINING
=
get_config
(
p
,
'ssh_connection'
,
'pipelining'
,
'ANSIBLE_SSH_PIPELINING'
,
False
,
boolean
=
True
)
PARAMIKO_RECORD_HOST_KEYS
=
get_config
(
p
,
'paramiko_connection'
,
'record_host_keys'
,
'ANSIBLE_PARAMIKO_RECORD_HOST_KEYS'
,
True
,
boolean
=
True
)
PARAMIKO_RECORD_HOST_KEYS
=
get_config
(
p
,
'paramiko_connection'
,
'record_host_keys'
,
'ANSIBLE_PARAMIKO_RECORD_HOST_KEYS'
,
True
,
boolean
=
True
)
SSL_PROTOCOL
=
get_config
(
p
,
'ssl'
,
'ssl_protocol'
,
'SSL_PROTOCOL'
,
3
,
integer
=
True
)
# obsolete -- will be formally removed in 1.6
# obsolete -- will be formally removed in 1.6
ZEROMQ_PORT
=
get_config
(
p
,
'fireball_connection'
,
'zeromq_port'
,
'ANSIBLE_ZEROMQ_PORT'
,
5099
,
integer
=
True
)
ZEROMQ_PORT
=
get_config
(
p
,
'fireball_connection'
,
'zeromq_port'
,
'ANSIBLE_ZEROMQ_PORT'
,
5099
,
integer
=
True
)
ACCELERATE_PORT
=
get_config
(
p
,
'accelerate'
,
'accelerate_port'
,
'ACCELERATE_PORT'
,
5099
,
integer
=
True
)
ACCELERATE_PORT
=
get_config
(
p
,
'accelerate'
,
'accelerate_port'
,
'ACCELERATE_PORT'
,
5099
,
integer
=
True
)
...
...
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