mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-01-30 11:54:55 +01:00
Merge 4dee25d0e64ab9f40002318c69154308f85b26f0 into abbe7818e2780951251c003c2744526201fb6109
This commit is contained in:
commit
67dc7bd6c1
9
.travis.yml
Normal file
9
.travis.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
language: python
|
||||
services: docker
|
||||
|
||||
install:
|
||||
- pip install molecule docker
|
||||
|
||||
script:
|
||||
- cd roles/matrix-coturn && molecule test
|
33
roles/matrix-coturn/.yamllint
Normal file
33
roles/matrix-coturn/.yamllint
Normal 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
|
22
roles/matrix-coturn/molecule/default/INSTALL.rst
Normal file
22
roles/matrix-coturn/molecule/default/INSTALL.rst
Normal 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]'
|
29
roles/matrix-coturn/molecule/default/converge.yml
Normal file
29
roles/matrix-coturn/molecule/default/converge.yml
Normal 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"
|
27
roles/matrix-coturn/molecule/default/molecule.yml
Normal file
27
roles/matrix-coturn/molecule/default/molecule.yml
Normal 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
|
9
roles/matrix-coturn/molecule/default/verify.yml
Normal file
9
roles/matrix-coturn/molecule/default/verify.yml
Normal 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
|
Loading…
x
Reference in New Issue
Block a user