|
|
@ -211,9 +211,13 @@
|
|
|
|
set_fact:
|
|
|
|
set_fact:
|
|
|
|
is_ubuntu_precise: "{{ ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'precise' }}"
|
|
|
|
is_ubuntu_precise: "{{ ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'precise' }}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# These tests are just side effects of how the site is hosted. It's not
|
|
|
|
|
|
|
|
# specifically a test site. So the tests may break due to the hosting
|
|
|
|
|
|
|
|
# changing. Eventually we need to standup a webserver with SNI as part of the
|
|
|
|
|
|
|
|
# test run.
|
|
|
|
- name: Test that SNI succeeds on python versions that have SNI
|
|
|
|
- name: Test that SNI succeeds on python versions that have SNI
|
|
|
|
uri:
|
|
|
|
uri:
|
|
|
|
url: 'https://sni.velox.ch'
|
|
|
|
url: "{{ SNI_URI }}"
|
|
|
|
return_content: true
|
|
|
|
return_content: true
|
|
|
|
when: ansible_python.has_sslcontext
|
|
|
|
when: ansible_python.has_sslcontext
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
@ -222,12 +226,12 @@
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- result|success
|
|
|
|
- result|success
|
|
|
|
- '"Great! Your client" in result.content'
|
|
|
|
- "\"<h2>If You Can Read This, You're SNIing</h2>\" in result.content"
|
|
|
|
when: ansible_python.has_sslcontext
|
|
|
|
when: ansible_python.has_sslcontext
|
|
|
|
|
|
|
|
|
|
|
|
- name: Verify SNI verification fails on old python without urllib3 contrib
|
|
|
|
- name: Verify SNI verification fails on old python without urllib3 contrib
|
|
|
|
uri:
|
|
|
|
uri:
|
|
|
|
url: 'https://sni.velox.ch'
|
|
|
|
url: '{{ SNI_URI }}'
|
|
|
|
ignore_errors: true
|
|
|
|
ignore_errors: true
|
|
|
|
when: not ansible_python.has_sslcontext
|
|
|
|
when: not ansible_python.has_sslcontext
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
@ -253,7 +257,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
- name: Verify SNI verificaiton succeeds on old python with urllib3 contrib
|
|
|
|
- name: Verify SNI verificaiton succeeds on old python with urllib3 contrib
|
|
|
|
uri:
|
|
|
|
uri:
|
|
|
|
url: 'https://sni.velox.ch'
|
|
|
|
url: '{{ SNI_URI }}'
|
|
|
|
return_content: true
|
|
|
|
return_content: true
|
|
|
|
when: not ansible_python.has_sslcontext and not is_ubuntu_precise|bool
|
|
|
|
when: not ansible_python.has_sslcontext and not is_ubuntu_precise|bool
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
@ -262,7 +266,8 @@
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- result|success
|
|
|
|
- result|success
|
|
|
|
- '"Great! Your client" in result.content'
|
|
|
|
#- '"Great! Your client" in result.content'
|
|
|
|
|
|
|
|
- "\"<h2>If You Can Read This, You're SNIing</h2>\" in result.content"
|
|
|
|
when: not ansible_python.has_sslcontext and not is_ubuntu_precise|bool
|
|
|
|
when: not ansible_python.has_sslcontext and not is_ubuntu_precise|bool
|
|
|
|
|
|
|
|
|
|
|
|
- name: Uninstall ndg-httpsclient and urllib3
|
|
|
|
- name: Uninstall ndg-httpsclient and urllib3
|
|
|
|