Another set: heimdall to overseer

This commit is contained in:
Anarion 2023-03-09 21:47:42 +01:00
parent 463ea6f5cf
commit e253f0a5d0
No known key found for this signature in database
GPG key ID: 6C9E149718A7D4EB
210 changed files with 3504 additions and 838 deletions

17
nas.yml
View file

@ -148,7 +148,6 @@
- role: heimdall - role: heimdall
tags: tags:
- heimdall - heimdall
when: (heimdall_enabled | default(False))
- role: hello_world - role: hello_world
tags: tags:
@ -157,82 +156,66 @@
- role: homeassistant - role: homeassistant
tags: tags:
- homeassistant - homeassistant
when: (homeassistant_enabled | default(False))
- role: homebridge - role: homebridge
tags: tags:
- homebridge - homebridge
when: (homebridge_enabled | default(False))
- role: jackett - role: jackett
tags: tags:
- jackett - jackett
when: (jackett_enabled | default(False))
- role: jellyfin - role: jellyfin
tags: tags:
- jellyfin - jellyfin
when: (jellyfin_enabled | default(False))
- role: joomla - role: joomla
tags: tags:
- joomla - joomla
when: (joomla_enabled | default(False))
- role: komga - role: komga
tags: tags:
- komga - komga
when: (komga_enabled | default(False))
- role: krusader - role: krusader
tags: tags:
- krusader - krusader
when: (krusader_enabled | default(False))
- role: lidarr - role: lidarr
tags: tags:
- lidarr - lidarr
when: (lidarr_enabled | default(False))
- role: mealie - role: mealie
tags: tags:
- mealie - mealie
when: (mealie_enabled | default(False))
- role: minecraft-server - role: minecraft-server
tags: tags:
- minecraft-server - minecraft-server
when: (minecraft_server_enabled | default(False))
- role: minidlna - role: minidlna
tags: tags:
- minidlna - minidlna
when: (minidlna_enabled | default(False))
- role: miniflux - role: miniflux
tags: tags:
- miniflux - miniflux
when: (miniflux_enabled | default(False))
- role: mosquitto - role: mosquitto
tags: tags:
- mosquitto - mosquitto
when: (mosquitto_enabled | default(False))
- role: mylar - role: mylar
tags: tags:
- mylar - mylar
when: (mylar_enabled | default(False))
- role: mymediaforalexa - role: mymediaforalexa
tags: tags:
- mymediaforalexa - mymediaforalexa
when: (mymediaforalexa_enabled | default(False))
- role: n8n - role: n8n
tags: tags:
- n8n - n8n
when: (n8n_enabled | default(False))
- role: navidrome - role: navidrome
tags: tags:

View file

@ -0,0 +1,15 @@
# Heimdall
Homepage: <https://heimdall.site/>
Heimdall Application Dashboard is a dashboard for all your web applications. It doesn't need to be limited to applications though, you can add links to anything you like
## Usage
Set `heimdall_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
The Heimdall web interface can be found at <http://ansible_nas_host_or_ip:10080>.
## Specific Configuration
Heimdall defaults to port 10080 - some browsers block this port. Override `heimdall_port_http` to move it somewhere else.

View file

@ -9,5 +9,10 @@ homeassistant_data_directory: "{{ docker_home }}/homeassistant"
homeassistant_port: "8123" homeassistant_port: "8123"
homeassistant_hostname: "homeassistant" homeassistant_hostname: "homeassistant"
# docker
homeassistant_container_name: "homeassistant"
homeassistant_image_name: "homeassistant/home-assistant"
homeassistant_image_version: latest
# specs # specs
homeassistant_memory: 1g homeassistant_memory: 1g

View file

@ -0,0 +1,13 @@
# Home Assistant
Homepage: <https://www.home-assistant.io/>
Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts.
## Usage
Set `homeassistant_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
If you want to access Home Assistant externally, don't forget to set `homeassistant_available_externally: true` in your `inventories/<your_inventory>/nas.yml` file.
The Home Assistant web interface can be found at <http://ansible_nas_host_or_ip:8123>.

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
homeassistant_enabled: true

View file

@ -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:
homeassistant_enabled: false

View file

@ -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 homeassistant container state
community.docker.docker_container:
name: "{{ homeassistant_container_name }}"
register: result
- name: Check if homeassistant containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -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 homeassistant
community.docker.docker_container:
name: "{{ homeassistant_container_name }}"
state: absent
register: result
- name: Check if homeassistant is stopped
ansible.builtin.assert:
that:
- not result.changed

View file

@ -1,15 +1,18 @@
--- ---
- name: Start Homeassistant
block:
- name: Create Home Assistant Directories - name: Create Home Assistant Directories
file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
with_items: with_items:
- "{{ homeassistant_data_directory }}/config" - "{{ homeassistant_data_directory }}/config"
- name: Home Assistant Docker Container - name: Home Assistant Docker Container
docker_container: community.docker.docker_container:
name: homeassistant container_default_behavior: no_defaults
image: homeassistant/home-assistant name: "{{ homeassistant_container_name }}"
image: "{{ homeassistant_image_name }}:{{ homeassistant_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ homeassistant_data_directory }}/config:/config:rw" - "{{ homeassistant_data_directory }}/config:/config:rw"
@ -25,3 +28,12 @@
traefik.http.routers.homeassistant.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.routers.homeassistant.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.homeassistant.loadbalancer.server.port: "8123" traefik.http.services.homeassistant.loadbalancer.server.port: "8123"
memory: "{{ homeassistant_memory }}" memory: "{{ homeassistant_memory }}"
when: homeassistant_enabled is true
- name: Stop homeassistant
block:
- name: Stop homeassistant
community.docker.docker_container:
name: "{{ homeassistant_container_name }}"
state: absent
when: homeassistant_enabled is false

