mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-12 11:38:47 +00:00
Another set: heimdall to overseer
This commit is contained in:
parent
463ea6f5cf
commit
e253f0a5d0
210 changed files with 3504 additions and 838 deletions
17
nas.yml
17
nas.yml
|
@ -148,7 +148,6 @@
|
|||
- role: heimdall
|
||||
tags:
|
||||
- heimdall
|
||||
when: (heimdall_enabled | default(False))
|
||||
|
||||
- role: hello_world
|
||||
tags:
|
||||
|
@ -157,82 +156,66 @@
|
|||
- role: homeassistant
|
||||
tags:
|
||||
- homeassistant
|
||||
when: (homeassistant_enabled | default(False))
|
||||
|
||||
- role: homebridge
|
||||
tags:
|
||||
- homebridge
|
||||
when: (homebridge_enabled | default(False))
|
||||
|
||||
- role: jackett
|
||||
tags:
|
||||
- jackett
|
||||
when: (jackett_enabled | default(False))
|
||||
|
||||
- role: jellyfin
|
||||
tags:
|
||||
- jellyfin
|
||||
when: (jellyfin_enabled | default(False))
|
||||
|
||||
- role: joomla
|
||||
tags:
|
||||
- joomla
|
||||
when: (joomla_enabled | default(False))
|
||||
|
||||
- role: komga
|
||||
tags:
|
||||
- komga
|
||||
when: (komga_enabled | default(False))
|
||||
|
||||
- role: krusader
|
||||
tags:
|
||||
- krusader
|
||||
when: (krusader_enabled | default(False))
|
||||
|
||||
- role: lidarr
|
||||
tags:
|
||||
- lidarr
|
||||
when: (lidarr_enabled | default(False))
|
||||
|
||||
- role: mealie
|
||||
tags:
|
||||
- mealie
|
||||
when: (mealie_enabled | default(False))
|
||||
|
||||
- role: minecraft-server
|
||||
tags:
|
||||
- minecraft-server
|
||||
when: (minecraft_server_enabled | default(False))
|
||||
|
||||
- role: minidlna
|
||||
tags:
|
||||
- minidlna
|
||||
when: (minidlna_enabled | default(False))
|
||||
|
||||
- role: miniflux
|
||||
tags:
|
||||
- miniflux
|
||||
when: (miniflux_enabled | default(False))
|
||||
|
||||
- role: mosquitto
|
||||
tags:
|
||||
- mosquitto
|
||||
when: (mosquitto_enabled | default(False))
|
||||
|
||||
- role: mylar
|
||||
tags:
|
||||
- mylar
|
||||
when: (mylar_enabled | default(False))
|
||||
|
||||
- role: mymediaforalexa
|
||||
tags:
|
||||
- mymediaforalexa
|
||||
when: (mymediaforalexa_enabled | default(False))
|
||||
|
||||
- role: n8n
|
||||
tags:
|
||||
- n8n
|
||||
when: (n8n_enabled | default(False))
|
||||
|
||||
- role: navidrome
|
||||
tags:
|
||||
|
|
15
roles/heimdall/docs/heimdall.md
Normal file
15
roles/heimdall/docs/heimdall.md
Normal 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.
|
|
@ -9,5 +9,10 @@ homeassistant_data_directory: "{{ docker_home }}/homeassistant"
|
|||
homeassistant_port: "8123"
|
||||
homeassistant_hostname: "homeassistant"
|
||||
|
||||
# docker
|
||||
homeassistant_container_name: "homeassistant"
|
||||
homeassistant_image_name: "homeassistant/home-assistant"
|
||||
homeassistant_image_version: latest
|
||||
|
||||
# specs
|
||||
homeassistant_memory: 1g
|
||||
|
|
13
roles/homeassistant/docs/homeassistant.md
Normal file
13
roles/homeassistant/docs/homeassistant.md
Normal 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>.
|
6
roles/homeassistant/molecule/default/molecule.yml
Normal file
6
roles/homeassistant/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
homeassistant_enabled: true
|
10
roles/homeassistant/molecule/default/side_effect.yml
Normal file
10
roles/homeassistant/molecule/default/side_effect.yml
Normal 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
|
19
roles/homeassistant/molecule/default/verify.yml
Normal file
19
roles/homeassistant/molecule/default/verify.yml
Normal 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
|
19
roles/homeassistant/molecule/default/verify_stopped.yml
Normal file
19
roles/homeassistant/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,15 +1,18 @@
|
|||
---
|
||||
- name: Start Homeassistant
|
||||
block:
|
||||
- name: Create Home Assistant Directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ homeassistant_data_directory }}/config"
|
||||
|
||||
- name: Home Assistant Docker Container
|
||||
docker_container:
|
||||
name: homeassistant
|
||||
image: homeassistant/home-assistant
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ homeassistant_container_name }}"
|
||||
image: "{{ homeassistant_image_name }}:{{ homeassistant_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ homeassistant_data_directory }}/config:/config:rw"
|
||||
|
@ -25,3 +28,12 @@
|
|||
traefik.http.routers.homeassistant.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.homeassistant.loadbalancer.server.port: "8123"
|
||||
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
|
||||
|
|
|
@ -14,5 +14,10 @@ homebridge_group_id: "0"
|
|||
homebridge_hostname: "homebridge"
|
||||
homebridge_port: "8087"
|
||||
|
||||
# docker
|
||||
homebridge_container_name: "homebridge"
|
||||
homebridge_image_name: "oznu/homebridge"
|
||||
homebridge_image_version: "latest"
|
||||
|
||||
# specs
|
||||
homebridge_memory: "1g"
|
||||
|
|
11
roles/homebridge/docs/homebridge.md
Normal file
11
roles/homebridge/docs/homebridge.md
Normal 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!
|
6
roles/homebridge/molecule/default/molecule.yml
Normal file
6
roles/homebridge/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
homebridge_enabled: true
|
10
roles/homebridge/molecule/default/side_effect.yml
Normal file
10
roles/homebridge/molecule/default/side_effect.yml
Normal 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
|
19
roles/homebridge/molecule/default/verify.yml
Normal file
19
roles/homebridge/molecule/default/verify.yml
Normal 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
|
19
roles/homebridge/molecule/default/verify_stopped.yml
Normal file
19
roles/homebridge/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: Start Homebridge
|
||||
block:
|
||||
- name: Create Homebridge Directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
# mode: 0755
|
||||
|
@ -8,9 +10,10 @@
|
|||
- "{{ homebridge_config_directory }}"
|
||||
|
||||
- name: Create Homebridge Docker Container
|
||||
docker_container:
|
||||
name: homebridge
|
||||
image: oznu/homebridge
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ homebridge_container_name }}"
|
||||
image: "{{ homebridge_image_name }}:{{ homebridge_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ 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].sans: "*.{{ ansible_nas_domain }}"
|
||||
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
|
||||
|
|
|
@ -11,5 +11,10 @@ jackett_torrents_root: "{{ torrents_root }}"
|
|||
jackett_hostname: "jackett"
|
||||
jackett_port: "9117"
|
||||
|
||||
# docker
|
||||
jackett_container_name: "jackett"
|
||||
jackett_image_name: "linuxserver/jackett"
|
||||
jackett_image_version: "latest"
|
||||
|
||||
# specs
|
||||
jackett_memory: "1g"
|
||||
|
|
11
roles/jackett/docs/jackett.md
Normal file
11
roles/jackett/docs/jackett.md
Normal 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>.
|
6
roles/jackett/molecule/default/molecule.yml
Normal file
6
roles/jackett/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
jackett_enabled: true
|
10
roles/jackett/molecule/default/side_effect.yml
Normal file
10
roles/jackett/molecule/default/side_effect.yml
Normal 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
|
19
roles/jackett/molecule/default/verify.yml
Normal file
19
roles/jackett/molecule/default/verify.yml
Normal 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
|
19
roles/jackett/molecule/default/verify_stopped.yml
Normal file
19
roles/jackett/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,15 +1,18 @@
|
|||
---
|
||||
- name: Create jackett Directories
|
||||
file:
|
||||
- name: Start Jackett
|
||||
block:
|
||||
- name: Create Jackett Directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ jackett_data_directory }}"
|
||||
|
||||
- name: Jackett Docker Container
|
||||
docker_container:
|
||||
name: jackett
|
||||
image: linuxserver/jackett
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ jackett_container_name }}"
|
||||
image: "{{ jackett_image_name }}:{{ jackett_image_version }}"
|
||||
volumes:
|
||||
- "{{ jackett_data_directory }}:/config:rw"
|
||||
- "/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].sans: "*.{{ ansible_nas_domain }}"
|
||||
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
|
||||
|
|
|
@ -29,5 +29,10 @@ jellyfin_hostname: "jellyfin"
|
|||
jellyfin_port_http: "8896"
|
||||
jellyfin_port_https: "8928"
|
||||
|
||||
# docker
|
||||
jellyfin_container_name: "jellyfin"
|
||||
jellyfin_image_name: "linuxserver/jellyfin"
|
||||
jellyfin_image_version: "latest"
|
||||
|
||||
# specs
|
||||
jellyfin_memory: "1g"
|
||||
|
|
65
roles/jellyfin/docs/jellyfin.md
Normal file
65
roles/jellyfin/docs/jellyfin.md
Normal 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.
|
6
roles/jellyfin/molecule/default/molecule.yml
Normal file
6
roles/jellyfin/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
jellyfin_enabled: true
|
10
roles/jellyfin/molecule/default/side_effect.yml
Normal file
10
roles/jellyfin/molecule/default/side_effect.yml
Normal 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
|
19
roles/jellyfin/molecule/default/verify.yml
Normal file
19
roles/jellyfin/molecule/default/verify.yml
Normal 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
|
19
roles/jellyfin/molecule/default/verify_stopped.yml
Normal file
19
roles/jellyfin/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,15 +1,18 @@
|
|||
---
|
||||
- name: Start jellyfin
|
||||
block:
|
||||
- name: Create Jellyfin Directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ jellyfin_config_directory }}"
|
||||
|
||||
- name: Jellyfin Docker Container
|
||||
docker_container:
|
||||
name: jellyfin
|
||||
image: linuxserver/jellyfin
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ jellyfin_container_name }}"
|
||||
image: "{{ jellyfin_image_name }}:{{ jellyfin_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ 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].sans: "*.{{ ansible_nas_domain }}"
|
||||
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
|
||||
|
|
|
@ -10,6 +10,16 @@ joomla_data_directory: "{{ docker_home }}/joomla"
|
|||
# network
|
||||
joomla_port: "8181"
|
||||
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
|
||||
joomla_memory: 1g
|
||||
joomla_db_memory: 1g
|
||||
|
|
23
roles/joomla/docs/joomla.md
Normal file
23
roles/joomla/docs/joomla.md
Normal 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`.
|
6
roles/joomla/molecule/default/molecule.yml
Normal file
6
roles/joomla/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
joomla_enabled: true
|
10
roles/joomla/molecule/default/side_effect.yml
Normal file
10
roles/joomla/molecule/default/side_effect.yml
Normal 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
|
26
roles/joomla/molecule/default/verify.yml
Normal file
26
roles/joomla/molecule/default/verify.yml
Normal 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
|
26
roles/joomla/molecule/default/verify_stopped.yml
Normal file
26
roles/joomla/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,17 +1,27 @@
|
|||
---
|
||||
- name: Start Joomla
|
||||
block:
|
||||
- name: Create Joomla Directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ joomla_data_directory }}"
|
||||
- "{{ joomla_data_directory }}/db"
|
||||
|
||||
- name: Create Joomla network
|
||||
community.docker.docker_network:
|
||||
name: "{{ joomla_network_name }}"
|
||||
|
||||
- name: MySQL Docker Container for Joomla
|
||||
docker_container:
|
||||
name: joomla_mysql
|
||||
image: mysql:5.7
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ joomla_db_container_name }}"
|
||||
image: "{{ joomla_db_image_name }}:{{ joomla_db_image_version }}"
|
||||
pull: true
|
||||
networks:
|
||||
- name: "{{ joomla_network_name }}"
|
||||
network_mode: "{{ joomla_network_name }}"
|
||||
volumes:
|
||||
- "{{ joomla_data_directory }}/db:/var/lib/mysql"
|
||||
env:
|
||||
|
@ -19,21 +29,23 @@
|
|||
MYSQL_USER: "joomla"
|
||||
MYSQL_ROOT_PASSWORD: "{{ joomla_database_password }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
memory: "{{ joomla_db_memory }}"
|
||||
|
||||
- name: Joomla Docker Container
|
||||
docker_container:
|
||||
name: joomla
|
||||
image: joomla
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ joomla_container_name }}"
|
||||
image: "{{ joomla_image_name }}:{{ joomla_image_version }}"
|
||||
pull: true
|
||||
networks:
|
||||
- name: "{{ joomla_network_name }}"
|
||||
network_mode: "{{ joomla_network_name }}"
|
||||
volumes:
|
||||
- "{{ joomla_data_directory }}:/var/www/html:rw"
|
||||
ports:
|
||||
- "{{ joomla_port }}:80"
|
||||
links:
|
||||
- "joomla_mysql:mysql"
|
||||
env:
|
||||
JOOMLA_DB_HOST: "mysql"
|
||||
JOOMLA_DB_HOST: "{{ joomla_db_container_name }}"
|
||||
JOOMLA_DB_USER: "root"
|
||||
JOOMLA_DB_PASSWORD: "{{ joomla_database_password }}"
|
||||
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].sans: "*.{{ ansible_nas_domain }}"
|
||||
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
|
||||
|
|
|
@ -16,5 +16,10 @@ komga_group_id: "1000"
|
|||
komga_hostname: "komga"
|
||||
komga_port_http: "8088"
|
||||
|
||||
# docker
|
||||
komga_container_name: "komga"
|
||||
komga_image_name: "gotson/komga"
|
||||
komga_image_version: "latest"
|
||||
|
||||
# specs
|
||||
komga_memory: "1g"
|
||||
|
|
13
roles/komga/docs/komga.md
Normal file
13
roles/komga/docs/komga.md
Normal 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.
|
6
roles/komga/molecule/default/molecule.yml
Normal file
6
roles/komga/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
komga_enabled: true
|
10
roles/komga/molecule/default/side_effect.yml
Normal file
10
roles/komga/molecule/default/side_effect.yml
Normal 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
|
19
roles/komga/molecule/default/verify.yml
Normal file
19
roles/komga/molecule/default/verify.yml
Normal 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
|
19
roles/komga/molecule/default/verify_stopped.yml
Normal file
19
roles/komga/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: Start Komga
|
||||
block:
|
||||
- name: Create Komga Directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
# mode: 0755
|
||||
|
@ -9,9 +11,10 @@
|
|||
- "{{ komga_data_directory }}/config"
|
||||
|
||||
- name: Komga Docker Container
|
||||
docker_container:
|
||||
name: komga
|
||||
image: gotson/komga
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ komga_container_name }}"
|
||||
image: "{{ komga_image_name }}:{{ komga_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ 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].sans: "*.{{ ansible_nas_domain }}"
|
||||
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
|
||||
|
|
|
@ -18,5 +18,10 @@ krusader_port_http: "5800"
|
|||
krusader_port_vnc: "5900"
|
||||
krusader_hostname: "krusader"
|
||||
|
||||
# docker
|
||||
krusader_container_name: "krusader"
|
||||
krusader_image_name: "djaydev/krusader"
|
||||
krusader_image_version: "latest"
|
||||
|
||||
# specs
|
||||
krusader_memory: 1g
|
||||
|
|
13
roles/krusader/docs/krusader.md
Normal file
13
roles/krusader/docs/krusader.md
Normal 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>.
|
6
roles/krusader/molecule/default/molecule.yml
Normal file
6
roles/krusader/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
krusader_enabled: true
|
10
roles/krusader/molecule/default/side_effect.yml
Normal file
10
roles/krusader/molecule/default/side_effect.yml
Normal 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
|
19
roles/krusader/molecule/default/verify.yml
Normal file
19
roles/krusader/molecule/default/verify.yml
Normal 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
|
19
roles/krusader/molecule/default/verify_stopped.yml
Normal file
19
roles/krusader/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,15 +1,18 @@
|
|||
---
|
||||
- name: Start Krusader
|
||||
block:
|
||||
- name: Krusader Directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ krusader_config_directory }}/krusader"
|
||||
|
||||
- name: Krusader Docker Container
|
||||
docker_container:
|
||||
name: krusader
|
||||
image: djaydev/krusader:latest
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ krusader_container_name }}"
|
||||
image: "{{ krusader_image_name }}:{{ krusader_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ 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].sans: "*.{{ ansible_nas_domain }}"
|
||||
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
|
||||
|
|
|
@ -15,5 +15,10 @@ lidarr_group_id: "0"
|
|||
lidarr_port: "8686"
|
||||
lidarr_hostname: "lidarr"
|
||||
|
||||
# docker
|
||||
lidarr_container_name: "lidarr"
|
||||
lidarr_image_name: "linuxserver/lidarr"
|
||||
lidarr_image_version: "latest"
|
||||
|
||||
# specs
|
||||
lidarr_memory: 1g
|
||||
|
|
9
roles/lidarr/docs/lidarr.md
Normal file
9
roles/lidarr/docs/lidarr.md
Normal 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.
|
6
roles/lidarr/molecule/default/molecule.yml
Normal file
6
roles/lidarr/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
lidarr_enabled: true
|
10
roles/lidarr/molecule/default/side_effect.yml
Normal file
10
roles/lidarr/molecule/default/side_effect.yml
Normal 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
|
19
roles/lidarr/molecule/default/verify.yml
Normal file
19
roles/lidarr/molecule/default/verify.yml
Normal 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
|
19
roles/lidarr/molecule/default/verify_stopped.yml
Normal file
19
roles/lidarr/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,13 +1,16 @@
|
|||
---
|
||||
- name: Start Lidarr
|
||||
block:
|
||||
- name: Create Lidarr Directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ lidarr_data_directory }}"
|
||||
state: directory
|
||||
|
||||
- name: Lidarr Docker Container
|
||||
docker_container:
|
||||
name: lidarr
|
||||
image: linuxserver/lidarr
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ lidarr_container_name }}"
|
||||
image: "{{ lidarr_image_name }}:{{ lidarr_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ 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].sans: "*.{{ ansible_nas_domain }}"
|
||||
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
|
||||
|
|
|
@ -13,5 +13,10 @@ mealie_group_id: "1000"
|
|||
mealie_hostname: "mealie"
|
||||
mealie_port: "9925"
|
||||
|
||||
# docker
|
||||
mealie_container_name: "mealie"
|
||||
mealie_image_name: "hkotel/mealie"
|
||||
mealie_image_version: "latest"
|
||||
|
||||
# specs
|
||||
mealie_memory: 1g
|
||||
|
|
11
roles/mealie/docs/mealie.md
Normal file
11
roles/mealie/docs/mealie.md
Normal 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>.
|
6
roles/mealie/molecule/default/molecule.yml
Normal file
6
roles/mealie/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
mealie_enabled: true
|
10
roles/mealie/molecule/default/side_effect.yml
Normal file
10
roles/mealie/molecule/default/side_effect.yml
Normal 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
|
19
roles/mealie/molecule/default/verify.yml
Normal file
19
roles/mealie/molecule/default/verify.yml
Normal 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
|
19
roles/mealie/molecule/default/verify_stopped.yml
Normal file
19
roles/mealie/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,15 +1,18 @@
|
|||
---
|
||||
- name: Start Mealie
|
||||
block:
|
||||
- name: Create Mealie Directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ mealie_data_directory }}/data"
|
||||
|
||||
- name: Mealie Docker Container
|
||||
docker_container:
|
||||
name: mealie
|
||||
image: hkotel/mealie:latest
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ mealie_container_name }}"
|
||||
image: "{{ mealie_image_name }}:{{ mealie_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ 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].sans: "*.{{ ansible_nas_domain }}"
|
||||
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
|
||||
|
||||
|
|
|
@ -6,3 +6,8 @@ minecraft_server_data_directory: "{{ docker_home }}/minecraft_server"
|
|||
|
||||
# network
|
||||
minecraft_server_port: "25565"
|
||||
|
||||
# docker
|
||||
minecraft_server_container_name: "minecraft-server"
|
||||
minecraft_server_image_name: "itzg/minecraft-server"
|
||||
minecraft_server_image_version: "latest"
|
||||
|
|
13
roles/minecraft-server/docs/minecraft-server.md
Normal file
13
roles/minecraft-server/docs/minecraft-server.md
Normal 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.
|
6
roles/minecraft-server/molecule/default/molecule.yml
Normal file
6
roles/minecraft-server/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
minecraft_server_enabled: true
|
10
roles/minecraft-server/molecule/default/side_effect.yml
Normal file
10
roles/minecraft-server/molecule/default/side_effect.yml
Normal 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
|
19
roles/minecraft-server/molecule/default/verify.yml
Normal file
19
roles/minecraft-server/molecule/default/verify.yml
Normal 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
|
19
roles/minecraft-server/molecule/default/verify_stopped.yml
Normal file
19
roles/minecraft-server/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,15 +1,18 @@
|
|||
---
|
||||
- name: Start Minecraft Server
|
||||
block:
|
||||
- name: Create Minecraft Server Directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ minecraft_server_data_directory }}"
|
||||
|
||||
- name: Minecraft Server Docker Container
|
||||
docker_container:
|
||||
name: minecraft-server
|
||||
image: itzg/minecraft-server:latest
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ minecraft_server_container_name }}"
|
||||
image: "{{ minecraft_server_image_name }}:{{ minecraft_server_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ minecraft_server_data_directory }}:/data:rw"
|
||||
|
@ -18,3 +21,12 @@
|
|||
env:
|
||||
EULA: "TRUE"
|
||||
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
|
||||
|
|
|
@ -11,5 +11,10 @@ minidlna_media_directory2: "{{ tv_root }}"
|
|||
minidlna_friendly_name: "{{ ansible_nas_hostname }}"
|
||||
minidlna_port: "8201"
|
||||
|
||||
# docker
|
||||
minidlna_container_name: "minidnla"
|
||||
minidlna_image_name: "vladgh/minidlna"
|
||||
minidlna_image_version: "latest"
|
||||
|
||||
# specs
|
||||
minidlna_memory: "1g"
|
||||
|
|
11
roles/minidlna/docs/minidlna.md
Normal file
11
roles/minidlna/docs/minidlna.md
Normal 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>.
|
7
roles/minidlna/molecule/default/molecule.yml
Normal file
7
roles/minidlna/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
minidlna_enabled: true
|
||||
ansible_nas_hostname: ansible-nas
|
10
roles/minidlna/molecule/default/side_effect.yml
Normal file
10
roles/minidlna/molecule/default/side_effect.yml
Normal 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
|
19
roles/minidlna/molecule/default/verify.yml
Normal file
19
roles/minidlna/molecule/default/verify.yml
Normal 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
|
19
roles/minidlna/molecule/default/verify_stopped.yml
Normal file
19
roles/minidlna/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,8 +1,11 @@
|
|||
---
|
||||
- name: Start MiniDLNA
|
||||
block:
|
||||
- name: MiniDLNA Docker Container
|
||||
docker_container:
|
||||
name: minidlna
|
||||
image: vladgh/minidlna
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ minidlna_container_name }}"
|
||||
image: "{{ minidlna_image_name }}:{{ minidlna_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ minidlna_media_directory1 }}:/media1:rw"
|
||||
|
@ -15,3 +18,12 @@
|
|||
restart_policy: unless-stopped
|
||||
network_mode: host
|
||||
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
|
||||
|
|
|
@ -14,6 +14,14 @@ miniflux_admin_password: supersecure
|
|||
miniflux_hostname: "miniflux"
|
||||
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
|
||||
miniflux_memory: "1g"
|
||||
miniflux_postgres_memory: "1g"
|
||||
|
|
15
roles/miniflux/docs/miniflux.md
Normal file
15
roles/miniflux/docs/miniflux.md
Normal 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`.
|
6
roles/miniflux/molecule/default/molecule.yml
Normal file
6
roles/miniflux/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
miniflux_enabled: true
|
10
roles/miniflux/molecule/default/side_effect.yml
Normal file
10
roles/miniflux/molecule/default/side_effect.yml
Normal 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
|
19
roles/miniflux/molecule/default/verify.yml
Normal file
19
roles/miniflux/molecule/default/verify.yml
Normal 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
|
19
roles/miniflux/molecule/default/verify_stopped.yml
Normal file
19
roles/miniflux/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,15 +1,18 @@
|
|||
---
|
||||
- name: Start Miniflux
|
||||
block:
|
||||
- name: Create Miniflux Directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ miniflux_data_directory }}/postgres"
|
||||
|
||||
- name: Create Postgres for Miniflux
|
||||
docker_container:
|
||||
name: miniflux-postgres
|
||||
image: postgres:11.1
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ miniflux_db_container_name }}"
|
||||
image: "{{ miniflux_db_image_name }}:{{ miniflux_db_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ miniflux_data_directory }}/postgres:/var/lib/postgresql/data:rw"
|
||||
|
@ -20,9 +23,10 @@
|
|||
memory: "{{ miniflux_postgres_memory }}"
|
||||
|
||||
- name: Create Miniflux Docker Container
|
||||
docker_container:
|
||||
name: miniflux
|
||||
image: miniflux/miniflux:latest
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ miniflux_container_name }}"
|
||||
image: "{{ miniflux_image_name }}:{{ miniflux_image_version }}"
|
||||
pull: true
|
||||
links:
|
||||
- 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].sans: "*.{{ ansible_nas_domain }}"
|
||||
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
|
||||
|
|
|
@ -12,5 +12,10 @@ mosquitto_group_id: "0"
|
|||
mosquitto_port_a: "1883"
|
||||
mosquitto_port_b: "9001"
|
||||
|
||||
# docker
|
||||
mosquitto_container_name: "mosquitto"
|
||||
mosquitto_image_name: "eclipse-mosquitto"
|
||||
mosquitto_image_version: "latest"
|
||||
|
||||
# specs
|
||||
mosquitto_memory: 1g
|
||||
|
|
9
roles/mosquitto/docs/mosquitto.md
Normal file
9
roles/mosquitto/docs/mosquitto.md
Normal 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.
|
16
roles/mosquitto/molecule/default/molecule.yml
Normal file
16
roles/mosquitto/molecule/default/molecule.yml
Normal 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
|
10
roles/mosquitto/molecule/default/side_effect.yml
Normal file
10
roles/mosquitto/molecule/default/side_effect.yml
Normal 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
|
19
roles/mosquitto/molecule/default/verify.yml
Normal file
19
roles/mosquitto/molecule/default/verify.yml
Normal 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
|
19
roles/mosquitto/molecule/default/verify_stopped.yml
Normal file
19
roles/mosquitto/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: Start Mosquitto
|
||||
block:
|
||||
- name: Create Mosquitto Directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
|
@ -9,15 +11,16 @@
|
|||
- "{{ mosquitto_data_directory }}/log"
|
||||
|
||||
- name: Template mosquitto.conf
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: mosquitto.conf
|
||||
dest: "{{ mosquitto_data_directory }}/config/mosquitto.conf"
|
||||
register: mosquitto_conf
|
||||
|
||||
- name: Create Mosquitto container
|
||||
docker_container:
|
||||
name: mosquitto
|
||||
image: eclipse-mosquitto:latest
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ mosquitto_container_name }}"
|
||||
image: "{{ mosquitto_image_name }}:{{ mosquitto_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ mosquitto_data_directory }}/config/mosquitto.conf:/mosquitto/config/mosquitto.conf:rw"
|
||||
|
@ -29,3 +32,12 @@
|
|||
restart_policy: unless-stopped
|
||||
restart: "{{ mosquitto_conf is changed }}"
|
||||
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
|
||||
|
|
|
@ -16,5 +16,10 @@ mylar_group_id: "0"
|
|||
mylar_hostname: "mylar"
|
||||
mylar_port_http: "8585"
|
||||
|
||||
# docker
|
||||
mylar_container_name: "mylar"
|
||||
mylar_image_name: "linuxserver/mylar"
|
||||
mylar_image_version: "latest"
|
||||
|
||||
# specs
|
||||
mylar_memory: "1g"
|
||||
|
|
15
roles/mylar/docs/mylar.md
Normal file
15
roles/mylar/docs/mylar.md
Normal 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>.
|
6
roles/mylar/molecule/default/molecule.yml
Normal file
6
roles/mylar/molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
provisioner:
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
mylar_enabled: true
|
10
roles/mylar/molecule/default/side_effect.yml
Normal file
10
roles/mylar/molecule/default/side_effect.yml
Normal 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
|
19
roles/mylar/molecule/default/verify.yml
Normal file
19
roles/mylar/molecule/default/verify.yml
Normal 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
|
19
roles/mylar/molecule/default/verify_stopped.yml
Normal file
19
roles/mylar/molecule/default/verify_stopped.yml
Normal 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
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: Start Mylar
|
||||
block:
|
||||
- name: Create Mylar Directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
# mode: 0755
|
||||
|
@ -8,9 +10,10 @@
|
|||
- "{{ mylar_data_directory }}/config"
|
||||
|
||||
- name: Mylar Docker Container
|
||||
docker_container:
|
||||
name: mylar
|
||||
image: linuxserver/mylar
|
||||
community.docker.docker_container:
|
||||
container_default_behavior: no_defaults
|
||||
name: "{{ mylar_container_name }}"
|
||||
image: "{{ mylar_image_name }}:{{ mylar_image_version }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ 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].sans: "*.{{ ansible_nas_domain }}"
|
||||
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
Loading…
Reference in a new issue