mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-25 11:03:07 +00:00
commit
2372356a8e
6 changed files with 66 additions and 0 deletions
|
@ -61,6 +61,7 @@ Ansible config and a bunch of Docker containers.
|
|||
* [Mosquitto](https://mosquitto.org) - An open source MQTT broker
|
||||
* [Mylar](https://github.com/evilhero/mylar) - An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents
|
||||
* [MyMediaForAlexa](https://www.mymediaalexa.com/) - Lets you stream your music collection to your alexa device
|
||||
* [n8n](https://n8n.io") - Nodemation, a node based workflow and automation service like IFTTT.
|
||||
* [Netdata](https://my-netdata.io/) - An extremely comprehensive system monitoring solution
|
||||
* [Nextcloud](https://nextcloud.com/) - A self-hosted Dropbox alternative
|
||||
* [NZBget](https://nzbget.net/) - The most efficient usenet downloader
|
||||
|
|
14
docs/applications/n8n.md
Normal file
14
docs/applications/n8n.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Nodemation (n8n)
|
||||
|
||||
Homepage: [ihttps://n8n.io](https://n8n.io)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Set `n8n_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
|
||||
|
||||
n8n is secured by default, he user and password can be set with:
|
||||
* n8n_basic_auth_user: "<user name>"
|
||||
* n8n_basic_auth_password: "<user password>"
|
||||
|
||||
The default for these is "n8n_user" and "n8n_change_me" respectively, it is recommended to change these.
|
|
@ -39,6 +39,7 @@ By default, applications can be found on the ports listed below.
|
|||
| Mosquitto | 9001 | Websocket |
|
||||
| Mylar | 8585 | HTTP |
|
||||
| MyMediaForAlexa | 52051 | |
|
||||
| n8n | 5678 | HTTP |
|
||||
| Netdata | 19999 | |
|
||||
| Nextcloud | 8080 | |
|
||||
| NZBGet | 6789 | |
|
||||
|
|
5
nas.yml
5
nas.yml
|
@ -98,6 +98,11 @@
|
|||
- lidarr
|
||||
when: (lidarr_enabled | default(False))
|
||||
|
||||
- role: n8n
|
||||
tags:
|
||||
- n8n_enabled
|
||||
when: (n8n_enabled | default(False))
|
||||
|
||||
- role: netdata
|
||||
tags:
|
||||
- netdata
|
||||
|
|
14
roles/n8n/defaults/main.yml
Normal file
14
roles/n8n/defaults/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
n8n_enabled: false
|
||||
|
||||
# Networking
|
||||
n8n_available_externally: "false"
|
||||
n8n_port: 5678
|
||||
n8n_hostname: "n8n"
|
||||
|
||||
# Directories
|
||||
n8n_data_directory: "{{ docker_home }}/n8n"
|
||||
|
||||
|
||||
# Security
|
||||
n8n_basic_auth_user: "n8n_user"
|
||||
n8n_basic_auth_password: "n8n_change_me"
|
31
roles/n8n/tasks/main.yml
Normal file
31
roles/n8n/tasks/main.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
- name: Create n8n Directory
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ n8n_data_directory }}"
|
||||
|
||||
- name: n8n Docker Container
|
||||
docker_container:
|
||||
name: n8n
|
||||
image: n8nio/n8n
|
||||
pull: true
|
||||
ports:
|
||||
- "{{ n8n_port }}:5678"
|
||||
volumes:
|
||||
- "{{ n8n_data_directory }}:/home/node/.n8n:rw"
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
env:
|
||||
N8N_BASIC_AUTH_ACTIVE: "true"
|
||||
N8N_BASIC_AUTH_USER: "{{ n8n_basic_auth_user }}"
|
||||
N8N_BASIC_AUTH_PASSWORD: "{{ n8n_basic_auth_password }}"
|
||||
labels:
|
||||
traefik.enable: "{{ n8n_available_externally }}"
|
||||
traefik.http.routers.n8n.rule: "Host(`{{ n8n_hostname }}.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.n8n.tls.certresolver: "letsencrypt"
|
||||
traefik.http.routers.n8n.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.n8n.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||
traefik.http.services.gitea.loadbalancer.server.port: "5678"
|
Loading…
Reference in a new issue