View file

@ -14,5 +14,10 @@ homebridge_group_id: "0"
homebridge_hostname: "homebridge" homebridge_hostname: "homebridge"
homebridge_port: "8087" homebridge_port: "8087"
# docker
homebridge_container_name: "homebridge"
homebridge_image_name: "oznu/homebridge"
homebridge_image_version: "latest"
# specs # specs
homebridge_memory: "1g" homebridge_memory: "1g"

View file

@ -0,0 +1,11 @@
# Homebridge
Homepage: <https://github.com/nfarina/homebridge>
Homebridge is a lightweight NodeJS server you can run on your home network that emulates the iOS HomeKit API. It supports Plugins, which are community-contributed modules that provide a basic bridge from HomeKit to various 3rd-party APIs provided by manufacturers of "smart home" devices.
## Usage
Set `homebridge_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
The Homebridge web interface can be found at <http://ansible_nas_host_or_ip:8087>. The default username and password is 'admin' - change this after your first login!

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
homebridge_enabled: true

View file

@ -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:
homebridge_enabled: false

View file

@ -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 homebridge container state
community.docker.docker_container:
name: "{{ homebridge_container_name }}"
register: result
- name: Check if homebridge containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -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 homebridge
community.docker.docker_container:
name: "{{ homebridge_container_name }}"
state: absent
register: result
- name: Check if homebridge is stopped
ansible.builtin.assert:
that:
- not result.changed

View file

@ -1,6 +1,8 @@
--- ---
- name: Start Homebridge
block:
- name: Create Homebridge Directories - name: Create Homebridge Directories
file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
# mode: 0755 # mode: 0755
@ -8,9 +10,10 @@
- "{{ homebridge_config_directory }}" - "{{ homebridge_config_directory }}"
- name: Create Homebridge Docker Container - name: Create Homebridge Docker Container
docker_container: community.docker.docker_container:
name: homebridge container_default_behavior: no_defaults
image: oznu/homebridge name: "{{ homebridge_container_name }}"
image: "{{ homebridge_image_name }}:{{ homebridge_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ homebridge_config_directory }}:/homebridge" - "{{ homebridge_config_directory }}:/homebridge"
@ -30,3 +33,12 @@
traefik.http.routers.homebridge.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.homebridge.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.homebridge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.routers.homebridge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.homebridge.loadbalancer.server.port: "8087" traefik.http.services.homebridge.loadbalancer.server.port: "8087"
when: homebridge_enabled is true
- name: Stop Homebridge
block:
- name: Stop Homebridge
community.docker.docker_container:
name: "{{ homebridge_container_name }}"
state: absent
when: homebridge_enabled is false

View file

@ -11,5 +11,10 @@ jackett_torrents_root: "{{ torrents_root }}"
jackett_hostname: "jackett" jackett_hostname: "jackett"
jackett_port: "9117" jackett_port: "9117"
# docker
jackett_container_name: "jackett"
jackett_image_name: "linuxserver/jackett"
jackett_image_version: "latest"
# specs # specs
jackett_memory: "1g" jackett_memory: "1g"

View file

@ -0,0 +1,11 @@
# Jackett
Homepage: <https://github.com/Jackett/Jackett>
Jackett works as a proxy server: it translates queries from apps (Sonarr, Radarr, SickRage, CouchPotato, Mylar, DuckieTV, qBittorrent, Nefarious etc) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. This allows for getting recent uploads (like RSS) and performing searches. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps.
## Usage
Set `jackett_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
The Jackett web interface can be found at <http://ansible_nas_host_or_ip:9117>.

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
jackett_enabled: true

View file

@ -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:
jackett_enabled: false

View file

@ -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 jackett container state
community.docker.docker_container:
name: "{{ jackett_container_name }}"
register: result
- name: Check if jackett containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -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 jackett
community.docker.docker_container:
name: "{{ jackett_container_name }}"
state: absent
register: result
- name: Check if jackett is stopped
ansible.builtin.assert:
that:
- not result.changed

View file

@ -1,15 +1,18 @@
--- ---
- name: Create jackett Directories - name: Start Jackett
file: block:
- name: Create Jackett Directories
ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
with_items: with_items:
- "{{ jackett_data_directory }}" - "{{ jackett_data_directory }}"
- name: Jackett Docker Container - name: Jackett Docker Container
docker_container: community.docker.docker_container:
name: jackett container_default_behavior: no_defaults
image: linuxserver/jackett name: "{{ jackett_container_name }}"
image: "{{ jackett_image_name }}:{{ jackett_image_version }}"
volumes: volumes:
- "{{ jackett_data_directory }}:/config:rw" - "{{ jackett_data_directory }}:/config:rw"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
@ -27,3 +30,12 @@
traefik.http.routers.jackett.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.jackett.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.jackett.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.routers.jackett.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.jackett.loadbalancer.server.port: "9117" traefik.http.services.jackett.loadbalancer.server.port: "9117"
when: jackett_enabled is true
- name: Stop Jackett
block:
- name: Stop Jackett
community.docker.docker_container:
name: "{{ jackett_container_name }}"
state: absent
when: jackett_enabled is false

View file

@ -29,5 +29,10 @@ jellyfin_hostname: "jellyfin"
jellyfin_port_http: "8896" jellyfin_port_http: "8896"
jellyfin_port_https: "8928" jellyfin_port_https: "8928"
# docker
jellyfin_container_name: "jellyfin"
jellyfin_image_name: "linuxserver/jellyfin"
jellyfin_image_version: "latest"
# specs # specs
jellyfin_memory: "1g" jellyfin_memory: "1g"

