This commit is contained in:
parent
bfa00828e0
commit
7d0cf70457
27
.drone.yml
Normal file
27
.drone.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: turn
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check syntax
|
||||||
|
image: plugins/ansible:1
|
||||||
|
settings:
|
||||||
|
playbook: playbook.yml
|
||||||
|
inventory: inventory.yml
|
||||||
|
syntax_check: true
|
||||||
|
|
||||||
|
- name: Apply playbook
|
||||||
|
image: plugins/ansible:1
|
||||||
|
volumes:
|
||||||
|
- name: certificates
|
||||||
|
path: /certificates
|
||||||
|
settings:
|
||||||
|
playbook: playbook.yml
|
||||||
|
inventory: inventory.yml
|
||||||
|
private_key:
|
||||||
|
from_secret: ssh_privatekey
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: certificates
|
||||||
|
claim:
|
||||||
|
name: flexvolsmb-drone-certs
|
10
inventory.yml
Normal file
10
inventory.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
all:
|
||||||
|
children:
|
||||||
|
turn:
|
||||||
|
# vars:
|
||||||
|
# # Credentials for Dockerhub
|
||||||
|
# docker_username: # TODO add your ENCRYPTED Docker Hub username here
|
||||||
|
# docker_password: # TODO add your ENCRYPTED Docker Hub password here
|
||||||
|
hosts:
|
||||||
|
bv11-ch01:
|
||||||
|
ansible_host: bv11-ch01.bessems.lan
|
10
playbook.yml
Normal file
10
playbook.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
- hosts: turn
|
||||||
|
remote_user: root
|
||||||
|
gather_facts: false
|
||||||
|
vars:
|
||||||
|
coturn:
|
||||||
|
version: 4.6-alpine
|
||||||
|
roles:
|
||||||
|
- dockerhost
|
||||||
|
- turn
|
48
roles/dockerhost/tasks/main.yml
Normal file
48
roles/dockerhost/tasks/main.yml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
- name: Remove undesired packages
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- containerd
|
||||||
|
- docker
|
||||||
|
- docker-engine
|
||||||
|
- docker.io
|
||||||
|
- runc
|
||||||
|
- snapd
|
||||||
|
state: absent
|
||||||
|
autoremove: yes
|
||||||
|
purge: yes
|
||||||
|
|
||||||
|
- name: Install prereqs for custom apt repository over https
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
name:
|
||||||
|
- apt-transport-https
|
||||||
|
- ca-certificates
|
||||||
|
- curl
|
||||||
|
- gnupg-agent
|
||||||
|
- software-properties-common
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Add Docker repo key
|
||||||
|
apt_key:
|
||||||
|
url: https://download.docker.com/linux/ubuntu/gpg
|
||||||
|
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Determine Ubuntu distribution name
|
||||||
|
command: lsb_release -cs
|
||||||
|
register: releasename
|
||||||
|
|
||||||
|
- name: Add Docker apt repository
|
||||||
|
apt_repository:
|
||||||
|
repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ releasename.stdout }} stable
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install Docker engine
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
allow_unauthenticated: yes
|
||||||
|
name:
|
||||||
|
- docker-ce
|
||||||
|
- docker-ce-cli
|
||||||
|
- docker-compose-plugin
|
||||||
|
- containerd.io
|
14
roles/turn/tasks/main.yml
Normal file
14
roles/turn/tasks/main.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
- name: Run coturn container
|
||||||
|
community.docker.docker_container:
|
||||||
|
name: coturn
|
||||||
|
image: bv11-cr01.bessems.eu/proxy/coturn/coturn:{{ turn.version }}
|
||||||
|
command: |
|
||||||
|
-n \
|
||||||
|
-v \
|
||||||
|
--log-file=stdout \
|
||||||
|
--lt-cred-mech \
|
||||||
|
--no-cli \
|
||||||
|
--no-tls \
|
||||||
|
--realm=dendrite
|
||||||
|
network_mode: host
|
||||||
|
restart_policy: unless-stopped
|
Loading…
Reference in New Issue
Block a user