mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-12 11:38:47 +00:00
refactor(mumble): add molecule and readme; attempt permissions
Add the expected molecule files as well as the readme for the role. Attempt to change permissions to the uid/gid used inside the Mumble container for the data directory. Refs: #620
This commit is contained in:
parent
b0e69bd74b
commit
aeaecbafe4
6 changed files with 74 additions and 2 deletions
15
roles/mumble/docs/mumble.md
Normal file
15
roles/mumble/docs/mumble.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Mumble
|
||||
|
||||
Homepage: <https://www.mumble.info/>
|
||||
|
||||
Mumble is a free, open source, low latency, high quality voice chat application.
|
||||
|
||||
## Usage
|
||||
|
||||
Set `mumble_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
|
||||
The configuration here applies a server password, via `mumble_server_password`, to the Mumble instance, so that if you make this application available externally it won't be
|
||||
accessible to everyone by default. That being said, it is **strongly** encouraged that
|
||||
you change this value to something unique.
|
||||
|
||||
Clients can then connect to the service at `ansible_nas_host_or_ip:64738` using the
|
||||
password that you've definitely changed.
|
7
roles/mumble/modlecule/default/molecule.yml
Normal file
7
roles/mumble/modlecule/default/molecule.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
mumble_enabled: true
|
||||
|
11
roles/mumble/modlecule/default/side_effect.yml
Normal file
11
roles/mumble/modlecule/default/side_effect.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
- name: Stop
|
||||
hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
|
||||
include_role:
|
||||
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||
vars:
|
||||
mumble_enabled: false
|
||||
|
19
roles/mumble/modlecule/default/verify.yml
Normal file
19
roles/mumble/modlecule/default/verify.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
- name: Verify
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- include_vars:
|
||||
file: ../../defaults/main.yml
|
||||
|
||||
- name: Get container state
|
||||
docker_container_info:
|
||||
name: "{{ mumble_container_name }}"
|
||||
register: result
|
||||
|
||||
- name: Check Mumble is running
|
||||
assert:
|
||||
that:
|
||||
- result.container['State']['Status'] == "running"
|
||||
- result.container['State']['Restarting'] == false
|
||||
|
19
roles/mumble/modlecule/default/verify_stopped.yml
Normal file
19
roles/mumble/modlecule/default/verify_stopped.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
- name: Verify
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- include_vars:
|
||||
file: ../../defaults/main.yml
|
||||
|
||||
- name: Try and stop and remove Mumble
|
||||
docker_container:
|
||||
name: "{{ mumble_container_name }}"
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- name: Check Mumble is stopped
|
||||
assert:
|
||||
that:
|
||||
- not result.changed
|
||||
|
|
@ -7,11 +7,12 @@
|
|||
state: directory
|
||||
# The mumble image gets uid/gid at build time, and uses 1000 for both, by default.
|
||||
# This ends up with permission denied on the data directory, unless we fully open the permissions.
|
||||
mode: "0777"
|
||||
owner: 1000
|
||||
group: 1000
|
||||
with_items:
|
||||
- "{{ mumble_data_directory }}"
|
||||
|
||||
- name: Mumble Docker Container
|
||||
- name: Create Mumble Docker Container
|
||||
docker_container:
|
||||
name: "{{ mumble_container_name }}"
|
||||
image: mumblevoip/mumble-server:latest
|
||||
|
|
Loading…
Reference in a new issue