Skip to content
Snippets Groups Projects
Commit 4a5e2796 authored by nimrod's avatar nimrod
Browse files

- More reliable testing of SNI with Ansible.

- More concise list of packages of SNI support.
- Don't upgrade pip for SNI support.
parent fe77189a
No related branches found
No related tags found
No related merge requests found
...@@ -16,11 +16,9 @@ ...@@ -16,11 +16,9 @@
- name: pip install SSL SNI support - name: pip install SSL SNI support
with_items: with_items:
- pip>=9.0.1
- urllib3[secure]>=1.11 - urllib3[secure]>=1.11
- ndg-httpsclient>=0.4.0 - ndg-httpsclient>=0.4.0
- setuptools[certs]>=28.1.0 - pyasn1
- requests[security]>=2.12.1
pip: pip:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
......
...@@ -20,3 +20,15 @@ ...@@ -20,3 +20,15 @@
- hosts: all - hosts: all
roles: roles:
- role: python27 - role: python27
post_tasks:
- name: Test SNI
get_url:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
dest: /tmp/nodesource.gpg.key
changed_when: False
- name: Test pip install
pip:
name: netaddr
state: present
changed_when: False
import pytest
from testinfra.utils.ansible_runner import AnsibleRunner
testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all')
@pytest.mark.xfail
@pytest.mark.parametrize('error', [
'InsecureRequestWarning', 'InsecurePlatformWarning', 'SNIMissingWarning'
])
def test_sni(Command, error):
assert error not in Command('pip2 install nonexistant-package').stderr
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment