This commit is contained in:
Fanch 2024-04-07 09:34:28 +02:00 committed by GitHub
commit e499b0605e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 129 additions and 0 deletions

9
.travis.yml Normal file
View File

@ -0,0 +1,9 @@
---
language: python
services: docker
install:
- pip install molecule docker
script:
- cd roles/matrix-coturn && molecule test

View File

@ -0,0 +1,33 @@
---
# Based on ansible-lint config
extends: default
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
colons:
max-spaces-after: -1
level: error
commas:
max-spaces-after: -1
level: error
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
max: 3
level: error
hyphens:
level: error
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
new-lines:
type: unix
trailing-spaces: disable
truthy: disable

View File

@ -0,0 +1,22 @@
*******
Docker driver installation guide
*******
Requirements
============
* Docker Engine
Install
=======
Please refer to the `Virtual environment`_ documentation for installation best
practices. If not using a virtual environment, please consider passing the
widely recommended `'--user' flag`_ when invoking ``pip``.
.. _Virtual environment: https://virtualenv.pypa.io/en/latest/
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
.. code-block:: bash
$ python3 -m pip install 'molecule[docker]'

View File

@ -0,0 +1,29 @@
---
- name: Converge
hosts: all
tasks:
- name: "Include matrix-base"
include_role:
name: "matrix-base"
vars:
matrix_domain: "example.org"
matrix_vars_yml_snapshotting_enabled: false
run_self_check: false
- name: "Include matrix-coturn"
include_role:
name: "matrix-coturn"
vars:
matrix_systemd_services_list: []
run_setup: true
matrix_base_data_path: "/matrix"
matrix_user_username: "root"
matrix_user_groupname: "root"
matrix_server_fqn_matrix: "example.org"
matrix_systemd_path: "/etc/systemd/system"
matrix_host_command_docker: "/usr/bin/env docker"
# matrix_user_uid: 0
# matrix_user_gid: 0
# maybe those should be added in role default/main.yml
matrix_coturn_enabled: true
matrix_coturn_turn_external_ip_address: 127.0.0.1
matrix_coturn_turn_static_auth_secret: "VeryFakeSecret"

View File

@ -0,0 +1,27 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: coturn-test
image: fanchthesystem/ubuntu18-with-systemd:latest #fanchthesystem/centos7-with-systemd:latest # docker.io/pycontribs/centos:7
override_command: false
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
# - /var/run/docker.sock:/var/run/docker.sock
# network:
# - name: dind-network
# env:
# DOCKER_HOST: "tcp://dind:2375"
# https://blog.alekc.org/testing-ansible-roles-with-molecule-using-dind/
# https://github.com/ansible/ansible/issues/71528
provisioner:
name: ansible
log: true
config_options:
defaults:
timeout: 60
verifier:
name: ansible

View File

@ -0,0 +1,9 @@
---
# This is an example playbook to execute Ansible tests.
- name: Verify
hosts: all
tasks:
- name: Example assertion
assert:
that: true