mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Fix AZP tests, add current_container_facts module (#48)
* Add new facts module for determining whether the module is running inside a container or not. * Add containers to main network. * Fix running tests locally with newer docker. * Simplify setup_openssl to only install cryptography. * Add alias in network. * Make sure to upgrade cryptography to something more sensible on Ubuntu 16.04. * Don't jump through hoops for bridge. * Try to use other IPv4 nets. * Improve module docs.
This commit is contained in:
@@ -8,39 +8,24 @@
|
||||
include_vars: '{{ ansible_os_family }}.yml'
|
||||
when: not ansible_os_family == "Darwin"
|
||||
|
||||
- name: Install OpenSSL
|
||||
become: True
|
||||
- name: Install cryptography (Python 3)
|
||||
become: true
|
||||
package:
|
||||
name: '{{ openssl_package_name }}'
|
||||
when: not ansible_os_family == 'Darwin'
|
||||
name: '{{ cryptography_package_name_python3 }}'
|
||||
when: ansible_os_family != 'Darwin' and ansible_python_version is version('3.0', '>=')
|
||||
|
||||
- name: Install pyOpenSSL (Python 3)
|
||||
become: True
|
||||
- name: Install cryptography (Python 2)
|
||||
become: true
|
||||
package:
|
||||
name: '{{ pyopenssl_package_name_python3 }}'
|
||||
when: not ansible_os_family == 'Darwin' and ansible_python_version is version('3.0', '>=')
|
||||
name: '{{ cryptography_package_name }}'
|
||||
when: ansible_os_family != 'Darwin' and ansible_python_version is version('3.0', '<')
|
||||
|
||||
- name: Install pyOpenSSL (Python 2)
|
||||
become: True
|
||||
package:
|
||||
name: '{{ pyopenssl_package_name }}'
|
||||
when: not ansible_os_family == 'Darwin' and ansible_python_version is version('3.0', '<')
|
||||
|
||||
- name: Install pyOpenSSL (Darwin)
|
||||
become: True
|
||||
- name: Install cryptography (Darwin, and potentially upgrade for other OSes)
|
||||
become: true
|
||||
pip:
|
||||
name: pyOpenSSL
|
||||
name: cryptography>=1.3.0
|
||||
extra_args: "-c {{ remote_constraints }}"
|
||||
when: ansible_os_family == 'Darwin'
|
||||
|
||||
- name: register pyOpenSSL version
|
||||
command: "{{ ansible_python.executable }} -c 'import OpenSSL; print(OpenSSL.__version__)'"
|
||||
register: pyopenssl_version
|
||||
|
||||
- name: register openssl version
|
||||
shell: "openssl version | cut -d' ' -f2"
|
||||
register: openssl_version
|
||||
|
||||
- name: register cryptography version
|
||||
- name: Register cryptography version
|
||||
command: "{{ ansible_python.executable }} -c 'import cryptography; print(cryptography.__version__)'"
|
||||
register: cryptography_version
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
pyopenssl_package_name: python-openssl
|
||||
pyopenssl_package_name_python3: python3-openssl
|
||||
openssl_package_name: openssl
|
||||
---
|
||||
cryptography_package_name: python-cryptography
|
||||
cryptography_package_name_python3: python3-cryptography
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
pyopenssl_package_name: py27-openssl
|
||||
pyopenssl_package_name_python3: py36-openssl
|
||||
openssl_package_name: openssl
|
||||
---
|
||||
cryptography_package_name: py27-cryptography
|
||||
cryptography_package_name_python3: py36-cryptography
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
pyopenssl_package_name: pyOpenSSL
|
||||
pyopenssl_package_name_python3: python3-pyOpenSSL
|
||||
openssl_package_name: openssl
|
||||
---
|
||||
cryptography_package_name: python-cryptography
|
||||
cryptography_package_name_python3: python3-cryptography
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
pyopenssl_package_name: python-pyOpenSSL
|
||||
pyopenssl_package_name_python3: python3-pyOpenSSL
|
||||
openssl_package_name: openssl
|
||||
---
|
||||
cryptography_package_name: python-cryptography
|
||||
cryptography_package_name_python3: python3-cryptography
|
||||
|
||||
Reference in New Issue
Block a user