-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
1 parent
5ce9d06
commit 12281ac
Showing
10 changed files
with
208 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -338,6 +338,10 @@ | |
tags: | ||
- radarr | ||
|
||
- role: romm | ||
tags: | ||
- romm | ||
|
||
- role: route53_ddns | ||
tags: | ||
- route53_ddns | ||
|
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,44 @@ | ||
--- | ||
romm_enabled: false | ||
romm_available_externally: false | ||
|
||
romm_database_username: romm_user | ||
romm_database_password: top_secret | ||
romm_database_root_password: top_top_secret | ||
|
||
# directories | ||
romm_home: "{{ docker_home }}/romm" | ||
romm_data_directory: "{{ romm_home }}/romm" | ||
romm_db_data_directory: "{{ romm_home }}/db" | ||
romm_roms_directory: "{{ roms_root }}" | ||
|
||
# network | ||
romm_port: "8484" | ||
romm_hostname: "romm" | ||
|
||
# docker | ||
romm_container_name: "romm" | ||
romm_image_name: "zurdi15/romm" | ||
romm_image_version: "latest" | ||
|
||
romm_db_container_name: "romm-db" | ||
romm_db_image_name: "mariadb" | ||
romm_db_image_version: "11.2" | ||
|
||
romm_redis_container_name: "romm-redis" | ||
romm_redis_image_name: "redis" | ||
romm_redis_image_version: "alpine" | ||
|
||
# specs | ||
romm_memory: 1g | ||
romm_db_memory: 1g | ||
romm_redis_memory: 1g | ||
|
||
# IGDB auth credentials - see https://github.com/zurdi15/romm/tree/release#-docker for more info | ||
romm_igdb_client_id: "abcd" | ||
romm_igdb_client_secret: "abcd" | ||
|
||
# auth config | ||
romm_auth_secret_key: "aaaabbbbccccdddd" # Generate a key with `openssl rand -hex 32` | ||
romm_auth_username: "admin" | ||
romm_auth_password: "admin" |
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,6 @@ | ||
--- | ||
provisioner: | ||
inventory: | ||
group_vars: | ||
all: | ||
romm_enabled: true |
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: | ||
romm_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,18 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- ansible.builtin.include_vars: | ||
file: ../../defaults/main.yml | ||
|
||
- name: Get Romm container state | ||
community.docker.docker_container: | ||
name: "{{ romm_container_name }}" | ||
register: result | ||
|
||
- name: Check if Romm containers are 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,18 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- ansible.builtin.include_vars: | ||
file: ../../defaults/main.yml | ||
|
||
- name: Try and stop and remove Romm | ||
community.docker.docker_container: | ||
name: "{{ romm_container_name }}" | ||
state: absent | ||
register: result | ||
|
||
- name: Check if joomla 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,91 @@ | ||
--- | ||
- name: Start Romm | ||
block: | ||
- name: Create Romm Directories | ||
ansible.builtin.file: | ||
path: "{{ item }}" | ||
state: directory | ||
with_items: | ||
- "{{ romm_data_directory }}/resources" | ||
- "{{ romm_db_data_directory }}" | ||
|
||
- name: MariaDB Docker Container for Romm | ||
community.docker.docker_container: | ||
name: "{{ romm_db_container_name }}" | ||
image: "{{ romm_db_image_name }}:{{ romm_db_image_version }}" | ||
pull: true | ||
volumes: | ||
- "{{ romm_db_data_directory }}/db:/var/lib/mysql" | ||
env: | ||
MYSQL_ROOT_PASSWORD: "{{ romm_database_root_password }}" | ||
MYSQL_DATABASE: "romm" | ||
MYSQL_USER: "{{ romm_database_username }}" | ||
MYSQL_PASSWORD: "{{ romm_database_password }}" | ||
restart_policy: unless-stopped | ||
memory: "{{ romm_db_memory }}" | ||
|
||
- name: Create Romm Redis | ||
community.docker.docker_container: | ||
name: "{{ romm_redis_container_name }}" | ||
image: "{{ romm_redis_image_name }}:{{ romm_redis_image_version }}" | ||
pull: true | ||
restart_policy: unless-stopped | ||
memory: "{{ romm_redis_memory }}" | ||
|
||
- name: Romm Docker Container | ||
community.docker.docker_container: | ||
name: "{{ romm_container_name }}" | ||
image: "{{ romm_image_name }}:{{ romm_image_version }}" | ||
pull: true | ||
volumes: | ||
- "{{ romm_roms_directory }}:/romm/library/roms:rw" | ||
- "{{ romm_data_directory }}/resources:/romm/resources:rw" | ||
ports: | ||
- "{{ romm_port }}:8080" | ||
env: | ||
ROMM_DB_DRIVER: "mariadb" | ||
DB_HOST: "db" | ||
DB_PORT: "3306" | ||
DB_USER: "{{ romm_database_username }}" | ||
DB_PASSWD: "{{ romm_database_password }}" | ||
DB_NAME: "romm" | ||
ROMM_AUTH_ENABLED: "true" | ||
ROMM_AUTH_SECRET_KEY: "{{ romm_auth_secret_key }}" | ||
ENABLE_EXPERIMENTAL_REDIS: "true" | ||
REDIS_HOST: "redis" | ||
REDIS_PORT: "6379" | ||
IGDB_CLIENT_ID: "{{ romm_igdb_client_id }}" | ||
IGDB_CLIENT_SECRET: "{{ romm_igdb_client_secret }}" | ||
ROMM_AUTH_USERNAME: "{{ romm_auth_username }}" | ||
ROMM_AUTH_PASSWORD: "{{ romm_auth_password }}" | ||
restart_policy: unless-stopped | ||
memory: "{{ romm_memory }}" | ||
links: | ||
- "{{ romm_db_container_name }}:db" | ||
- "{{ romm_redis_container_name }}:redis" | ||
labels: | ||
traefik.enable: "{{ romm_available_externally | string }}" | ||
traefik.http.routers.romm.rule: "Host(`{{ romm_hostname }}.{{ ansible_nas_domain }}`)" | ||
traefik.http.routers.romm.tls.certresolver: "letsencrypt" | ||
traefik.http.routers.romm.tls.domains[0].main: "{{ ansible_nas_domain }}" | ||
traefik.http.routers.romm.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" | ||
traefik.http.services.romm.loadbalancer.server.port: "8080" | ||
homepage.group: Media | ||
homepage.name: Romm | ||
homepage.icon: romm | ||
homepage.href: http://{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:{{ romm_port }} | ||
homepage.description: Game library manager | ||
when: romm_enabled is true | ||
|
||
- name: Stop Romm | ||
block: | ||
- name: Stop Romm | ||
community.docker.docker_container: | ||
name: "{{ romm_container_name }}" | ||
state: absent | ||
|
||
- name: Stop Romm DB | ||
community.docker.docker_container: | ||
name: "{{ romm_db_container_name }}" | ||
state: absent | ||
when: romm_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,15 @@ | ||
--- | ||
title: "Romm" | ||
--- | ||
|
||
Homepage: [https://github.com/zurdi15/romm](https://github.com/zurdi15/romm) | ||
|
||
RomM (ROM Manager) is a game library manager focused on retro gaming. | ||
|
||
It enables you to efficiently manage and organize all your games from a web browser. | ||
|
||
## Usage | ||
|
||
Set `romm_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file. | ||
|
||
The Romm web interface can be found at [http://ansible_nas_host_or_ip:8484](http://ansible_nas_host_or_ip:8484). |
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