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:
Felix Fontein
2020-12-13 09:06:16 +01:00
committed by GitHub
parent 4cc4766ddb
commit fe2d52ff29
13 changed files with 168 additions and 49 deletions
@@ -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