forked from davestephens/ansible-nas
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -849,6 +849,10 @@ | |
tags: | ||
- searxng | ||
|
||
- role: scribblers | ||
tags: | ||
- scribblers | ||
|
||
- role: shaarli | ||
tags: | ||
- shaarli | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
scribblers_enabled: false | ||
scribblers_available_externally: false | ||
|
||
# directories | ||
scribblers_data_directory: "{{ docker_home }}/scribblers" | ||
|
||
# network | ||
scribblers_port: "8183" | ||
scribblers_hostname: "scribblers" | ||
|
||
# specs | ||
scribblers_memory: 1g | ||
|
||
# docker | ||
scribblers_container_name: scribblers | ||
scribblers_image_name: biosmarcel/scribble.rs | ||
scribblers_image_version: latest | ||
|
||
scribblers_env_port: "8080" | ||
scribblers_public: "false" | ||
scribblers_drawing_time: "120" | ||
scribblers_rounds: "4" | ||
scribblers_max_players: "12" | ||
scribblers_custom_words: "" | ||
scribblers_custom_words_per_turn: "3" | ||
scribblers_clients_per_ip_limit: "4" | ||
scribblers_language: "english" | ||
scribblers_allowed_origins: "*" | ||
scribblers_allow_credentials: "false" | ||
scribblers_interval: "90s" | ||
scribblers_player_inactivity_threshold: "75s" | ||
scribblers_network_address: "" | ||
scribblers_root_path: "/" | ||
scribblers_cpu_profile_path: "" | ||
|
||
scribblers_env: | ||
PORT: "{{ scribblers_env_port | default(omit) }}" | ||
PUBLIC: "{{ scribblers_public | default(omit) }}" | ||
DRAWING_TIME: "{{ scribblers_drawing_time | default(omit) }}" | ||
ROUNDS: "{{ scribblers_rounds | default(omit) }}" | ||
MAX_PLAYERS: "{{ scribblers_max_players | default(omit) }}" | ||
CUSTOM_WORDS: "{{ scribblers_custom_words | default(omit) }}" | ||
CUSTOM_WORDS_PER_TURN: "{{ scribblers_custom_words_per_turn | default(omit) }}" | ||
CLIENTS_PER_IP_LIMIT: "{{ scribblers_clients_per_ip_limit | default(omit) }}" | ||
LANGUAGE: "{{ scribblers_language | default(omit) }}" | ||
ALLOWED_ORIGINS: "{{ scribblers_allowed_origins | default(omit) }}" | ||
ALLOW_CREDENTIALS: "{{ scribblers_allow_credentials | default(omit) }}" | ||
INTERVAL: "{{ scribblers_interval | default(omit) }}" | ||
PLAYER_INACTIVITY_THRESHOLD: "{{ scribblers_player_inactivity_threshold | default(omit) }}" | ||
NETWORK_ADDRESS: "{{ scribblers_network_address | default(omit) }}" | ||
ROOT_PATH: "{{ scribblers_root_path | default(omit) }}" | ||
CPU_PROFILE_PATH: "{{ scribblers_cpu_profile_path | default(omit) }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
provisioner: | ||
inventory: | ||
group_vars: | ||
all: | ||
scribblers_enabled: true | ||
scribblers_data_directory: "/tmp/scribblers" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Stop | ||
hosts: all | ||
become: true | ||
tasks: | ||
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role" | ||
ansible.builtin.include_role: | ||
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" | ||
vars: | ||
scribblers_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: Include vars | ||
ansible.builtin.include_vars: | ||
file: ../../defaults/main.yml | ||
|
||
- name: Get container state | ||
community.docker.docker_container_info: | ||
name: "{{ scribblers_container_name }}" | ||
register: result | ||
|
||
- name: Check scribblers is running | ||
ansible.builtin.assert: | ||
that: | ||
- result.container['State']['Status'] == "running" | ||
- result.container['State']['Restarting'] == false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: Include vars | ||
ansible.builtin.include_vars: | ||
file: ../../defaults/main.yml | ||
|
||
- name: Try and stop and remove scribblers | ||
community.docker.docker_container: | ||
name: "{{ scribblers_container_name }}" | ||
state: absent | ||
register: result | ||
|
||
- name: Check scribblers is stopped | ||
ansible.builtin.assert: | ||
that: | ||
- not result.changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../requirements.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
- name: Start Scribble.rs | ||
block: | ||
- name: Create Scribble.rs Directory | ||
ansible.builtin.file: | ||
path: "{{ item }}" | ||
state: directory | ||
with_items: | ||
- "{{ scribblers_data_directory }}" | ||
|
||
- name: Scribble.rs Docker Container | ||
community.docker.docker_container: | ||
name: "{{ scribblers_container_name }}" | ||
image: "{{ scribblers_image_name }}:{{ scribblers_image_version }}" | ||
pull: true | ||
ports: | ||
- "{{ scribblers_port }}:{{ scribblers_env_port }}" | ||
restart_policy: unless-stopped | ||
memory: "{{ scribblers_memory }}" | ||
env: "{{ scribblers_optional_env | default({}) | combine(scribblers_env) }}" | ||
labels: | ||
traefik.enable: "{{ scribblers_available_externally | string }}" | ||
traefik.http.routers.scribblers.rule: "Host(`{{ scribblers_hostname }}.{{ ansible_nas_domain }}`)" | ||
traefik.http.routers.scribblers.tls.certresolver: "letsencrypt" | ||
traefik.http.routers.scribblers.tls.domains[0].main: "{{ ansible_nas_domain }}" | ||
traefik.http.routers.scribblers.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" | ||
traefik.http.services.scribblers.loadbalancer.server.port: "8080" | ||
when: scribblers_enabled is true | ||
|
||
- name: Stop Scribble.rs | ||
block: | ||
- name: Stop Scribble.rs | ||
community.docker.docker_container: | ||
name: "{{ scribblers_container_name }}" | ||
state: absent | ||
when: scribblers_enabled is false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: "Scribble.rs" | ||
description: "A skribbl.io alternative" | ||
--- | ||
|
||
Homepage: [https://github.com/scribble-rs/scribble.rs](https://github.com/scribble-rs/scribble.rs) | ||
|
||
Scribble.rs is an alternative to the web-based drawing game skribbl.io. My main problems with skribbl.io were the ads and the fact that a disconnect would cause you to lose your points. On top of that, the automatic word choice was quite annoying and caused some frustration. | ||
|
||
## Usage | ||
|
||
Set `scribblers_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file. | ||
|
||
Scribble.rs web interface can be found at [http://ansible_nas_host_or_ip:8140](http://ansible_nas_host_or_ip:8183). |