View file

@ -0,0 +1,65 @@
# Jellyfin
Homepage: <https://jellyfin.org/>
Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it. We welcome anyone who is interested in joining us in our quest!
Note that [Plex](https://www.plex.tv/), also included in Ansible-NAS, has a very
similar functionality.
## Usage
Set `jellyfin_enabled: true` in your `inventories/<your_inventory>/nas.yml` file. There are further
parameters you can edit such as `movies_root`, `tv_root` or `music_root` lower down
## Specific Configuration
The jellyfin web interface can be found at port 8896 (http) or 8928 (https, if
configured) of your NAS.
By default, Ansible-NAS gives jellyfin read/write access to the folders where your
movies, TV shows and music are stored. To change this to read-only, edit the following
lines in `all.yml`:
```yaml
jellyfin_movies_permissions: "rw"
jellyfin_tv_permissions: "rw"
jellyfin_books_permissions: "rw"
jellyfin_audiobooks_permissions: "rw"
jellyfin_music_permissions: "rw"
```
so that they end in `ro` instead of `rw`. Note that jellyfin will not be able to
delete files then, which might be exactly what you want. However, you will not
have the option to store cover art in the related folders. Always leave the
configuration directory read/write
## Naming movies and TV shows
jellyfin is very fussy about how movies and TV shows must be named to enable
automatic downloads of cover art and metadata. In short, movie files should
follow how movies are listed in the [IMDb](https://www.imdb.com/), including the
year of publication:
```raw
movies/Bride of Frankenstein (1935).mp4
```
Note the spaces. You should probably remove colons and other special characters
TV shows require a folder structure with the name of the series - again if
possible with the year of publication - followed by sub-folders for the
individual seasons. For example, the first episode of the first season of
the original "Doctor Who" could be stored as:
```raw
tv/Doctor Who (1963)/Season 1/Doctor Who - s01e01.mp4
```
The [TVDB](https://www.thetvdb.com/) is one source for the exact names of TV
shows.
Unfortunately, there are number of special cases, especially related to split
movies and older series. See the [movie
naming](https://github.com/MediaBrowser/Wiki/wiki/Movie%20naming) and [TV
naming](https://github.com/MediaBrowser/Wiki/wiki/TV-naming) guides for further
information.

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
jellyfin_enabled: true

View file

@ -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:
jellyfin_enabled: false

View file

@ -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 jellyfin container state
community.docker.docker_container:
name: "{{ jellyfin_container_name }}"
register: result
- name: Check if jellyfin containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -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 jellyfin
community.docker.docker_container:
name: "{{ jellyfin_container_name }}"
state: absent
register: result
- name: Check if jellyfin is stopped
ansible.builtin.assert:
that:
- not result.changed

View file

@ -1,15 +1,18 @@
--- ---
- name: Start jellyfin
block:
- name: Create Jellyfin Directories - name: Create Jellyfin Directories
file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
with_items: with_items:
- "{{ jellyfin_config_directory }}" - "{{ jellyfin_config_directory }}"
- name: Jellyfin Docker Container - name: Jellyfin Docker Container
docker_container: community.docker.docker_container:
name: jellyfin container_default_behavior: no_defaults
image: linuxserver/jellyfin name: "{{ jellyfin_container_name }}"
image: "{{ jellyfin_image_name }}:{{ jellyfin_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ jellyfin_config_directory }}:/config:rw" - "{{ jellyfin_config_directory }}:/config:rw"
@ -35,3 +38,12 @@
traefik.http.routers.jellyfin.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.jellyfin.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.jellyfin.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.routers.jellyfin.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.jellyfin.loadbalancer.server.port: "8096" traefik.http.services.jellyfin.loadbalancer.server.port: "8096"
when: jellyfin_enabled is true
- name: Stop jellyfin
block:
- name: Stop jellyfin
community.docker.docker_container:
name: "{{ jellyfin_container_name }}"
state: absent
when: jellyfin_enabled is false

View file

@ -10,6 +10,16 @@ joomla_data_directory: "{{ docker_home }}/joomla"
# network # network
joomla_port: "8181" joomla_port: "8181"
joomla_hostname: "joomla" joomla_hostname: "joomla"
joomla_network_name: "joomla"
# docker
joomla_container_name: "joomla"
joomla_image_name: "joomla"
joomla_image_version: "latest"
joomla_db_container_name: "joomla-db"
joomla_db_image_name: "mysql"
joomla_db_image_version: "5.7"
# specs # specs
joomla_memory: 1g joomla_memory: 1g
joomla_db_memory: 1g

View file

@ -0,0 +1,23 @@
# Joomla
Homepage: <https://www.joomla.org/>
Joomla! is an award-winning content management system (CMS), which enables you to build web sites and powerful online applications.
## Usage
Set `joomla_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
If you want to access Joomla externally, set `joomla_available_externally: true` in your `inventories/<your_inventory>/nas.yml` file.
The Joomla web interface can be found at <http://ansible_nas_host_or_ip:8181>.
## Specific Configuration
- Set `joomla_database_password` in your `all.yml` before installing Joomla.
- On first run you'll need to enter database details:
- Host: `mysql`
- Database: `joomla`
- Username: `root`
- Password: whatever you set for `joomla_database_password`.

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
joomla_enabled: true

View file

@ -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:
joomla_enabled: false

View file

@ -0,0 +1,26 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
ansible.builtin.include_vars:
file: ../../defaults/main.yml
- name: Get joomla container state
community.docker.docker_container:
name: "{{ joomla_container_name }}"
register: result
- name: Get joomla db container state
community.docker.docker_container:
name: "{{ joomla_db_container_name }}"
register: result_db
- name: Check if joomla containers are running
ansible.builtin.assert:
that:
- result_db.container['State']['Status'] == "running"
- result_db.container['State']['Restarting'] == false
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -0,0 +1,26 @@
---
- 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 joomla
community.docker.docker_container:
name: "{{ joomla_container_name }}"
state: absent
register: result
- name: Try and stop and remove joomla db
community.docker.docker_container:
name: "{{ joomla_db_container_name }}"
state: absent
register: result_db
- name: Check if joomla is stopped
ansible.builtin.assert:
that:
- not result.changed
- not result_db.changed

View file

@ -1,17 +1,27 @@
--- ---
- name: Start Joomla
block:
- name: Create Joomla Directories - name: Create Joomla Directories
file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
with_items: with_items:
- "{{ joomla_data_directory }}" - "{{ joomla_data_directory }}"
- "{{ joomla_data_directory }}/db" - "{{ joomla_data_directory }}/db"
- name: Create Joomla network
community.docker.docker_network:
name: "{{ joomla_network_name }}"
- name: MySQL Docker Container for Joomla - name: MySQL Docker Container for Joomla
docker_container: community.docker.docker_container:
name: joomla_mysql container_default_behavior: no_defaults
image: mysql:5.7 name: "{{ joomla_db_container_name }}"
image: "{{ joomla_db_image_name }}:{{ joomla_db_image_version }}"
pull: true pull: true
networks:
- name: "{{ joomla_network_name }}"
network_mode: "{{ joomla_network_name }}"
volumes: volumes:
- "{{ joomla_data_directory }}/db:/var/lib/mysql" - "{{ joomla_data_directory }}/db:/var/lib/mysql"
env: env:
@ -19,21 +29,23 @@
MYSQL_USER: "joomla" MYSQL_USER: "joomla"
MYSQL_ROOT_PASSWORD: "{{ joomla_database_password }}" MYSQL_ROOT_PASSWORD: "{{ joomla_database_password }}"
restart_policy: unless-stopped restart_policy: unless-stopped
memory: 1g memory: "{{ joomla_db_memory }}"
- name: Joomla Docker Container - name: Joomla Docker Container
docker_container: community.docker.docker_container:
name: joomla container_default_behavior: no_defaults
image: joomla name: "{{ joomla_container_name }}"
image: "{{ joomla_image_name }}:{{ joomla_image_version }}"
pull: true pull: true
networks:
- name: "{{ joomla_network_name }}"
network_mode: "{{ joomla_network_name }}"
volumes: volumes:
- "{{ joomla_data_directory }}:/var/www/html:rw" - "{{ joomla_data_directory }}:/var/www/html:rw"
ports: ports:
- "{{ joomla_port }}:80" - "{{ joomla_port }}:80"
links:
- "joomla_mysql:mysql"
env: env:
JOOMLA_DB_HOST: "mysql" JOOMLA_DB_HOST: "{{ joomla_db_container_name }}"
JOOMLA_DB_USER: "root" JOOMLA_DB_USER: "root"
JOOMLA_DB_PASSWORD: "{{ joomla_database_password }}" JOOMLA_DB_PASSWORD: "{{ joomla_database_password }}"
restart_policy: unless-stopped restart_policy: unless-stopped
@ -45,3 +57,16 @@
traefik.http.routers.joomla.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.joomla.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.joomla.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.routers.joomla.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.joomla.loadbalancer.server.port: "80" traefik.http.services.joomla.loadbalancer.server.port: "80"
when: joomla_enabled is true
- name: Stop Joomla
block:
- name: Stop Joomla
community.docker.docker_container:
name: "{{ joomla_container_name }}"
state: absent
- name: Stop Joomla DB
community.docker.docker_container:
name: "{{ joomla_db_container_name }}"
state: absent
when: joomla_enabled is false

View file

@ -16,5 +16,10 @@ komga_group_id: "1000"
komga_hostname: "komga" komga_hostname: "komga"
komga_port_http: "8088" komga_port_http: "8088"
# docker
komga_container_name: "komga"
komga_image_name: "gotson/komga"
komga_image_version: "latest"
# specs # specs
komga_memory: "1g" komga_memory: "1g"

13
roles/komga/docs/komga.md Normal file
View file

@ -0,0 +1,13 @@
# Komga
Homepage: <https://komga.org/>
Docker Image: <https://hub.docker.com/r/gotson/komga>
Komga is a media server for your comics, mangas, BDs and magazines.
## Usage
Set `komga_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
Access the webui at <http://ansible_nas_host_or_ip:8088> by default.

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
komga_enabled: true

View file

@ -0,0 +1,10 @@
---
- 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:
komga_enabled: false

View file

@ -0,0 +1,19 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
include_vars:
file: ../../defaults/main.yml
- name: Get komga container state
docker_container_info:
name: "{{ komga_container_name }}"
register: result
- name: Check if komga docker container is running
assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -0,0 +1,19 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
include_vars:
file: ../../defaults/main.yml
- name: Try and stop and remove komga
docker_container:
name: "{{ komga_container_name }}"
state: absent
register: result
- name: Check if komga container is stopped
assert:
that:
- not result.changed

View file

@ -1,6 +1,8 @@
--- ---
- name: Start Komga
block:
- name: Create Komga Directories - name: Create Komga Directories
file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
# mode: 0755 # mode: 0755
@ -9,9 +11,10 @@
- "{{ komga_data_directory }}/config" - "{{ komga_data_directory }}/config"
- name: Komga Docker Container - name: Komga Docker Container
docker_container: community.docker.docker_container:
name: komga container_default_behavior: no_defaults
image: gotson/komga name: "{{ komga_container_name }}"
image: "{{ komga_image_name }}:{{ komga_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ komga_comics_directory }}:/comics:ro" - "{{ komga_comics_directory }}:/comics:ro"
@ -34,3 +37,12 @@
traefik.http.routers.komga.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.komga.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.komga.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.routers.komga.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.komga.loadbalancer.server.port: "8080" traefik.http.services.komga.loadbalancer.server.port: "8080"
when: komga_enabled is true
- name: Stop Komga
block:
- name: Stop Komga
community.docker.docker_container:
name: "{{ komga_container_name }}"
state: absent
when: komga_enabled is false

View file

@ -18,5 +18,10 @@ krusader_port_http: "5800"
krusader_port_vnc: "5900" krusader_port_vnc: "5900"
krusader_hostname: "krusader" krusader_hostname: "krusader"
# docker
krusader_container_name: "krusader"
krusader_image_name: "djaydev/krusader"
krusader_image_version: "latest"
# specs # specs
krusader_memory: 1g krusader_memory: 1g

View file

@ -0,0 +1,13 @@
# Krusader
Homepage: <https://krusader.org/>
Docker Container: [Krusader](https://hub.docker.com/r/djaydev/krusader)
Krusader provides twin panel file management for your ansible-nas via browser and VNC.
## Usage
Set `krusader_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
The Krusader web interface can be found at <http://ansible_nas_host_or_ip:5800>.

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
krusader_enabled: true

View file

@ -0,0 +1,10 @@
---
- 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:
krusader_enabled: false

View file

@ -0,0 +1,19 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
include_vars:
file: ../../defaults/main.yml
- name: Get krusader container state
docker_container_info:
name: "{{ krusader_container_name }}"
register: result
- name: Check if krusader docker container is running
assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -0,0 +1,19 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
include_vars:
file: ../../defaults/main.yml
- name: Try and stop and remove krusader
docker_container:
name: "{{ krusader_container_name }}"
state: absent
register: result
- name: Check if krusader container is stopped
assert:
that:
- not result.changed

View file

@ -1,15 +1,18 @@
--- ---
- name: Start Krusader
block:
- name: Krusader Directory - name: Krusader Directory
file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
with_items: with_items:
- "{{ krusader_config_directory }}/krusader" - "{{ krusader_config_directory }}/krusader"
- name: Krusader Docker Container - name: Krusader Docker Container
docker_container: community.docker.docker_container:
name: krusader container_default_behavior: no_defaults
image: djaydev/krusader:latest name: "{{ krusader_container_name }}"
image: "{{ krusader_image_name }}:{{ krusader_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ krusader_config_directory }}:/config:rw" - "{{ krusader_config_directory }}:/config:rw"
@ -32,3 +35,12 @@
traefik.http.routers.krusader.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.krusader.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.krusader.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.routers.krusader.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.krusader.loadbalancer.server.port: "5800" traefik.http.services.krusader.loadbalancer.server.port: "5800"
when: krusader_enabled is true
- name: Stop Krusader
block:
- name: Stop Krusader
community.docker.docker_container:
name: "{{ krusader_container_name }}"
state: absent
when: krusader_enabled is false

View file

@ -15,5 +15,10 @@ lidarr_group_id: "0"
lidarr_port: "8686" lidarr_port: "8686"
lidarr_hostname: "lidarr" lidarr_hostname: "lidarr"
# docker
lidarr_container_name: "lidarr"
lidarr_image_name: "linuxserver/lidarr"
lidarr_image_version: "latest"
# specs # specs
lidarr_memory: 1g lidarr_memory: 1g

View file

@ -0,0 +1,9 @@
# Lidarr
Homepage: <https://lidarr.audio/>
Lidarr is a music collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new tracks from your favorite artists and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
## Usage
Set `lidarr_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
lidarr_enabled: true

View file

@ -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:
lidarr_enabled: false

View file

@ -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 lidarr container state
community.docker.docker_container:
name: "{{ lidarr_container_name }}"
register: result
- name: Check if lidarr containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -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 lidarr
community.docker.docker_container:
name: "{{ lidarr_container_name }}"
state: absent
register: result
- name: Check if lidarr is stopped
ansible.builtin.assert:
that:
- not result.changed

View file

@ -1,13 +1,16 @@
--- ---
- name: Start Lidarr
block:
- name: Create Lidarr Directory - name: Create Lidarr Directory
file: ansible.builtin.file:
path: "{{ lidarr_data_directory }}" path: "{{ lidarr_data_directory }}"
state: directory state: directory
- name: Lidarr Docker Container - name: Lidarr Docker Container
docker_container: community.docker.docker_container:
name: lidarr container_default_behavior: no_defaults
image: linuxserver/lidarr name: "{{ lidarr_container_name }}"
image: "{{ lidarr_image_name }}:{{ lidarr_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ lidarr_music_directory }}:/music:rw" - "{{ lidarr_music_directory }}:/music:rw"
@ -28,3 +31,12 @@
traefik.http.routers.lidarr.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.lidarr.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.lidarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.routers.lidarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.lidarr.loadbalancer.server.port: "8686" traefik.http.services.lidarr.loadbalancer.server.port: "8686"
when: lidarr_enabled is true
- name: Stop Lidarr
block:
- name: Stop Lidarr
community.docker.docker_container:
name: "{{ lidarr_container_name }}"
state: absent
when: lidarr_enabled is false

View file

@ -13,5 +13,10 @@ mealie_group_id: "1000"
mealie_hostname: "mealie" mealie_hostname: "mealie"
mealie_port: "9925" mealie_port: "9925"
# docker
mealie_container_name: "mealie"
mealie_image_name: "hkotel/mealie"
mealie_image_version: "latest"
# specs # specs
mealie_memory: 1g mealie_memory: 1g

View file

@ -0,0 +1,11 @@
# Mealie
Homepage: <https://docs.mealie.io/>
A self-hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family.
## Usage
Set `mealie_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
The Mealie web interface can be found at <http://ansible_nas_host_or_ip:9925>.

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
mealie_enabled: true

View file

@ -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:
mealie_enabled: false

View file

@ -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 mealie container state
community.docker.docker_container:
name: "{{ mealie_container_name }}"
register: result
- name: Check if mealie containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -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 mealie
community.docker.docker_container:
name: "{{ mealie_container_name }}"
state: absent
register: result
- name: Check if mealie is stopped
ansible.builtin.assert:
that:
- not result.changed

View file

@ -1,15 +1,18 @@
--- ---
- name: Start Mealie
block:
- name: Create Mealie Directories - name: Create Mealie Directories
file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
with_items: with_items:
- "{{ mealie_data_directory }}/data" - "{{ mealie_data_directory }}/data"
- name: Mealie Docker Container - name: Mealie Docker Container
docker_container: community.docker.docker_container:
name: mealie container_default_behavior: no_defaults
image: hkotel/mealie:latest name: "{{ mealie_container_name }}"
image: "{{ mealie_image_name }}:{{ mealie_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ mealie_data_directory }}:/app/data:rw" - "{{ mealie_data_directory }}:/app/data:rw"
@ -35,3 +38,13 @@
traefik.http.routers.mealie.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.mealie.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.mealie.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.routers.mealie.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.mealie.loadbalancer.server.port: "80" traefik.http.services.mealie.loadbalancer.server.port: "80"
when: mealie_enabled is true
- name: Stop Mealie
block:
- name: Stop Mealie
community.docker.docker_container:
name: "{{ mealie_container_name }}"
state: absent
when: mealie_enabled is false

View file

@ -6,3 +6,8 @@ minecraft_server_data_directory: "{{ docker_home }}/minecraft_server"
# network # network
minecraft_server_port: "25565" minecraft_server_port: "25565"
# docker
minecraft_server_container_name: "minecraft-server"
minecraft_server_image_name: "itzg/minecraft-server"
minecraft_server_image_version: "latest"

View file

@ -0,0 +1,13 @@
# Minecraft Server
Homepage: <https://www.minecraft.net/>
The server version of the game Minecraft, running in a container. "Prepare for an adventure of limitless possibilities as you build, mine, battle mobs, and explore the ever-changing Minecraft landscape."
## Usage
Set `minecraft_server_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
The Ansible NAS host or ip address should then be usable as a server within the Minecraft multiplayer game menu.
The image `itzg/minecraft-server` has [documentation](https://github.com/itzg/docker-minecraft-server/blob/master/README.md) with further details on how to manage the Minecraft server instance.

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
minecraft_server_enabled: true

View file

@ -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:
minecraft_server_enabled: false

View file

@ -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 minecraft_server container state
community.docker.docker_container:
name: "{{ minecraft_server_container_name }}"
register: result
- name: Check if minecraft_server containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -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 minecraft_server
community.docker.docker_container:
name: "{{ minecraft_server_container_name }}"
state: absent
register: result
- name: Check if minecraft_server is stopped
ansible.builtin.assert:
that:
- not result.changed

View file

@ -1,15 +1,18 @@
--- ---
- name: Start Minecraft Server
block:
- name: Create Minecraft Server Directories - name: Create Minecraft Server Directories
file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
with_items: with_items:
- "{{ minecraft_server_data_directory }}" - "{{ minecraft_server_data_directory }}"
- name: Minecraft Server Docker Container - name: Minecraft Server Docker Container
docker_container: community.docker.docker_container:
name: minecraft-server container_default_behavior: no_defaults
image: itzg/minecraft-server:latest name: "{{ minecraft_server_container_name }}"
image: "{{ minecraft_server_image_name }}:{{ minecraft_server_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ minecraft_server_data_directory }}:/data:rw" - "{{ minecraft_server_data_directory }}:/data:rw"
@ -18,3 +21,12 @@
env: env:
EULA: "TRUE" EULA: "TRUE"
restart_policy: unless-stopped restart_policy: unless-stopped
when: minecraft_server_enabled is true
- name: Stop Minecraft Server
block:
- name: Stop Minecraft Server
community.docker.docker_container:
name: "{{ minecraft_server_container_name }}"
state: absent
when: minecraft_server_enabled is false

View file

@ -11,5 +11,10 @@ minidlna_media_directory2: "{{ tv_root }}"
minidlna_friendly_name: "{{ ansible_nas_hostname }}" minidlna_friendly_name: "{{ ansible_nas_hostname }}"
minidlna_port: "8201" minidlna_port: "8201"
# docker
minidlna_container_name: "minidnla"
minidlna_image_name: "vladgh/minidlna"
minidlna_image_version: "latest"
# specs # specs
minidlna_memory: "1g" minidlna_memory: "1g"

View file

@ -0,0 +1,11 @@
# MiniDLNA
Homepage: <https://sourceforge.net/projects/minidlna/>
MiniDLNA is server software with the aim of being fully compliant with DLNA/UPnP clients. The MiniDNLA daemon serves media files (music, pictures, and video) to clients on a network. Example clients include applications such as Totem and Kodi, and devices such as portable media players, Smartphones, Televisions, and gaming systems (such as PS3 and Xbox 360).
## Usage
Set `minidlna_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
The very basic MiniDLNA web interface can be found at <http://ansible_nas_host_or_ip:8201>.

View file

@ -0,0 +1,7 @@
---
provisioner:
inventory:
group_vars:
all:
minidlna_enabled: true
ansible_nas_hostname: ansible-nas

View file

@ -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:
minidlna_enabled: false

View file

@ -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 minidlna container state
community.docker.docker_container:
name: "{{ minidlna_container_name }}"
register: result
- name: Check if minidlna containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -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 minidlna
community.docker.docker_container:
name: "{{ minidlna_container_name }}"
state: absent
register: result
- name: Check if minidlna is stopped
ansible.builtin.assert:
that:
- not result.changed

View file

@ -1,8 +1,11 @@
--- ---
- name: Start MiniDLNA
block:
- name: MiniDLNA Docker Container - name: MiniDLNA Docker Container
docker_container: community.docker.docker_container:
name: minidlna container_default_behavior: no_defaults
image: vladgh/minidlna name: "{{ minidlna_container_name }}"
image: "{{ minidlna_image_name }}:{{ minidlna_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ minidlna_media_directory1 }}:/media1:rw" - "{{ minidlna_media_directory1 }}:/media1:rw"
@ -15,3 +18,12 @@
restart_policy: unless-stopped restart_policy: unless-stopped
network_mode: host network_mode: host
memory: "{{ minidlna_memory }}" memory: "{{ minidlna_memory }}"
when: minidlna_enabled is true
- name: Stop MiniDLNA
block:
- name: Stop MiniDLNA
community.docker.docker_container:
name: "{{ minidlna_container_name }}"
state: absent
when: minidlna_enabled is false

View file

@ -14,6 +14,14 @@ miniflux_admin_password: supersecure
miniflux_hostname: "miniflux" miniflux_hostname: "miniflux"
miniflux_port: "8070" miniflux_port: "8070"
# docker
miniflux_container_name: "miniflux"
miniflux_image_name: "miniflux/miniflux"
miniflux_image_version: "latest"
miniflux_db_container_name: "miniflux-postgres"
miniflux_db_image_name: "postgres"
miniflux_db_image_version: "11.1"
# specs # specs
miniflux_memory: "1g" miniflux_memory: "1g"
miniflux_postgres_memory: "1g" miniflux_postgres_memory: "1g"

View file

@ -0,0 +1,15 @@
# Miniflux
Homepage: <https://miniflux.app/>
Miniflux is a minimalist and opinionated feed reader.
## Usage
Set `miniflux_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
The Miniflux web interface can be found at <http://ansible_nas_host_or_ip:8070>, the default username is `admin` and password `supersecure`.
## Specific Configuration
An admin user will be created with the username and password of `miniflux_admin_username` and `miniflux_admin_password` respectively. These can be found in the Miniflux section within `all.yml.dist`.

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
miniflux_enabled: true

View file

@ -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:
miniflux_enabled: false

View file

@ -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 miniflux container state
community.docker.docker_container:
name: "{{ miniflux_container_name }}"
register: result
- name: Check if miniflux containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -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 miniflux
community.docker.docker_container:
name: "{{ miniflux_container_name }}"
state: absent
register: result
- name: Check if miniflux is stopped
ansible.builtin.assert:
that:
- not result.changed

View file

@ -1,15 +1,18 @@
--- ---
- name: Start Miniflux
block:
- name: Create Miniflux Directories - name: Create Miniflux Directories
file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
with_items: with_items:
- "{{ miniflux_data_directory }}/postgres" - "{{ miniflux_data_directory }}/postgres"
- name: Create Postgres for Miniflux - name: Create Postgres for Miniflux
docker_container: community.docker.docker_container:
name: miniflux-postgres container_default_behavior: no_defaults
image: postgres:11.1 name: "{{ miniflux_db_container_name }}"
image: "{{ miniflux_db_image_name }}:{{ miniflux_db_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ miniflux_data_directory }}/postgres:/var/lib/postgresql/data:rw" - "{{ miniflux_data_directory }}/postgres:/var/lib/postgresql/data:rw"
@ -20,9 +23,10 @@
memory: "{{ miniflux_postgres_memory }}" memory: "{{ miniflux_postgres_memory }}"
- name: Create Miniflux Docker Container - name: Create Miniflux Docker Container
docker_container: community.docker.docker_container:
name: miniflux container_default_behavior: no_defaults
image: miniflux/miniflux:latest name: "{{ miniflux_container_name }}"
image: "{{ miniflux_image_name }}:{{ miniflux_image_version }}"
pull: true pull: true
links: links:
- miniflux-postgres:db - miniflux-postgres:db
@ -43,3 +47,12 @@
traefik.http.routers.miniflux.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.miniflux.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.miniflux.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.routers.miniflux.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.miniflux.loadbalancer.server.port: "8080" traefik.http.services.miniflux.loadbalancer.server.port: "8080"
when: miniflux_enabled is true
- name: Stop Miniflux
block:
- name: Stop Miniflux
community.docker.docker_container:
name: "{{ miniflux_container_name }}"
state: absent
when: miniflux_enabled is false

View file

@ -12,5 +12,10 @@ mosquitto_group_id: "0"
mosquitto_port_a: "1883" mosquitto_port_a: "1883"
mosquitto_port_b: "9001" mosquitto_port_b: "9001"
# docker
mosquitto_container_name: "mosquitto"
mosquitto_image_name: "eclipse-mosquitto"
mosquitto_image_version: "latest"
# specs # specs
mosquitto_memory: 1g mosquitto_memory: 1g

View file

@ -0,0 +1,9 @@
# Mosquitto
Homepage: <https://mosquitto.org>
Mosquitto is a lightweight open source MQTT message broker.
## Usage
Set `mosquitto_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.

View file

@ -0,0 +1,16 @@
---
provisioner:
inventory:
group_vars:
all:
mosquitto_enabled: true
mosquitto_data_directory: "/tmp/mosquitto"
platforms:
- name: instance
image: geerlingguy/docker-ubuntu2204-ansible:latest
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /var/run/docker.sock:/var/run/docker.sock
- /tmp:/tmp:rw
privileged: true
pre_build_image: true

View file

@ -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:
mosquitto_enabled: false

View file

@ -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 mosquitto container state
community.docker.docker_container:
name: "{{ mosquitto_container_name }}"
register: result
- name: Check if mosquitto containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -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 mosquitto
community.docker.docker_container:
name: "{{ mosquitto_container_name }}"
state: absent
register: result
- name: Check if mosquitto is stopped
ansible.builtin.assert:
that:
- not result.changed

View file

@ -1,6 +1,8 @@
--- ---
- name: Start Mosquitto
block:
- name: Create Mosquitto Directories - name: Create Mosquitto Directories
file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
with_items: with_items:
@ -9,15 +11,16 @@
- "{{ mosquitto_data_directory }}/log" - "{{ mosquitto_data_directory }}/log"
- name: Template mosquitto.conf - name: Template mosquitto.conf
copy: ansible.builtin.copy:
src: mosquitto.conf src: mosquitto.conf
dest: "{{ mosquitto_data_directory }}/config/mosquitto.conf" dest: "{{ mosquitto_data_directory }}/config/mosquitto.conf"
register: mosquitto_conf register: mosquitto_conf
- name: Create Mosquitto container - name: Create Mosquitto container
docker_container: community.docker.docker_container:
name: mosquitto container_default_behavior: no_defaults
image: eclipse-mosquitto:latest name: "{{ mosquitto_container_name }}"
image: "{{ mosquitto_image_name }}:{{ mosquitto_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ mosquitto_data_directory }}/config/mosquitto.conf:/mosquitto/config/mosquitto.conf:rw" - "{{ mosquitto_data_directory }}/config/mosquitto.conf:/mosquitto/config/mosquitto.conf:rw"
@ -29,3 +32,12 @@
restart_policy: unless-stopped restart_policy: unless-stopped
restart: "{{ mosquitto_conf is changed }}" restart: "{{ mosquitto_conf is changed }}"
memory: 1g memory: 1g
when: mosquitto_enabled is true
- name: Stop Mosquitto
block:
- name: Stop Mosquitto
community.docker.docker_container:
name: "{{ mosquitto_container_name }}"
state: absent
when: mosquitto_enabled is false

View file

@ -16,5 +16,10 @@ mylar_group_id: "0"
mylar_hostname: "mylar" mylar_hostname: "mylar"
mylar_port_http: "8585" mylar_port_http: "8585"
# docker
mylar_container_name: "mylar"
mylar_image_name: "linuxserver/mylar"
mylar_image_version: "latest"
# specs # specs
mylar_memory: "1g" mylar_memory: "1g"

15
roles/mylar/docs/mylar.md Normal file
View file

@ -0,0 +1,15 @@
# Mylar
Homepage: <https://github.com/evilhero/mylar>
Docker Container: <https://hub.docker.com/r/linuxserver/mylar>
An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents
## Usage
Set `mylar_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
If you want to access Mylar externally, don't forget to set `mylar_available_externally: true` in your `inventories/<your_inventory>/nas.yml` file.
The Mylar web interface can be found at <http://ansible_nas_host_or_ip:5858>.

View file

@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
mylar_enabled: true

View file

@ -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:
mylar_enabled: false

View file

@ -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 mylar container state
community.docker.docker_container:
name: "{{ mylar_container_name }}"
register: result
- name: Check if mylar containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false

View file

@ -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 mylar
community.docker.docker_container:
name: "{{ mylar_container_name }}"
state: absent
register: result
- name: Check if mylar is stopped
ansible.builtin.assert:
that:
- not result.changed

View file

@ -1,6 +1,8 @@
--- ---
- name: Start Mylar
block:
- name: Create Mylar Directories - name: Create Mylar Directories
file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
# mode: 0755 # mode: 0755
@ -8,9 +10,10 @@
- "{{ mylar_data_directory }}/config" - "{{ mylar_data_directory }}/config"
- name: Mylar Docker Container - name: Mylar Docker Container
docker_container: community.docker.docker_container:
name: mylar container_default_behavior: no_defaults
image: linuxserver/mylar name: "{{ mylar_container_name }}"
image: "{{ mylar_image_name }}:{{ mylar_image_version }}"
pull: true pull: true
volumes: volumes:
- "{{ mylar_comics_directory }}:/comics:rw" - "{{ mylar_comics_directory }}:/comics:rw"
@ -32,3 +35,12 @@
traefik.http.routers.mylar.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.mylar.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.mylar.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.routers.mylar.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.mylar.loadbalancer.server.port: "8090" traefik.http.services.mylar.loadbalancer.server.port: "8090"
when: mylar_enabled is true
- name: Stop Mylar
block:
- name: Stop Mylar
community.docker.docker_container:
name: "{{ mylar_container_name }}"
state: absent
when: mylar_enabled is false

Some files were not shown because too many files have changed in this diff Show more