From 496028663236bfc417a9830f1cce253b7b789686 Mon Sep 17 00:00:00 2001 From: Anarion Date: Wed, 8 Mar 2023 21:47:39 +0100 Subject: [PATCH 01/84] First portion of migration freshrss, get_iplayer, gitlab, glances, gotify, guacamole, healthchecks.io --- ansible-nas.code-workspace | 15 +++ nas.yml | 7 -- roles/freshrss/defaults/main.yml | 5 + roles/freshrss/docs/freshrss.md | 21 ++++ roles/freshrss/molecule/default/molecule.yml | 6 + .../freshrss/molecule/default/side_effect.yml | 10 ++ roles/freshrss/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/freshrss/tasks/main.yml | 72 ++++++----- roles/get_iplayer/defaults/main.yml | 5 + roles/get_iplayer/docs/get_iplayer.md | 11 ++ .../get_iplayer/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/get_iplayer/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/get_iplayer/tasks/main.yml | 50 +++++--- roles/gitlab/defaults/main.yml | 7 ++ roles/gitlab/docs/gitlab.md | 13 ++ roles/gitlab/molecule/default/molecule.yml | 6 + roles/gitlab/molecule/default/side_effect.yml | 10 ++ roles/gitlab/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/gitlab/tasks/main.yml | 118 ++++++++++-------- roles/glances/defaults/main.yml | 5 + roles/glances/docs/glances.md | 15 +++ roles/glances/molecule/default/molecule.yml | 6 + .../glances/molecule/default/side_effect.yml | 10 ++ roles/glances/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/glances/tasks/main.yml | 60 +++++---- roles/gotify/defaults/main.yml | 8 +- roles/gotify/docs/gotify.md | 16 +++ roles/gotify/molecule/default/molecule.yml | 6 + roles/gotify/molecule/default/side_effect.yml | 10 ++ roles/gotify/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/gotify/tasks/main.yml | 70 ++++++----- roles/guacamole/defaults/main.yml | 5 + roles/guacamole/docs/guacamole.md | 17 +++ roles/guacamole/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/guacamole/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/guacamole/tasks/main.yml | 102 ++++++++------- roles/healthchecks.io/docs/healthchecks.io.md | 11 ++ .../molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ .../molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/healthchecks.io/tasks/main.yml | 24 +++- 50 files changed, 818 insertions(+), 217 deletions(-) create mode 100644 ansible-nas.code-workspace create mode 100644 roles/freshrss/docs/freshrss.md create mode 100644 roles/freshrss/molecule/default/molecule.yml create mode 100644 roles/freshrss/molecule/default/side_effect.yml create mode 100644 roles/freshrss/molecule/default/verify.yml create mode 100644 roles/freshrss/molecule/default/verify_stopped.yml create mode 100644 roles/get_iplayer/docs/get_iplayer.md create mode 100644 roles/get_iplayer/molecule/default/molecule.yml create mode 100644 roles/get_iplayer/molecule/default/side_effect.yml create mode 100644 roles/get_iplayer/molecule/default/verify.yml create mode 100644 roles/get_iplayer/molecule/default/verify_stopped.yml create mode 100644 roles/gitlab/docs/gitlab.md create mode 100644 roles/gitlab/molecule/default/molecule.yml create mode 100644 roles/gitlab/molecule/default/side_effect.yml create mode 100644 roles/gitlab/molecule/default/verify.yml create mode 100644 roles/gitlab/molecule/default/verify_stopped.yml create mode 100644 roles/glances/docs/glances.md create mode 100644 roles/glances/molecule/default/molecule.yml create mode 100644 roles/glances/molecule/default/side_effect.yml create mode 100644 roles/glances/molecule/default/verify.yml create mode 100644 roles/glances/molecule/default/verify_stopped.yml create mode 100644 roles/gotify/docs/gotify.md create mode 100644 roles/gotify/molecule/default/molecule.yml create mode 100644 roles/gotify/molecule/default/side_effect.yml create mode 100644 roles/gotify/molecule/default/verify.yml create mode 100644 roles/gotify/molecule/default/verify_stopped.yml create mode 100644 roles/guacamole/docs/guacamole.md create mode 100644 roles/guacamole/molecule/default/molecule.yml create mode 100644 roles/guacamole/molecule/default/side_effect.yml create mode 100644 roles/guacamole/molecule/default/verify.yml create mode 100644 roles/guacamole/molecule/default/verify_stopped.yml create mode 100644 roles/healthchecks.io/docs/healthchecks.io.md create mode 100644 roles/healthchecks.io/molecule/default/molecule.yml create mode 100644 roles/healthchecks.io/molecule/default/side_effect.yml create mode 100644 roles/healthchecks.io/molecule/default/verify.yml create mode 100644 roles/healthchecks.io/molecule/default/verify_stopped.yml diff --git a/ansible-nas.code-workspace b/ansible-nas.code-workspace new file mode 100644 index 00000000..cec4ab85 --- /dev/null +++ b/ansible-nas.code-workspace @@ -0,0 +1,15 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": { + "yaml.schemas": { + "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/tasks": "file:///c%3A/Users/anarion/Documents/repos/ansible-nas/roles/immich/tasks/main.yml" + }, + "files.associations": { + "*.yaml": "home-assistant" + } + }, +} \ No newline at end of file diff --git a/nas.yml b/nas.yml index b71dcd39..bf2eff18 100644 --- a/nas.yml +++ b/nas.yml @@ -116,12 +116,10 @@ - role: freshrss tags: - freshrss - when: (freshrss_enabled | default(False)) - role: get_iplayer tags: - get_iplayer - when: (get_iplayer_enabled | default(False)) - role: gitea tags: @@ -130,27 +128,22 @@ - role: gitlab tags: - gitlab - when: (gitlab_enabled | default(False)) - role: glances tags: - glances - when: (glances_enabled | default(False)) - role: gotify tags: - gotify - when: (gotify_enabled | default(False)) - role: guacamole tags: - guacamole - when: (guacamole_enabled | default(False)) - role: healthchecks.io tags: - healthchecks.io - when: (healthchecks_enabled | default(False)) - role: heimdall tags: diff --git a/roles/freshrss/defaults/main.yml b/roles/freshrss/defaults/main.yml index a662c442..9dcc3401 100644 --- a/roles/freshrss/defaults/main.yml +++ b/roles/freshrss/defaults/main.yml @@ -10,5 +10,10 @@ freshrss_extensions_directory: "{{ docker_home }}/freshrss" freshrss_port: "8089" freshrss_hostname: "freshrss" +# docker +freshrss_container_name: freshrss +freshrss_image_name: "freshrss/freshrss" +freshrss_image_version: latest + # specs freshrss_memory: 1g diff --git a/roles/freshrss/docs/freshrss.md b/roles/freshrss/docs/freshrss.md new file mode 100644 index 00000000..d9cc30c9 --- /dev/null +++ b/roles/freshrss/docs/freshrss.md @@ -0,0 +1,21 @@ +# Freshrss + +Homepage: + +FreshRSS is a self-hosted RSS feed aggregator like Leed or Kriss Feed. + +It is lightweight, easy to work with, powerful, and customizable. + +It is a multi-user application with an anonymous reading mode. It supports custom tags. There is an API for (mobile) clients, and a Command-Line Interface. + +Thanks to the WebSub standard (formerly PubSubHubbub), FreshRSS is able to receive instant push notifications from compatible sources, such as Mastodon, Friendica, WordPress, Blogger, FeedBurner, etc. + +FreshRSS natively supports basic Web scraping, based on XPath, for Web sites not providing any RSS / Atom feed. + +Finally, it supports extensions for further tuning. + +## Usage + +Set `freshrss_enabled: true` in your `inventories//nas.yml` file. + +The FreshRSS web interface can be found at . diff --git a/roles/freshrss/molecule/default/molecule.yml b/roles/freshrss/molecule/default/molecule.yml new file mode 100644 index 00000000..76523f3f --- /dev/null +++ b/roles/freshrss/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + freshrss_enabled: true diff --git a/roles/freshrss/molecule/default/side_effect.yml b/roles/freshrss/molecule/default/side_effect.yml new file mode 100644 index 00000000..da69dc58 --- /dev/null +++ b/roles/freshrss/molecule/default/side_effect.yml @@ -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: + freshrss_enabled: false diff --git a/roles/freshrss/molecule/default/verify.yml b/roles/freshrss/molecule/default/verify.yml new file mode 100644 index 00000000..08aa5cca --- /dev/null +++ b/roles/freshrss/molecule/default/verify.yml @@ -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 freshrss container state + community.docker.docker_container: + name: "{{ freshrss_container_name }}" + register: result + + - name: Check if freshrss containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/freshrss/molecule/default/verify_stopped.yml b/roles/freshrss/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..f25fad5b --- /dev/null +++ b/roles/freshrss/molecule/default/verify_stopped.yml @@ -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 freshrss + community.docker.docker_container: + name: "{{ freshrss_container_name }}" + state: absent + register: result + + - name: Check if freshrss is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/freshrss/tasks/main.yml b/roles/freshrss/tasks/main.yml index c39bd64d..74494d2c 100644 --- a/roles/freshrss/tasks/main.yml +++ b/roles/freshrss/tasks/main.yml @@ -1,32 +1,44 @@ --- -- name: Create FreshRSS Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ freshrss_data_directory }}/data" - - "{{ freshrss_extensions_directory }}/extensions" +- name: Start FreshRSS + block: + - name: Create FreshRSS Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ freshrss_data_directory }}/data" + - "{{ freshrss_extensions_directory }}/extensions" -- name: FreshRSS Docker Container - docker_container: - name: freshrss - image: freshrss/freshrss - pull: true - volumes: - - "{{ freshrss_data_directory }}/data:/var/www/FreshRSS/data:rw" - - "{{ freshrss_extensions_directory }}/extensions:/var/www/FreshRSS/extensions:rw" - ports: - - "{{ freshrss_port }}:80" - env: - TZ: "{{ ansible_nas_timezone }}" - CRON_MIN: "1,31" - restart_policy: unless-stopped - memory: "{{ freshrss_memory }}" - labels: - traefik.enable: "{{ freshrss_available_externally | string }}" - traefik.http.routers.freshrss.rule: "Host(`{{ freshrss_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.freshrss.tls.certresolver: "letsencrypt" - traefik.http.routers.freshrss.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.freshrss.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.freshrss.loadbalancer.server.port: "80" + - name: FreshRSS Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ freshrss_container_name }}" + image: "{{ freshrss_image_name }}:{{ freshrss_image_version }}" + pull: true + volumes: + - "{{ freshrss_data_directory }}/data:/var/www/FreshRSS/data:rw" + - "{{ freshrss_extensions_directory }}/extensions:/var/www/FreshRSS/extensions:rw" + ports: + - "{{ freshrss_port }}:80" + env: + TZ: "{{ ansible_nas_timezone }}" + CRON_MIN: "1,31" + restart_policy: unless-stopped + memory: "{{ freshrss_memory }}" + labels: + traefik.enable: "{{ freshrss_available_externally | string }}" + traefik.http.routers.freshrss.rule: "Host(`{{ freshrss_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.freshrss.tls.certresolver: "letsencrypt" + traefik.http.routers.freshrss.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.freshrss.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.freshrss.loadbalancer.server.port: "80" + when: freshrss_enabled is true + + +- name: Stop FreshRSS + block: + - name: Stop FreshRSS + community.docker.docker_container: + name: "{{ freshrss_container_name }}" + state: absent + when: freshrss_enabled is false diff --git a/roles/get_iplayer/defaults/main.yml b/roles/get_iplayer/defaults/main.yml index c45a0124..56aac558 100644 --- a/roles/get_iplayer/defaults/main.yml +++ b/roles/get_iplayer/defaults/main.yml @@ -8,5 +8,10 @@ get_iplayer_download_directory: "{{ tv_root }}/iplayer_downloads" # network get_iplayer_port: "8182" +# docker +get_iplayer_container_name: "get_iplayer" +get_iplayer_image_name: "kolonuk/get_iplayer" +get_iplayer_image_version: "latest" + # specs get_iplayer_memory: "1g" diff --git a/roles/get_iplayer/docs/get_iplayer.md b/roles/get_iplayer/docs/get_iplayer.md new file mode 100644 index 00000000..48173c24 --- /dev/null +++ b/roles/get_iplayer/docs/get_iplayer.md @@ -0,0 +1,11 @@ +# Get_iPlayer + +Homepage: + +Downloads TV and radio programmes from BBC iPlayer. + +## Usage + +Set `get_iplayer_enabled: true` in your `inventories//nas.yml` file. + +The get_iplayer web interface can be found at . diff --git a/roles/get_iplayer/molecule/default/molecule.yml b/roles/get_iplayer/molecule/default/molecule.yml new file mode 100644 index 00000000..02aa4913 --- /dev/null +++ b/roles/get_iplayer/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + get_iplayer_enabled: true diff --git a/roles/get_iplayer/molecule/default/side_effect.yml b/roles/get_iplayer/molecule/default/side_effect.yml new file mode 100644 index 00000000..b8671855 --- /dev/null +++ b/roles/get_iplayer/molecule/default/side_effect.yml @@ -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: + get_iplayer_enabled: false diff --git a/roles/get_iplayer/molecule/default/verify.yml b/roles/get_iplayer/molecule/default/verify.yml new file mode 100644 index 00000000..e702ec7b --- /dev/null +++ b/roles/get_iplayer/molecule/default/verify.yml @@ -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 get_iplayer container state + community.docker.docker_container: + name: "{{ get_iplayer_container_name }}" + register: result + + - name: Check if get_iplayer containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/get_iplayer/molecule/default/verify_stopped.yml b/roles/get_iplayer/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..dfe21621 --- /dev/null +++ b/roles/get_iplayer/molecule/default/verify_stopped.yml @@ -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 get_iplayer + community.docker.docker_container: + name: "{{ get_iplayer_container_name }}" + state: absent + register: result + + - name: Check if get_iplayer is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/get_iplayer/tasks/main.yml b/roles/get_iplayer/tasks/main.yml index 4f05f6e9..4db0cb8f 100644 --- a/roles/get_iplayer/tasks/main.yml +++ b/roles/get_iplayer/tasks/main.yml @@ -1,21 +1,33 @@ --- -- name: Create get_iplayer Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ get_iplayer_config_directory }}" - - "{{ get_iplayer_download_directory }}" +- name: Start get_iplayer + block: + - name: Create get_iplayer Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ get_iplayer_config_directory }}" + - "{{ get_iplayer_download_directory }}" -- name: Get_iplayer Docker Container - docker_container: - name: get_iplayer - image: kolonuk/get_iplayer - pull: true - volumes: - - "{{ get_iplayer_config_directory }}:/root/.get_iplayer:rw" - - "{{ get_iplayer_download_directory }}:/root/output:rw" - ports: - - "{{ get_iplayer_port }}:8181" - restart_policy: unless-stopped - memory: "{{ get_iplayer_memory }}" + - name: Create get_iplayer Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ get_iplayer_container_name }}" + image: "{{ get_iplayer_image_name }}:{{ get_iplayer_image_version }}" + pull: true + volumes: + - "{{ get_iplayer_config_directory }}:/root/.get_iplayer:rw" + - "{{ get_iplayer_download_directory }}:/root/output:rw" + ports: + - "{{ get_iplayer_port }}:8181" + restart_policy: unless-stopped + memory: "{{ get_iplayer_memory }}" + when: get_iplayer_enabled is true + +- name: Stop get_iplayer + block: + - name: Stop get_iplayer + community.docker.docker_container: + name: "{{ get_iplayer_container_name }}" + state: absent + when: get_iplayer_enabled is false diff --git a/roles/gitlab/defaults/main.yml b/roles/gitlab/defaults/main.yml index d663eb2f..db33f9d7 100644 --- a/roles/gitlab/defaults/main.yml +++ b/roles/gitlab/defaults/main.yml @@ -12,5 +12,12 @@ gitlab_port_http: "4080" gitlab_port_https: "4443" gitlab_port_ssh: "422" +# docker +gitlab_container_name: "gitlab" +gitlab_image_name: "gitlab/gitlab-ce" +gitlab_image_version: "latest" +gitlab_user_id: "1000" +gitlab_group_id: "1000" + # specs gitlab_memory: "4g" diff --git a/roles/gitlab/docs/gitlab.md b/roles/gitlab/docs/gitlab.md new file mode 100644 index 00000000..f1b6873f --- /dev/null +++ b/roles/gitlab/docs/gitlab.md @@ -0,0 +1,13 @@ +# GitLab + +Homepage: + +If Gitea isn't powerful enough for you then consider GitLab. It's a much more powerful (and consequently bigger) Git repository solution that includes a suite of code analytics. On the other hand it requires more RAM. + +## Usage + +Set `gitlab_enabled: true` in your `inventories//nas.yml` file. + +To make GitLab available externally via Traefik set `gitlab_available_externally: true` in your `inventories//nas.yml` file. + +The first time you run GitLab you'll be prompted for an account's password. The password is for GitLab's `root` administrator account. From there you can log in to create additional users and further configure the application. diff --git a/roles/gitlab/molecule/default/molecule.yml b/roles/gitlab/molecule/default/molecule.yml new file mode 100644 index 00000000..177a9b8c --- /dev/null +++ b/roles/gitlab/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + gitlab_enabled: true diff --git a/roles/gitlab/molecule/default/side_effect.yml b/roles/gitlab/molecule/default/side_effect.yml new file mode 100644 index 00000000..1c319b01 --- /dev/null +++ b/roles/gitlab/molecule/default/side_effect.yml @@ -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: + gitlab_enabled: false diff --git a/roles/gitlab/molecule/default/verify.yml b/roles/gitlab/molecule/default/verify.yml new file mode 100644 index 00000000..318e6b65 --- /dev/null +++ b/roles/gitlab/molecule/default/verify.yml @@ -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 gitlab container state + community.docker.docker_container: + name: "{{ gitlab_container_name }}" + register: result + + - name: Check if gitlab containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/gitlab/molecule/default/verify_stopped.yml b/roles/gitlab/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..46bcc078 --- /dev/null +++ b/roles/gitlab/molecule/default/verify_stopped.yml @@ -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 gitlab + community.docker.docker_container: + name: "{{ gitlab_container_name }}" + state: absent + register: result + + - name: Check if gitlab is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/gitlab/tasks/main.yml b/roles/gitlab/tasks/main.yml index 31f2d4c9..549da0b2 100644 --- a/roles/gitlab/tasks/main.yml +++ b/roles/gitlab/tasks/main.yml @@ -1,57 +1,69 @@ --- -# The gitlab uid/gid matches 'git:git' in the Gitlab Docker image. -- name: Create Gitlab group account - group: - name: gitlab - gid: 998 - state: present +- name: Start Gitlab + block: + # The gitlab uid/gid matches 'git:git' in the Gitlab Docker image. + - name: Create Gitlab group account + group: + name: gitlab + gid: 998 + state: present -- name: Create Gitlab user account - user: - name: gitlab - uid: 998 - state: present - system: yes - update_password: on_create - create_home: no - group: gitlab + - name: Create Gitlab user account + user: + name: gitlab + uid: 998 + state: present + system: yes + update_password: on_create + create_home: no + group: gitlab -- name: Create Gitlab Directories - file: - path: "{{ item }}" - state: directory - owner: gitlab - group: gitlab - with_items: - - "{{ gitlab_data_directory }}/config" - - "{{ gitlab_data_directory }}/log" - - "{{ gitlab_data_directory }}/data" + - name: Create Gitlab Directories + file: + path: "{{ item }}" + state: directory + owner: gitlab + group: gitlab + with_items: + - "{{ gitlab_data_directory }}/config" + - "{{ gitlab_data_directory }}/log" + - "{{ gitlab_data_directory }}/data" -- name: Create Gitlab Docker Container - docker_container: - name: gitlab - image: gitlab/gitlab-ce:latest - pull: true - volumes: - - "{{ gitlab_data_directory }}/config:/etc/gitlab:rw" - - "{{ gitlab_data_directory }}/log:/var/log/gitlab:rw" - - "{{ gitlab_data_directory }}/data:/var/opt/gitlab:rw" - network_mode: "bridge" - ports: - - "{{ gitlab_port_http }}:80" - - "{{ gitlab_port_https }}:443" - - "{{ gitlab_port_ssh }}:22" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ gitlab_user_id }}" - PGID: "{{ gitlab_group_id }}" - restart_policy: unless-stopped - hostname: "{{ gitlab_hostname }}.{{ ansible_nas_domain }}" - memory: "{{ gitlab_memory }}" - labels: - traefik.enable: "{{ gitlab_available_externally | string }}" - traefik.http.routers.gitlab.rule: "Host(`{{ gitlab_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.gitlab.tls.certresolver: "letsencrypt" - traefik.http.routers.gitlab.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.gitlab.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.gitlab.loadbalancer.server.port: "80" + - name: Create Gitlab Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ gitlab_container_name }}" + image: "{{ gitlab_image_name }}:{{ gitlab_image_version }}" + pull: true + volumes: + - "{{ gitlab_data_directory }}/config:/etc/gitlab:rw" + - "{{ gitlab_data_directory }}/log:/var/log/gitlab:rw" + - "{{ gitlab_data_directory }}/data:/var/opt/gitlab:rw" + network_mode: "bridge" + ports: + - "{{ gitlab_port_http }}:80" + - "{{ gitlab_port_https }}:443" + - "{{ gitlab_port_ssh }}:22" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ gitlab_user_id }}" + PGID: "{{ gitlab_group_id }}" + restart_policy: unless-stopped + hostname: "{{ gitlab_hostname }}.{{ ansible_nas_domain }}" + memory: "{{ gitlab_memory }}" + labels: + traefik.enable: "{{ gitlab_available_externally | string }}" + traefik.http.routers.gitlab.rule: "Host(`{{ gitlab_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.gitlab.tls.certresolver: "letsencrypt" + traefik.http.routers.gitlab.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.gitlab.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.gitlab.loadbalancer.server.port: "80" + when: gitlab_enabled is true + +- name: Stop Gitlab + block: + - name: Stop Gitlab + community.docker.docker_container: + name: "{{ gitlab_container_name }}" + state: absent + when: gitlab_enabled is false diff --git a/roles/glances/defaults/main.yml b/roles/glances/defaults/main.yml index d5fbc587..f54f5bea 100644 --- a/roles/glances/defaults/main.yml +++ b/roles/glances/defaults/main.yml @@ -12,5 +12,10 @@ glances_port_two: "61209" glances_security_options: - "apparmor=unconfined" +# docker +glances_container_name: "glances" +glances_image_name: "nicolargo/glances" +glances_image_version: "latest" + # specs glances_memory: 1g diff --git a/roles/glances/docs/glances.md b/roles/glances/docs/glances.md new file mode 100644 index 00000000..382a5490 --- /dev/null +++ b/roles/glances/docs/glances.md @@ -0,0 +1,15 @@ +# Glances + +Homepage: + +Glances is a cross-platform system monitoring tool written in Python. + +## Usage + +Set `glances_enabled: true` in your `inventories//nas.yml` file. + +The Glances web interface can be found at . + +## Specific Configuration + +Glances can be integrated with InfluxDB and Grafana. diff --git a/roles/glances/molecule/default/molecule.yml b/roles/glances/molecule/default/molecule.yml new file mode 100644 index 00000000..425b90c9 --- /dev/null +++ b/roles/glances/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + glances_enabled: true diff --git a/roles/glances/molecule/default/side_effect.yml b/roles/glances/molecule/default/side_effect.yml new file mode 100644 index 00000000..b1924b70 --- /dev/null +++ b/roles/glances/molecule/default/side_effect.yml @@ -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: + glances_enabled: false diff --git a/roles/glances/molecule/default/verify.yml b/roles/glances/molecule/default/verify.yml new file mode 100644 index 00000000..2a9e2cc2 --- /dev/null +++ b/roles/glances/molecule/default/verify.yml @@ -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 glances container state + community.docker.docker_container: + name: "{{ glances_container_name }}" + register: result + + - name: Check if glances containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/glances/molecule/default/verify_stopped.yml b/roles/glances/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..5fcee409 --- /dev/null +++ b/roles/glances/molecule/default/verify_stopped.yml @@ -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 glances + community.docker.docker_container: + name: "{{ glances_container_name }}" + state: absent + register: result + + - name: Check if glances is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/glances/tasks/main.yml b/roles/glances/tasks/main.yml index f732f268..a89a7f24 100644 --- a/roles/glances/tasks/main.yml +++ b/roles/glances/tasks/main.yml @@ -1,25 +1,37 @@ --- -- name: Create Glances Docker Container - docker_container: - name: glances - image: nicolargo/glances - pull: true - volumes: - - "/var/run/docker.sock:/var/run/docker.sock:ro" - - "/etc/timezone:/etc/timezone:ro" - pid_mode: host - ports: - - "{{ glances_port_one }}:61208" - - "{{ glances_port_two }}:61209" - env: - GLANCES_OPT: "-w" - restart_policy: unless-stopped - security_opts: "{{ glances_security_options }}" - memory: "{{ glances_memory }}" - labels: - traefik.enable: "{{ glances_available_externally | string }}" - traefik.http.routers.glances.rule: "Host(`{{ glances_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.glances.tls.certresolver: "letsencrypt" - traefik.http.routers.glances.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.glances.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.glances.loadbalancer.server.port: "61208" +- name: Start Glances + block: + - name: Create Glances Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ glances_container_name }}" + image: "{{ glances_image_name }}:{{ glances_image_version }}" + pull: true + volumes: + - "/var/run/docker.sock:/var/run/docker.sock:ro" + - "/etc/timezone:/etc/timezone:ro" + pid_mode: host + ports: + - "{{ glances_port_one }}:61208" + - "{{ glances_port_two }}:61209" + env: + GLANCES_OPT: "-w" + restart_policy: unless-stopped + security_opts: "{{ glances_security_options }}" + memory: "{{ glances_memory }}" + labels: + traefik.enable: "{{ glances_available_externally | string }}" + traefik.http.routers.glances.rule: "Host(`{{ glances_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.glances.tls.certresolver: "letsencrypt" + traefik.http.routers.glances.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.glances.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.glances.loadbalancer.server.port: "61208" + when: glances_enabled is true + +- name: Stop Glances + block: + - name: Stop Glances + community.docker.docker_container: + name: "{{ glances_container_name }}" + state: absent + when: glances_enabled is false diff --git a/roles/gotify/defaults/main.yml b/roles/gotify/defaults/main.yml index 1ae240af..6bd37c22 100644 --- a/roles/gotify/defaults/main.yml +++ b/roles/gotify/defaults/main.yml @@ -5,14 +5,14 @@ gotify_available_externally: false # data directory gotify_data_directory: "{{ docker_home }}/gotify" -# docker image to use -gotify_docker_image: gotify/server:latest - # network gotify_port: "2346" gotify_hostname: "gotify" -# user to run container with +# docker +gotify_container_name: "gotify" +gotify_image_name: "gotify/server" +gotify_image_version: "latest" gotify_user_id: "0" gotify_group_id: "0" diff --git a/roles/gotify/docs/gotify.md b/roles/gotify/docs/gotify.md new file mode 100644 index 00000000..a440b5df --- /dev/null +++ b/roles/gotify/docs/gotify.md @@ -0,0 +1,16 @@ +# Gotify + +Homepage: + +A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui) + +## Usage + +Set `gotify_enabled: true` in your `inventories//nas.yml` file. + +The Gotify web interface can be found at . + +Android client: [https://play.google.com/store/apps/details?id=com.github.gotify](https://play.google.com/store/apps/details?id=com.github.gotify) +iOS client: n/a +Chrome extension: n/a +Firefox extension: diff --git a/roles/gotify/molecule/default/molecule.yml b/roles/gotify/molecule/default/molecule.yml new file mode 100644 index 00000000..bcda5085 --- /dev/null +++ b/roles/gotify/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + gotify_enabled: true diff --git a/roles/gotify/molecule/default/side_effect.yml b/roles/gotify/molecule/default/side_effect.yml new file mode 100644 index 00000000..36038c8e --- /dev/null +++ b/roles/gotify/molecule/default/side_effect.yml @@ -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: + gotify_enabled: false diff --git a/roles/gotify/molecule/default/verify.yml b/roles/gotify/molecule/default/verify.yml new file mode 100644 index 00000000..62059cb7 --- /dev/null +++ b/roles/gotify/molecule/default/verify.yml @@ -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 gotify container state + community.docker.docker_container: + name: "{{ gotify_container_name }}" + register: result + + - name: Check if gotify containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/gotify/molecule/default/verify_stopped.yml b/roles/gotify/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..541bbe3d --- /dev/null +++ b/roles/gotify/molecule/default/verify_stopped.yml @@ -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 gotify + community.docker.docker_container: + name: "{{ gotify_container_name }}" + state: absent + register: result + + - name: Check if gotify is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/gotify/tasks/main.yml b/roles/gotify/tasks/main.yml index 7560d692..ef6f33f8 100644 --- a/roles/gotify/tasks/main.yml +++ b/roles/gotify/tasks/main.yml @@ -1,31 +1,43 @@ --- -- name: Create Gotify Data Directory - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ gotify_data_directory }}" +- name: Start Gotify + block: + - name: Create Gotify Data Directory + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ gotify_data_directory }}" -- name: Gotify Docker Container - docker_container: - name: gotify - image: "{{ gotify_docker_image }}" - pull: true - ports: - - "{{ gotify_port }}:80" - volumes: - - "/var/run/docker.sock:/var/run/docker.sock" - - "{{ gotify_data_directory }}:/app/data:rw" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ gotify_user_id }}" - PGID: "{{ gotify_group_id }}" - restart_policy: unless-stopped - memory: "{{ gotify_memory }}" - labels: - traefik.enable: "{{ gotify_available_externally | string }}" - traefik.http.routers.gotify.rule: "Host(`{{ gotify_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.gotify.tls.certresolver: "letsencrypt" - traefik.http.routers.gotify.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.gotify.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.gotify.loadbalancer.server.port: "80" + - name: Gotify Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ gotify_container_name }}" + image: "{{ gotify_image_name }}:{{ gotify_image_version }}" + pull: true + ports: + - "{{ gotify_port }}:80" + volumes: + - "/var/run/docker.sock:/var/run/docker.sock" + - "{{ gotify_data_directory }}:/app/data:rw" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ gotify_user_id }}" + PGID: "{{ gotify_group_id }}" + restart_policy: unless-stopped + memory: "{{ gotify_memory }}" + labels: + traefik.enable: "{{ gotify_available_externally | string }}" + traefik.http.routers.gotify.rule: "Host(`{{ gotify_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.gotify.tls.certresolver: "letsencrypt" + traefik.http.routers.gotify.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.gotify.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.gotify.loadbalancer.server.port: "80" + when: gotify_enabled is true + +- name: Stop Gotify + block: + - name: Stop Gotify + community.docker.docker_container: + name: "{{ gotify_container_name }}" + state: absent + when: gotify_enabled is false diff --git a/roles/guacamole/defaults/main.yml b/roles/guacamole/defaults/main.yml index 04147f56..ce2f2af3 100644 --- a/roles/guacamole/defaults/main.yml +++ b/roles/guacamole/defaults/main.yml @@ -9,5 +9,10 @@ guacamole_data_directory: "{{ docker_home }}/guacamole" guacamole_port: "8090" guacamole_hostname: "guacamole" +# docker +guacamole_container_name: "guacamole" +guacamole_image_name: "oznu/guacamole" +guacamole_image_version: "latest" + # specs guacamole_memory: 1g diff --git a/roles/guacamole/docs/guacamole.md b/roles/guacamole/docs/guacamole.md new file mode 100644 index 00000000..11e022e3 --- /dev/null +++ b/roles/guacamole/docs/guacamole.md @@ -0,0 +1,17 @@ +# Guacamole + +Homepage: + +Apache Guacamole is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH. + +## Usage + +Set `guacamole_enabled: true` in your `inventories//nas.yml` file. + +## Specific Configuration + +The default username and password is `guacadmin`. Change it! + +## What to connect to? + +You can run a virtual desktop from your Ansible-NAS box, check out the [Virtual Desktop docs](virtual_desktop.md). diff --git a/roles/guacamole/molecule/default/molecule.yml b/roles/guacamole/molecule/default/molecule.yml new file mode 100644 index 00000000..6522e319 --- /dev/null +++ b/roles/guacamole/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + guacamole_enabled: true diff --git a/roles/guacamole/molecule/default/side_effect.yml b/roles/guacamole/molecule/default/side_effect.yml new file mode 100644 index 00000000..ca633833 --- /dev/null +++ b/roles/guacamole/molecule/default/side_effect.yml @@ -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: + guacamole_enabled: false diff --git a/roles/guacamole/molecule/default/verify.yml b/roles/guacamole/molecule/default/verify.yml new file mode 100644 index 00000000..dc90031f --- /dev/null +++ b/roles/guacamole/molecule/default/verify.yml @@ -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 guacamole container state + community.docker.docker_container: + name: "{{ guacamole_container_name }}" + register: result + + - name: Check if guacamole containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/guacamole/molecule/default/verify_stopped.yml b/roles/guacamole/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..f3b6955b --- /dev/null +++ b/roles/guacamole/molecule/default/verify_stopped.yml @@ -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 guacamole + community.docker.docker_container: + name: "{{ guacamole_container_name }}" + state: absent + register: result + + - name: Check if guacamole is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/guacamole/tasks/main.yml b/roles/guacamole/tasks/main.yml index 913067c1..1eee84fd 100644 --- a/roles/guacamole/tasks/main.yml +++ b/roles/guacamole/tasks/main.yml @@ -1,51 +1,63 @@ --- -- name: Create Guacamole directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ guacamole_data_directory }}/config" +- name: Start Guacamole + block: + - name: Create Guacamole directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ guacamole_data_directory }}/config" -- name: Remove Old Guacamole Mysql Docker Container - docker_container: - name: guacamole-mysql - state: absent - keep_volumes: true + - name: Remove Old Guacamole Mysql Docker Container + docker_container: + name: guacamole-mysql + state: absent + keep_volumes: true -- name: Remove Old Guacamole guacd Docker Container - docker_container: - name: guacamole-guacd - state: absent - keep_volumes: true + - name: Remove Old Guacamole guacd Docker Container + docker_container: + name: guacamole-guacd + state: absent + keep_volumes: true -- name: Remove old Guacamole directories - file: - path: "{{ item }}" - state: absent - with_items: - - "{{ guacamole_data_directory }}/mysql" + - name: Remove old Guacamole directories + file: + path: "{{ item }}" + state: absent + with_items: + - "{{ guacamole_data_directory }}/mysql" -- name: Guacamole Container - docker_container: - name: guacamole - image: "oznu/guacamole" - pull: true - volumes: - - "{{ guacamole_data_directory }}/config:/config:rw" - ports: - - "{{ guacamole_port }}:8080" - restart_policy: unless-stopped - memory: "{{ guacamole_memory }}" - labels: - traefik.enable: "{{ guacamole_available_externally | string }}" - traefik.http.routers.guacamole.rule: "Host(`{{ guacamole_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.guacamole.tls.certresolver: "letsencrypt" - traefik.http.routers.guacamole.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.guacamole.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.guacamole.loadbalancer.server.port: "8080" + - name: Guacamole Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ guacamole_container_name }}" + image: "{{ guacamole_image_name }}:{{ guacamole_image_version }}" + pull: true + volumes: + - "{{ guacamole_data_directory }}/config:/config:rw" + ports: + - "{{ guacamole_port }}:8080" + restart_policy: unless-stopped + memory: "{{ guacamole_memory }}" + labels: + traefik.enable: "{{ guacamole_available_externally | string }}" + traefik.http.routers.guacamole.rule: "Host(`{{ guacamole_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.guacamole.tls.certresolver: "letsencrypt" + traefik.http.routers.guacamole.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.guacamole.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.guacamole.loadbalancer.server.port: "8080" -- name: Restart Guacamole Container - docker_container: - name: guacamole - image: "oznu/guacamole" - restart: true + - name: Restart Guacamole Container + community.docker.docker_container: + name: "{{ guacamole_container_name }}" + image: "{{ guacamole_image_name }}:{{ guacamole_image_version }}" + restart: true + when: guacamole_enabled is true + +- name: Stop Guacamole + block: + - name: Stop Guacamole + community.docker.docker_container: + name: "{{ guacamole_container_name }}" + state: absent + when: guacamole_enabled is false diff --git a/roles/healthchecks.io/docs/healthchecks.io.md b/roles/healthchecks.io/docs/healthchecks.io.md new file mode 100644 index 00000000..3c9db8eb --- /dev/null +++ b/roles/healthchecks.io/docs/healthchecks.io.md @@ -0,0 +1,11 @@ +# Healthchecks.io + +Homepage: + +A simple cronjob that uses `curl` to ping a given endpoint on the `healthchecks.io` servers. You can choose how often it should ping the endpoint, and what happens when it doesn't. Email/Slack/Telegram and many more services can be integrated. + +## Usage + +Create your own project on , and set both the time between pings and the grace time. Set your prefered integration such as email. + +Set `healthchecks_enabled: true` in your `inventories//nas.yml` file, and if your time between pings is different than the default `healthchecks_ping_minutes`, change it. Finally, set your ping url in the `healthchecks_url` variable. diff --git a/roles/healthchecks.io/molecule/default/molecule.yml b/roles/healthchecks.io/molecule/default/molecule.yml new file mode 100644 index 00000000..5343b31e --- /dev/null +++ b/roles/healthchecks.io/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + healthchecks_enabled: true diff --git a/roles/healthchecks.io/molecule/default/side_effect.yml b/roles/healthchecks.io/molecule/default/side_effect.yml new file mode 100644 index 00000000..2b445448 --- /dev/null +++ b/roles/healthchecks.io/molecule/default/side_effect.yml @@ -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: + healthchecks_enabled: false diff --git a/roles/healthchecks.io/molecule/default/verify.yml b/roles/healthchecks.io/molecule/default/verify.yml new file mode 100644 index 00000000..69fff456 --- /dev/null +++ b/roles/healthchecks.io/molecule/default/verify.yml @@ -0,0 +1,19 @@ +--- +- name: Verify + hosts: all + gather_facts: false + tasks: + - name: Include vars + ansible.builtin.include_vars: + file: ../../defaults/main.yml + + - name: Check cron job file + ansible.builtin.fetch: + src: /var/spool/cron/crontabs/root + dest: /tmp/fetched + + - name: Check if cron job does exist + ansible.builtin.assert: + that: "lookup('file', '/tmp/fetched/instance/var/spool/cron/crontabs/root') is search('healthchecks.io')" + fail_msg: "Cron job 'healthchecks.io' does not exist!" + success_msg: "Cron job 'healthchecks.io' does exist!" diff --git a/roles/healthchecks.io/molecule/default/verify_stopped.yml b/roles/healthchecks.io/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..b0fa2024 --- /dev/null +++ b/roles/healthchecks.io/molecule/default/verify_stopped.yml @@ -0,0 +1,19 @@ +--- +- name: Verify + hosts: all + gather_facts: false + tasks: + - name: Include vars + ansible.builtin.include_vars: + file: ../../defaults/main.yml + + - name: Check cron job file + ansible.builtin.fetch: + src: /var/spool/cron/crontabs/root + dest: /tmp/fetched + + - name: Check if cron job does not exist + ansible.builtin.assert: + that: "not lookup('file', '/tmp/fetched/instance/var/spool/cron/crontabs/root') is search('healthchecks.io')" + fail_msg: "Cron job 'healthchecks.io' still exists!" + success_msg: "Cron job 'healthchecks.io' does not exist!" diff --git a/roles/healthchecks.io/tasks/main.yml b/roles/healthchecks.io/tasks/main.yml index e9a7e145..0e79f7cf 100644 --- a/roles/healthchecks.io/tasks/main.yml +++ b/roles/healthchecks.io/tasks/main.yml @@ -1,7 +1,19 @@ --- -- name: Add healthchecks.io cronjob - cron: - name: healthchecks.io - minute: "*/{{ healthchecks_ping_minutes }}" - user: root - job: "curl -m 10 --retry 5 {{ healthchecks_url }}" +- name: Start Healthchecks + block: + - name: Add healthchecks.io cronjob + ansible.builtin.cron: + name: healthchecks.io + minute: "*/{{ healthchecks_ping_minutes }}" + user: root + job: "curl -m 10 --retry 5 {{ healthchecks_url }}" + when: healthchecks_enabled is true + +- name: Stop Healthchecks + block: + - name: Remove healthchecks.io cronjob + ansible.builtin.cron: + name: healthchecks.io + user: root + state: absent + when: healthchecks_enabled is false From 463ea6f5cfca28dedaf4db4bf92dbcb2b74ccbb4 Mon Sep 17 00:00:00 2001 From: Anarion Date: Thu, 9 Mar 2023 15:17:27 +0100 Subject: [PATCH 02/84] Fix drone_ci tests --- roles/drone-ci/handlers/main.yml | 8 ++++++++ roles/drone-ci/molecule/default/molecule.yml | 3 +++ roles/drone-ci/molecule/default/prepare.yml | 20 +++++++++++++++++++ roles/drone-ci/molecule/default/verify.yml | 3 ++- .../molecule/default/verify_stopped.yml | 3 ++- 5 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 roles/drone-ci/handlers/main.yml create mode 100644 roles/drone-ci/molecule/default/prepare.yml diff --git a/roles/drone-ci/handlers/main.yml b/roles/drone-ci/handlers/main.yml new file mode 100644 index 00000000..991c4bcc --- /dev/null +++ b/roles/drone-ci/handlers/main.yml @@ -0,0 +1,8 @@ +--- +- name: Restart gitea + community.docker.docker_container: + name: gitea + image: gitea/gitea:latest + state: started + restart: true + listen: "restart gitea" diff --git a/roles/drone-ci/molecule/default/molecule.yml b/roles/drone-ci/molecule/default/molecule.yml index 0671311d..6e293974 100644 --- a/roles/drone-ci/molecule/default/molecule.yml +++ b/roles/drone-ci/molecule/default/molecule.yml @@ -8,3 +8,6 @@ provisioner: drone_ci_gitea_client_secret: asdfasd12341234 gitea_port_http: 3001 ansible_nas_hostname: ansible-nas-ci + gitea_data_directory: "/tmp" + playbooks: + prepare: prepare.yml diff --git a/roles/drone-ci/molecule/default/prepare.yml b/roles/drone-ci/molecule/default/prepare.yml new file mode 100644 index 00000000..343f1e6f --- /dev/null +++ b/roles/drone-ci/molecule/default/prepare.yml @@ -0,0 +1,20 @@ +--- +- name: Prepare + hosts: all + tasks: + - name: Install docker python module + pip: + name: docker + + - name: Create a dummy gitea config directory + file: + path: "{{ item }}" + state: directory + recurse: yes + with_items: + - "{{ gitea_data_directory }}/gitea/gitea/conf" + + - name: Create a dummy gitea config file + file: + path: "{{ gitea_data_directory }}/gitea/gitea/conf/app.ini" + state: touch diff --git a/roles/drone-ci/molecule/default/verify.yml b/roles/drone-ci/molecule/default/verify.yml index c993caf9..f48abc53 100644 --- a/roles/drone-ci/molecule/default/verify.yml +++ b/roles/drone-ci/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/drone-ci/molecule/default/verify_stopped.yml b/roles/drone-ci/molecule/default/verify_stopped.yml index 3f8ce56f..3f50b5da 100644 --- a/roles/drone-ci/molecule/default/verify_stopped.yml +++ b/roles/drone-ci/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Drone CI From e253f0a5d0c1c8f6ae74ddc9872b09631f1bf4d5 Mon Sep 17 00:00:00 2001 From: Anarion Date: Thu, 9 Mar 2023 21:47:42 +0100 Subject: [PATCH 03/84] Another set: heimdall to overseer --- nas.yml | 17 --- roles/heimdall/docs/heimdall.md | 15 +++ roles/homeassistant/defaults/main.yml | 5 + roles/homeassistant/docs/homeassistant.md | 13 ++ .../molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ .../homeassistant/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/homeassistant/tasks/main.yml | 62 +++++---- roles/homebridge/defaults/main.yml | 5 + roles/homebridge/docs/homebridge.md | 11 ++ .../homebridge/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/homebridge/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/homebridge/tasks/main.yml | 72 ++++++----- roles/jackett/defaults/main.yml | 5 + roles/jackett/docs/jackett.md | 11 ++ roles/jackett/molecule/default/molecule.yml | 6 + .../jackett/molecule/default/side_effect.yml | 10 ++ roles/jackett/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/jackett/tasks/main.yml | 66 ++++++---- roles/jellyfin/defaults/main.yml | 5 + roles/jellyfin/docs/jellyfin.md | 65 ++++++++++ roles/jellyfin/molecule/default/molecule.yml | 6 + .../jellyfin/molecule/default/side_effect.yml | 10 ++ roles/jellyfin/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/jellyfin/tasks/main.yml | 82 ++++++------ roles/joomla/defaults/main.yml | 10 ++ roles/joomla/docs/joomla.md | 23 ++++ roles/joomla/molecule/default/molecule.yml | 6 + roles/joomla/molecule/default/side_effect.yml | 10 ++ roles/joomla/molecule/default/verify.yml | 26 ++++ .../molecule/default/verify_stopped.yml | 26 ++++ roles/joomla/tasks/main.yml | 113 ++++++++++------- roles/komga/defaults/main.yml | 5 + roles/komga/docs/komga.md | 13 ++ roles/komga/molecule/default/molecule.yml | 6 + roles/komga/molecule/default/side_effect.yml | 10 ++ roles/komga/molecule/default/verify.yml | 19 +++ .../komga/molecule/default/verify_stopped.yml | 19 +++ roles/komga/tasks/main.yml | 80 +++++++----- roles/krusader/defaults/main.yml | 5 + roles/krusader/docs/krusader.md | 13 ++ roles/krusader/molecule/default/molecule.yml | 6 + .../krusader/molecule/default/side_effect.yml | 10 ++ roles/krusader/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/krusader/tasks/main.yml | 76 ++++++----- roles/lidarr/defaults/main.yml | 5 + roles/lidarr/docs/lidarr.md | 9 ++ roles/lidarr/molecule/default/molecule.yml | 6 + roles/lidarr/molecule/default/side_effect.yml | 10 ++ roles/lidarr/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/lidarr/tasks/main.yml | 68 +++++----- roles/mealie/defaults/main.yml | 5 + roles/mealie/docs/mealie.md | 11 ++ roles/mealie/molecule/default/molecule.yml | 6 + roles/mealie/molecule/default/side_effect.yml | 10 ++ roles/mealie/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/mealie/tasks/main.yml | 83 ++++++------ roles/minecraft-server/defaults/main.yml | 5 + .../minecraft-server/docs/minecraft-server.md | 13 ++ .../molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ .../molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/minecraft-server/tasks/main.yml | 48 ++++--- roles/minidlna/defaults/main.yml | 5 + roles/minidlna/docs/minidlna.md | 11 ++ roles/minidlna/molecule/default/molecule.yml | 7 ++ .../minidlna/molecule/default/side_effect.yml | 10 ++ roles/minidlna/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/minidlna/tasks/main.yml | 44 ++++--- roles/miniflux/defaults/main.yml | 8 ++ roles/miniflux/docs/miniflux.md | 15 +++ roles/miniflux/molecule/default/molecule.yml | 6 + .../miniflux/molecule/default/side_effect.yml | 10 ++ roles/miniflux/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/miniflux/tasks/main.yml | 97 +++++++------- roles/mosquitto/defaults/main.yml | 5 + roles/mosquitto/docs/mosquitto.md | 9 ++ roles/mosquitto/molecule/default/molecule.yml | 16 +++ .../molecule/default/side_effect.yml | 10 ++ roles/mosquitto/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/mosquitto/tasks/main.yml | 68 +++++----- roles/mylar/defaults/main.yml | 5 + roles/mylar/docs/mylar.md | 15 +++ roles/mylar/molecule/default/molecule.yml | 6 + roles/mylar/molecule/default/side_effect.yml | 10 ++ roles/mylar/molecule/default/verify.yml | 19 +++ .../mylar/molecule/default/verify_stopped.yml | 19 +++ roles/mylar/tasks/main.yml | 76 ++++++----- roles/mymediaforalexa/defaults/main.yml | 5 + roles/mymediaforalexa/docs/mymediaforalexa.md | 11 ++ .../molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ .../molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/mymediaforalexa/tasks/main.yml | 48 ++++--- roles/n8n/defaults/main.yml | 5 + roles/n8n/docs/n8n.md | 18 +++ roles/n8n/molecule/default/molecule.yml | 6 + roles/n8n/molecule/default/side_effect.yml | 10 ++ roles/n8n/molecule/default/verify.yml | 19 +++ roles/n8n/molecule/default/verify_stopped.yml | 19 +++ roles/n8n/tasks/main.yml | 70 ++++++----- roles/navidrome/defaults/main.yml | 5 + roles/navidrome/docs/navidrome.md | 11 ++ roles/navidrome/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/navidrome/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/navidrome/tasks/main.yml | 78 +++++++----- roles/netbootxyz/defaults/main.yml | 5 +- roles/netbootxyz/docs/netbootxyz.md | 15 +++ .../netbootxyz/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/netbootxyz/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/netbootxyz/tasks/main.yml | 76 ++++++----- roles/netdata/defaults/main.yml | 5 + roles/netdata/docs/netdata.md | 11 ++ roles/netdata/molecule/default/molecule.yml | 7 ++ .../netdata/molecule/default/side_effect.yml | 10 ++ roles/netdata/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/netdata/tasks/main.yml | 76 ++++++----- roles/nextcloud/defaults/main.yml | 15 ++- roles/nextcloud/docs/nextcloud.md | 25 ++++ roles/nextcloud/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/nextcloud/molecule/default/verify.yml | 26 ++++ .../molecule/default/verify_stopped.yml | 26 ++++ roles/nextcloud/tasks/main.yml | 119 +++++++++++------- roles/nomad/docs/nomad.md | 11 ++ roles/nomad/molecule/default/molecule.yml | 16 +++ roles/nomad/molecule/default/side_effect.yml | 10 ++ roles/nomad/molecule/default/verify.yml | 21 ++++ .../nomad/molecule/default/verify_stopped.yml | 18 +++ roles/nomad/tasks/main.yml | 12 +- roles/nzbget/defaults/main.yml | 5 + roles/nzbget/docs/nzbget.md | 11 ++ roles/nzbget/molecule/default/molecule.yml | 6 + roles/nzbget/molecule/default/side_effect.yml | 10 ++ roles/nzbget/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/nzbget/tasks/main.yml | 70 ++++++----- roles/octoprint/defaults/main.yml | 5 + roles/octoprint/docs/octoprint.md | 11 ++ roles/octoprint/molecule/default/molecule.yml | 19 +++ .../molecule/default/side_effect.yml | 10 ++ roles/octoprint/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/octoprint/tasks/main.yml | 74 ++++++----- roles/ombi/defaults/main.yml | 5 +- roles/ombi/docs/ombi.md | 9 ++ roles/ombi/molecule/default/molecule.yml | 6 + roles/ombi/molecule/default/side_effect.yml | 10 ++ roles/ombi/molecule/default/verify.yml | 19 +++ .../ombi/molecule/default/verify_stopped.yml | 19 +++ roles/ombi/tasks/main.yml | 64 ++++++---- roles/openhab/defaults/main.yml | 5 + roles/openhab/docs/openhab.md | 15 +++ roles/openhab/molecule/default/molecule.yml | 6 + .../openhab/molecule/default/side_effect.yml | 10 ++ roles/openhab/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/openhab/tasks/main.yml | 110 ++++++++-------- roles/organizr/defaults/main.yml | 5 +- roles/organizr/docs/organizr.md | 15 +++ roles/organizr/molecule/default/molecule.yml | 6 + .../organizr/molecule/default/side_effect.yml | 10 ++ roles/organizr/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/organizr/tasks/main.yml | 70 ++++++----- roles/overseerr/defaults/main.yml | 5 +- roles/overseerr/docs/overseerr.md | 13 ++ roles/overseerr/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/overseerr/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/overseerr/tasks/main.yml | 70 ++++++----- roles/paperless_ng/docs/trilium.md | 11 ++ .../molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ .../paperless_ng/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/piwigo/docs/trilium.md | 11 ++ roles/piwigo/molecule/default/molecule.yml | 6 + roles/piwigo/molecule/default/side_effect.yml | 10 ++ roles/piwigo/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/plex/docs/trilium.md | 11 ++ roles/plex/molecule/default/molecule.yml | 6 + roles/plex/molecule/default/side_effect.yml | 10 ++ roles/plex/molecule/default/verify.yml | 19 +++ .../plex/molecule/default/verify_stopped.yml | 19 +++ roles/portainer/docs/trilium.md | 11 ++ roles/portainer/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/portainer/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ 210 files changed, 3504 insertions(+), 838 deletions(-) create mode 100644 roles/heimdall/docs/heimdall.md create mode 100644 roles/homeassistant/docs/homeassistant.md create mode 100644 roles/homeassistant/molecule/default/molecule.yml create mode 100644 roles/homeassistant/molecule/default/side_effect.yml create mode 100644 roles/homeassistant/molecule/default/verify.yml create mode 100644 roles/homeassistant/molecule/default/verify_stopped.yml create mode 100644 roles/homebridge/docs/homebridge.md create mode 100644 roles/homebridge/molecule/default/molecule.yml create mode 100644 roles/homebridge/molecule/default/side_effect.yml create mode 100644 roles/homebridge/molecule/default/verify.yml create mode 100644 roles/homebridge/molecule/default/verify_stopped.yml create mode 100644 roles/jackett/docs/jackett.md create mode 100644 roles/jackett/molecule/default/molecule.yml create mode 100644 roles/jackett/molecule/default/side_effect.yml create mode 100644 roles/jackett/molecule/default/verify.yml create mode 100644 roles/jackett/molecule/default/verify_stopped.yml create mode 100644 roles/jellyfin/docs/jellyfin.md create mode 100644 roles/jellyfin/molecule/default/molecule.yml create mode 100644 roles/jellyfin/molecule/default/side_effect.yml create mode 100644 roles/jellyfin/molecule/default/verify.yml create mode 100644 roles/jellyfin/molecule/default/verify_stopped.yml create mode 100644 roles/joomla/docs/joomla.md create mode 100644 roles/joomla/molecule/default/molecule.yml create mode 100644 roles/joomla/molecule/default/side_effect.yml create mode 100644 roles/joomla/molecule/default/verify.yml create mode 100644 roles/joomla/molecule/default/verify_stopped.yml create mode 100644 roles/komga/docs/komga.md create mode 100644 roles/komga/molecule/default/molecule.yml create mode 100644 roles/komga/molecule/default/side_effect.yml create mode 100644 roles/komga/molecule/default/verify.yml create mode 100644 roles/komga/molecule/default/verify_stopped.yml create mode 100644 roles/krusader/docs/krusader.md create mode 100644 roles/krusader/molecule/default/molecule.yml create mode 100644 roles/krusader/molecule/default/side_effect.yml create mode 100644 roles/krusader/molecule/default/verify.yml create mode 100644 roles/krusader/molecule/default/verify_stopped.yml create mode 100644 roles/lidarr/docs/lidarr.md create mode 100644 roles/lidarr/molecule/default/molecule.yml create mode 100644 roles/lidarr/molecule/default/side_effect.yml create mode 100644 roles/lidarr/molecule/default/verify.yml create mode 100644 roles/lidarr/molecule/default/verify_stopped.yml create mode 100644 roles/mealie/docs/mealie.md create mode 100644 roles/mealie/molecule/default/molecule.yml create mode 100644 roles/mealie/molecule/default/side_effect.yml create mode 100644 roles/mealie/molecule/default/verify.yml create mode 100644 roles/mealie/molecule/default/verify_stopped.yml create mode 100644 roles/minecraft-server/docs/minecraft-server.md create mode 100644 roles/minecraft-server/molecule/default/molecule.yml create mode 100644 roles/minecraft-server/molecule/default/side_effect.yml create mode 100644 roles/minecraft-server/molecule/default/verify.yml create mode 100644 roles/minecraft-server/molecule/default/verify_stopped.yml create mode 100644 roles/minidlna/docs/minidlna.md create mode 100644 roles/minidlna/molecule/default/molecule.yml create mode 100644 roles/minidlna/molecule/default/side_effect.yml create mode 100644 roles/minidlna/molecule/default/verify.yml create mode 100644 roles/minidlna/molecule/default/verify_stopped.yml create mode 100644 roles/miniflux/docs/miniflux.md create mode 100644 roles/miniflux/molecule/default/molecule.yml create mode 100644 roles/miniflux/molecule/default/side_effect.yml create mode 100644 roles/miniflux/molecule/default/verify.yml create mode 100644 roles/miniflux/molecule/default/verify_stopped.yml create mode 100644 roles/mosquitto/docs/mosquitto.md create mode 100644 roles/mosquitto/molecule/default/molecule.yml create mode 100644 roles/mosquitto/molecule/default/side_effect.yml create mode 100644 roles/mosquitto/molecule/default/verify.yml create mode 100644 roles/mosquitto/molecule/default/verify_stopped.yml create mode 100644 roles/mylar/docs/mylar.md create mode 100644 roles/mylar/molecule/default/molecule.yml create mode 100644 roles/mylar/molecule/default/side_effect.yml create mode 100644 roles/mylar/molecule/default/verify.yml create mode 100644 roles/mylar/molecule/default/verify_stopped.yml create mode 100644 roles/mymediaforalexa/docs/mymediaforalexa.md create mode 100644 roles/mymediaforalexa/molecule/default/molecule.yml create mode 100644 roles/mymediaforalexa/molecule/default/side_effect.yml create mode 100644 roles/mymediaforalexa/molecule/default/verify.yml create mode 100644 roles/mymediaforalexa/molecule/default/verify_stopped.yml create mode 100644 roles/n8n/docs/n8n.md create mode 100644 roles/n8n/molecule/default/molecule.yml create mode 100644 roles/n8n/molecule/default/side_effect.yml create mode 100644 roles/n8n/molecule/default/verify.yml create mode 100644 roles/n8n/molecule/default/verify_stopped.yml create mode 100644 roles/navidrome/docs/navidrome.md create mode 100644 roles/navidrome/molecule/default/molecule.yml create mode 100644 roles/navidrome/molecule/default/side_effect.yml create mode 100644 roles/navidrome/molecule/default/verify.yml create mode 100644 roles/navidrome/molecule/default/verify_stopped.yml create mode 100644 roles/netbootxyz/docs/netbootxyz.md create mode 100644 roles/netbootxyz/molecule/default/molecule.yml create mode 100644 roles/netbootxyz/molecule/default/side_effect.yml create mode 100644 roles/netbootxyz/molecule/default/verify.yml create mode 100644 roles/netbootxyz/molecule/default/verify_stopped.yml create mode 100644 roles/netdata/docs/netdata.md create mode 100644 roles/netdata/molecule/default/molecule.yml create mode 100644 roles/netdata/molecule/default/side_effect.yml create mode 100644 roles/netdata/molecule/default/verify.yml create mode 100644 roles/netdata/molecule/default/verify_stopped.yml create mode 100644 roles/nextcloud/docs/nextcloud.md create mode 100644 roles/nextcloud/molecule/default/molecule.yml create mode 100644 roles/nextcloud/molecule/default/side_effect.yml create mode 100644 roles/nextcloud/molecule/default/verify.yml create mode 100644 roles/nextcloud/molecule/default/verify_stopped.yml create mode 100644 roles/nomad/docs/nomad.md create mode 100644 roles/nomad/molecule/default/molecule.yml create mode 100644 roles/nomad/molecule/default/side_effect.yml create mode 100644 roles/nomad/molecule/default/verify.yml create mode 100644 roles/nomad/molecule/default/verify_stopped.yml create mode 100644 roles/nzbget/docs/nzbget.md create mode 100644 roles/nzbget/molecule/default/molecule.yml create mode 100644 roles/nzbget/molecule/default/side_effect.yml create mode 100644 roles/nzbget/molecule/default/verify.yml create mode 100644 roles/nzbget/molecule/default/verify_stopped.yml create mode 100644 roles/octoprint/docs/octoprint.md create mode 100644 roles/octoprint/molecule/default/molecule.yml create mode 100644 roles/octoprint/molecule/default/side_effect.yml create mode 100644 roles/octoprint/molecule/default/verify.yml create mode 100644 roles/octoprint/molecule/default/verify_stopped.yml create mode 100644 roles/ombi/docs/ombi.md create mode 100644 roles/ombi/molecule/default/molecule.yml create mode 100644 roles/ombi/molecule/default/side_effect.yml create mode 100644 roles/ombi/molecule/default/verify.yml create mode 100644 roles/ombi/molecule/default/verify_stopped.yml create mode 100644 roles/openhab/docs/openhab.md create mode 100644 roles/openhab/molecule/default/molecule.yml create mode 100644 roles/openhab/molecule/default/side_effect.yml create mode 100644 roles/openhab/molecule/default/verify.yml create mode 100644 roles/openhab/molecule/default/verify_stopped.yml create mode 100644 roles/organizr/docs/organizr.md create mode 100644 roles/organizr/molecule/default/molecule.yml create mode 100644 roles/organizr/molecule/default/side_effect.yml create mode 100644 roles/organizr/molecule/default/verify.yml create mode 100644 roles/organizr/molecule/default/verify_stopped.yml create mode 100644 roles/overseerr/docs/overseerr.md create mode 100644 roles/overseerr/molecule/default/molecule.yml create mode 100644 roles/overseerr/molecule/default/side_effect.yml create mode 100644 roles/overseerr/molecule/default/verify.yml create mode 100644 roles/overseerr/molecule/default/verify_stopped.yml create mode 100644 roles/paperless_ng/docs/trilium.md create mode 100644 roles/paperless_ng/molecule/default/molecule.yml create mode 100644 roles/paperless_ng/molecule/default/side_effect.yml create mode 100644 roles/paperless_ng/molecule/default/verify.yml create mode 100644 roles/paperless_ng/molecule/default/verify_stopped.yml create mode 100644 roles/piwigo/docs/trilium.md create mode 100644 roles/piwigo/molecule/default/molecule.yml create mode 100644 roles/piwigo/molecule/default/side_effect.yml create mode 100644 roles/piwigo/molecule/default/verify.yml create mode 100644 roles/piwigo/molecule/default/verify_stopped.yml create mode 100644 roles/plex/docs/trilium.md create mode 100644 roles/plex/molecule/default/molecule.yml create mode 100644 roles/plex/molecule/default/side_effect.yml create mode 100644 roles/plex/molecule/default/verify.yml create mode 100644 roles/plex/molecule/default/verify_stopped.yml create mode 100644 roles/portainer/docs/trilium.md create mode 100644 roles/portainer/molecule/default/molecule.yml create mode 100644 roles/portainer/molecule/default/side_effect.yml create mode 100644 roles/portainer/molecule/default/verify.yml create mode 100644 roles/portainer/molecule/default/verify_stopped.yml diff --git a/nas.yml b/nas.yml index bf2eff18..a4d2e434 100644 --- a/nas.yml +++ b/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: diff --git a/roles/heimdall/docs/heimdall.md b/roles/heimdall/docs/heimdall.md new file mode 100644 index 00000000..ff2417dd --- /dev/null +++ b/roles/heimdall/docs/heimdall.md @@ -0,0 +1,15 @@ +# Heimdall + +Homepage: + +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//nas.yml` file. + +The Heimdall web interface can be found at . + +## Specific Configuration + +Heimdall defaults to port 10080 - some browsers block this port. Override `heimdall_port_http` to move it somewhere else. diff --git a/roles/homeassistant/defaults/main.yml b/roles/homeassistant/defaults/main.yml index 7490d2e1..dd6d857f 100644 --- a/roles/homeassistant/defaults/main.yml +++ b/roles/homeassistant/defaults/main.yml @@ -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 diff --git a/roles/homeassistant/docs/homeassistant.md b/roles/homeassistant/docs/homeassistant.md new file mode 100644 index 00000000..f7163cb2 --- /dev/null +++ b/roles/homeassistant/docs/homeassistant.md @@ -0,0 +1,13 @@ +# Home Assistant + +Homepage: + +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//nas.yml` file. + +If you want to access Home Assistant externally, don't forget to set `homeassistant_available_externally: true` in your `inventories//nas.yml` file. + +The Home Assistant web interface can be found at . diff --git a/roles/homeassistant/molecule/default/molecule.yml b/roles/homeassistant/molecule/default/molecule.yml new file mode 100644 index 00000000..8d74fd32 --- /dev/null +++ b/roles/homeassistant/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + homeassistant_enabled: true diff --git a/roles/homeassistant/molecule/default/side_effect.yml b/roles/homeassistant/molecule/default/side_effect.yml new file mode 100644 index 00000000..7fd43749 --- /dev/null +++ b/roles/homeassistant/molecule/default/side_effect.yml @@ -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 diff --git a/roles/homeassistant/molecule/default/verify.yml b/roles/homeassistant/molecule/default/verify.yml new file mode 100644 index 00000000..e2165892 --- /dev/null +++ b/roles/homeassistant/molecule/default/verify.yml @@ -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 diff --git a/roles/homeassistant/molecule/default/verify_stopped.yml b/roles/homeassistant/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..e4d2ab86 --- /dev/null +++ b/roles/homeassistant/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/homeassistant/tasks/main.yml b/roles/homeassistant/tasks/main.yml index 1f211cd1..0c1ee603 100644 --- a/roles/homeassistant/tasks/main.yml +++ b/roles/homeassistant/tasks/main.yml @@ -1,27 +1,39 @@ --- -- name: Create Home Assistant Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ homeassistant_data_directory }}/config" +- name: Start Homeassistant + block: + - name: Create Home Assistant Directories + 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 - pull: true - volumes: - - "{{ homeassistant_data_directory }}/config:/config:rw" - network_mode: host - restart_policy: unless-stopped - env: - TZ: "{{ ansible_nas_timezone }}" - labels: - traefik.enable: "{{ homeassistant_available_externally | string }}" - traefik.http.routers.homeassistant.rule: "Host(`{{ homeassistant_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.homeassistant.tls.certresolver: "letsencrypt" - traefik.http.routers.homeassistant.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.homeassistant.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.homeassistant.loadbalancer.server.port: "8123" - memory: "{{ homeassistant_memory }}" + - name: Home Assistant Docker Container + 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" + network_mode: host + restart_policy: unless-stopped + env: + TZ: "{{ ansible_nas_timezone }}" + labels: + traefik.enable: "{{ homeassistant_available_externally | string }}" + traefik.http.routers.homeassistant.rule: "Host(`{{ homeassistant_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.homeassistant.tls.certresolver: "letsencrypt" + traefik.http.routers.homeassistant.tls.domains[0].main: "{{ ansible_nas_domain }}" + 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 diff --git a/roles/homebridge/defaults/main.yml b/roles/homebridge/defaults/main.yml index 03ef2181..286e8990 100644 --- a/roles/homebridge/defaults/main.yml +++ b/roles/homebridge/defaults/main.yml @@ -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" diff --git a/roles/homebridge/docs/homebridge.md b/roles/homebridge/docs/homebridge.md new file mode 100644 index 00000000..cbb9b329 --- /dev/null +++ b/roles/homebridge/docs/homebridge.md @@ -0,0 +1,11 @@ +# Homebridge + +Homepage: + +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//nas.yml` file. + +The Homebridge web interface can be found at . The default username and password is 'admin' - change this after your first login! diff --git a/roles/homebridge/molecule/default/molecule.yml b/roles/homebridge/molecule/default/molecule.yml new file mode 100644 index 00000000..57e51aec --- /dev/null +++ b/roles/homebridge/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + homebridge_enabled: true diff --git a/roles/homebridge/molecule/default/side_effect.yml b/roles/homebridge/molecule/default/side_effect.yml new file mode 100644 index 00000000..c8cf2044 --- /dev/null +++ b/roles/homebridge/molecule/default/side_effect.yml @@ -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 diff --git a/roles/homebridge/molecule/default/verify.yml b/roles/homebridge/molecule/default/verify.yml new file mode 100644 index 00000000..0fa3521c --- /dev/null +++ b/roles/homebridge/molecule/default/verify.yml @@ -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 diff --git a/roles/homebridge/molecule/default/verify_stopped.yml b/roles/homebridge/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..f5539057 --- /dev/null +++ b/roles/homebridge/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/homebridge/tasks/main.yml b/roles/homebridge/tasks/main.yml index 55f50fd6..2ac79111 100644 --- a/roles/homebridge/tasks/main.yml +++ b/roles/homebridge/tasks/main.yml @@ -1,32 +1,44 @@ --- -- name: Create Homebridge Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ homebridge_config_directory }}" +- name: Start Homebridge + block: + - name: Create Homebridge Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ homebridge_config_directory }}" -- name: Create Homebridge Docker Container - docker_container: - name: homebridge - image: oznu/homebridge - pull: true - volumes: - - "{{ homebridge_config_directory }}:/homebridge" - network_mode: "host" - env: - TZ: "{{ ansible_nas_timezone }}" - PGID: "{{ homebridge_group_id }}" - PUID: "{{ homebridge_user_id }}" - HOMEBRIDGE_CONFIG_UI: "1" - HOMEBRIDGE_CONFIG_UI_PORT: "{{ homebridge_port }}" - restart_policy: unless-stopped - memory: "{{ homebridge_memory }}" - labels: - traefik.enable: "{{ homebridge_available_externally | string }}" - traefik.http.routers.homebridge.rule: "Host(`{{ homebridge_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.homebridge.tls.certresolver: "letsencrypt" - 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" + - name: Create Homebridge Docker Container + 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" + network_mode: "host" + env: + TZ: "{{ ansible_nas_timezone }}" + PGID: "{{ homebridge_group_id }}" + PUID: "{{ homebridge_user_id }}" + HOMEBRIDGE_CONFIG_UI: "1" + HOMEBRIDGE_CONFIG_UI_PORT: "{{ homebridge_port }}" + restart_policy: unless-stopped + memory: "{{ homebridge_memory }}" + labels: + traefik.enable: "{{ homebridge_available_externally | string }}" + traefik.http.routers.homebridge.rule: "Host(`{{ homebridge_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.homebridge.tls.certresolver: "letsencrypt" + 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 diff --git a/roles/jackett/defaults/main.yml b/roles/jackett/defaults/main.yml index 5d87e721..a1cd3793 100644 --- a/roles/jackett/defaults/main.yml +++ b/roles/jackett/defaults/main.yml @@ -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" diff --git a/roles/jackett/docs/jackett.md b/roles/jackett/docs/jackett.md new file mode 100644 index 00000000..919d8daa --- /dev/null +++ b/roles/jackett/docs/jackett.md @@ -0,0 +1,11 @@ +# Jackett + +Homepage: + +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//nas.yml` file. + +The Jackett web interface can be found at . diff --git a/roles/jackett/molecule/default/molecule.yml b/roles/jackett/molecule/default/molecule.yml new file mode 100644 index 00000000..44642cb1 --- /dev/null +++ b/roles/jackett/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + jackett_enabled: true diff --git a/roles/jackett/molecule/default/side_effect.yml b/roles/jackett/molecule/default/side_effect.yml new file mode 100644 index 00000000..a83651bf --- /dev/null +++ b/roles/jackett/molecule/default/side_effect.yml @@ -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 diff --git a/roles/jackett/molecule/default/verify.yml b/roles/jackett/molecule/default/verify.yml new file mode 100644 index 00000000..387a850e --- /dev/null +++ b/roles/jackett/molecule/default/verify.yml @@ -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 diff --git a/roles/jackett/molecule/default/verify_stopped.yml b/roles/jackett/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..f5726052 --- /dev/null +++ b/roles/jackett/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/jackett/tasks/main.yml b/roles/jackett/tasks/main.yml index ed903613..bffc6121 100644 --- a/roles/jackett/tasks/main.yml +++ b/roles/jackett/tasks/main.yml @@ -1,29 +1,41 @@ --- -- name: Create jackett Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ jackett_data_directory }}" +- 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 - volumes: - - "{{ jackett_data_directory }}:/config:rw" - - "/etc/localtime:/etc/localtime:ro" - - "{{ jackett_torrents_root }}:/downloads" - ports: - - "{{ jackett_port }}:9117" - env: - TZ: "{{ ansible_nas_timezone }}" - restart_policy: unless-stopped - memory: "{{ jackett_memory }}" - labels: - traefik.enable: "{{ jackett_available_externally | string }}" - traefik.http.routers.jackett.rule: "Host(`{{ jackett_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.jackett.tls.certresolver: "letsencrypt" - 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" + - name: Jackett Docker Container + 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" + - "{{ jackett_torrents_root }}:/downloads" + ports: + - "{{ jackett_port }}:9117" + env: + TZ: "{{ ansible_nas_timezone }}" + restart_policy: unless-stopped + memory: "{{ jackett_memory }}" + labels: + traefik.enable: "{{ jackett_available_externally | string }}" + traefik.http.routers.jackett.rule: "Host(`{{ jackett_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.jackett.tls.certresolver: "letsencrypt" + 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 diff --git a/roles/jellyfin/defaults/main.yml b/roles/jellyfin/defaults/main.yml index 5306b788..49ec1a11 100644 --- a/roles/jellyfin/defaults/main.yml +++ b/roles/jellyfin/defaults/main.yml @@ -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" diff --git a/roles/jellyfin/docs/jellyfin.md b/roles/jellyfin/docs/jellyfin.md new file mode 100644 index 00000000..dfe89533 --- /dev/null +++ b/roles/jellyfin/docs/jellyfin.md @@ -0,0 +1,65 @@ +# Jellyfin + +Homepage: + +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//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. diff --git a/roles/jellyfin/molecule/default/molecule.yml b/roles/jellyfin/molecule/default/molecule.yml new file mode 100644 index 00000000..d376e663 --- /dev/null +++ b/roles/jellyfin/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + jellyfin_enabled: true diff --git a/roles/jellyfin/molecule/default/side_effect.yml b/roles/jellyfin/molecule/default/side_effect.yml new file mode 100644 index 00000000..a55b26c6 --- /dev/null +++ b/roles/jellyfin/molecule/default/side_effect.yml @@ -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 diff --git a/roles/jellyfin/molecule/default/verify.yml b/roles/jellyfin/molecule/default/verify.yml new file mode 100644 index 00000000..fa07a167 --- /dev/null +++ b/roles/jellyfin/molecule/default/verify.yml @@ -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 diff --git a/roles/jellyfin/molecule/default/verify_stopped.yml b/roles/jellyfin/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..18552ea8 --- /dev/null +++ b/roles/jellyfin/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/jellyfin/tasks/main.yml b/roles/jellyfin/tasks/main.yml index d7f7ae29..434b624b 100644 --- a/roles/jellyfin/tasks/main.yml +++ b/roles/jellyfin/tasks/main.yml @@ -1,37 +1,49 @@ --- -- name: Create Jellyfin Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ jellyfin_config_directory }}" +- name: Start jellyfin + block: + - name: Create Jellyfin Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ jellyfin_config_directory }}" -- name: Jellyfin Docker Container - docker_container: - name: jellyfin - image: linuxserver/jellyfin - pull: true - volumes: - - "{{ jellyfin_config_directory }}:/config:rw" - - "{{ jellyfin_movies_directory }}:/movies:{{ jellyfin_movies_permissions }}" - - "{{ jellyfin_music_directory }}:/music:{{ jellyfin_music_permissions }}" - - "{{ jellyfin_photos_directory }}:/photos:{{ jellyfin_photos_permissions }}" - - "{{ jellyfin_tv_directory }}:/tv:{{ jellyfin_tv_permissions }}" - - "{{ jellyfin_books_directory }}:/books:{{ jellyfin_books_permissions }}" - - "{{ jellyfin_audiobooks_directory }}:/audiobooks:{{ jellyfin_audiobooks_permissions }}" - ports: - - "{{ jellyfin_port_http }}:8096" - - "{{ jellyfin_port_https }}:8920" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ jellyfin_user_id }}" - PGID: "{{ jellyfin_group_id }}" - restart_policy: unless-stopped - memory: "{{ jellyfin_memory }}" - labels: - traefik.enable: "{{ jellyfin_available_externally | string }}" - traefik.http.routers.jellyfin.rule: "Host(`{{ jellyfin_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.jellyfin.tls.certresolver: "letsencrypt" - 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" + - name: Jellyfin Docker Container + 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" + - "{{ jellyfin_movies_directory }}:/movies:{{ jellyfin_movies_permissions }}" + - "{{ jellyfin_music_directory }}:/music:{{ jellyfin_music_permissions }}" + - "{{ jellyfin_photos_directory }}:/photos:{{ jellyfin_photos_permissions }}" + - "{{ jellyfin_tv_directory }}:/tv:{{ jellyfin_tv_permissions }}" + - "{{ jellyfin_books_directory }}:/books:{{ jellyfin_books_permissions }}" + - "{{ jellyfin_audiobooks_directory }}:/audiobooks:{{ jellyfin_audiobooks_permissions }}" + ports: + - "{{ jellyfin_port_http }}:8096" + - "{{ jellyfin_port_https }}:8920" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ jellyfin_user_id }}" + PGID: "{{ jellyfin_group_id }}" + restart_policy: unless-stopped + memory: "{{ jellyfin_memory }}" + labels: + traefik.enable: "{{ jellyfin_available_externally | string }}" + traefik.http.routers.jellyfin.rule: "Host(`{{ jellyfin_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.jellyfin.tls.certresolver: "letsencrypt" + 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 diff --git a/roles/joomla/defaults/main.yml b/roles/joomla/defaults/main.yml index cff8308a..87099632 100644 --- a/roles/joomla/defaults/main.yml +++ b/roles/joomla/defaults/main.yml @@ -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 diff --git a/roles/joomla/docs/joomla.md b/roles/joomla/docs/joomla.md new file mode 100644 index 00000000..e0ad95a4 --- /dev/null +++ b/roles/joomla/docs/joomla.md @@ -0,0 +1,23 @@ +# Joomla + +Homepage: + +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//nas.yml` file. + +If you want to access Joomla externally, set `joomla_available_externally: true` in your `inventories//nas.yml` file. + +The Joomla web interface can be found at . + +## 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`. diff --git a/roles/joomla/molecule/default/molecule.yml b/roles/joomla/molecule/default/molecule.yml new file mode 100644 index 00000000..498a06f6 --- /dev/null +++ b/roles/joomla/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + joomla_enabled: true diff --git a/roles/joomla/molecule/default/side_effect.yml b/roles/joomla/molecule/default/side_effect.yml new file mode 100644 index 00000000..ced35ccf --- /dev/null +++ b/roles/joomla/molecule/default/side_effect.yml @@ -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 diff --git a/roles/joomla/molecule/default/verify.yml b/roles/joomla/molecule/default/verify.yml new file mode 100644 index 00000000..728ea20c --- /dev/null +++ b/roles/joomla/molecule/default/verify.yml @@ -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 diff --git a/roles/joomla/molecule/default/verify_stopped.yml b/roles/joomla/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..601be521 --- /dev/null +++ b/roles/joomla/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/joomla/tasks/main.yml b/roles/joomla/tasks/main.yml index 61a82bc0..2dbcfe87 100644 --- a/roles/joomla/tasks/main.yml +++ b/roles/joomla/tasks/main.yml @@ -1,47 +1,72 @@ --- -- name: Create Joomla Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ joomla_data_directory }}" - - "{{ joomla_data_directory }}/db" +- name: Start Joomla + block: + - name: Create Joomla Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ joomla_data_directory }}" + - "{{ joomla_data_directory }}/db" -- name: MySQL Docker Container for Joomla - docker_container: - name: joomla_mysql - image: mysql:5.7 - pull: true - volumes: - - "{{ joomla_data_directory }}/db:/var/lib/mysql" - env: - MYSQL_DATABASE: "joomla" - MYSQL_USER: "joomla" - MYSQL_ROOT_PASSWORD: "{{ joomla_database_password }}" - restart_policy: unless-stopped - memory: 1g + - name: Create Joomla network + community.docker.docker_network: + name: "{{ joomla_network_name }}" -- name: Joomla Docker Container - docker_container: - name: joomla - image: joomla - pull: true - volumes: - - "{{ joomla_data_directory }}:/var/www/html:rw" - ports: - - "{{ joomla_port }}:80" - links: - - "joomla_mysql:mysql" - env: - JOOMLA_DB_HOST: "mysql" - JOOMLA_DB_USER: "root" - JOOMLA_DB_PASSWORD: "{{ joomla_database_password }}" - restart_policy: unless-stopped - memory: "{{ joomla_memory }}" - labels: - traefik.enable: "{{ joomla_available_externally | string }}" - traefik.http.routers.joomla.rule: "Host(`{{ joomla_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.joomla.tls.certresolver: "letsencrypt" - 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" + - name: MySQL Docker Container for Joomla + 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: + MYSQL_DATABASE: "joomla" + MYSQL_USER: "joomla" + MYSQL_ROOT_PASSWORD: "{{ joomla_database_password }}" + restart_policy: unless-stopped + memory: "{{ joomla_db_memory }}" + + - name: Joomla Docker Container + 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" + env: + JOOMLA_DB_HOST: "{{ joomla_db_container_name }}" + JOOMLA_DB_USER: "root" + JOOMLA_DB_PASSWORD: "{{ joomla_database_password }}" + restart_policy: unless-stopped + memory: "{{ joomla_memory }}" + labels: + traefik.enable: "{{ joomla_available_externally | string }}" + traefik.http.routers.joomla.rule: "Host(`{{ joomla_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.joomla.tls.certresolver: "letsencrypt" + 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 diff --git a/roles/komga/defaults/main.yml b/roles/komga/defaults/main.yml index 8a0ed1b7..a1b35f09 100644 --- a/roles/komga/defaults/main.yml +++ b/roles/komga/defaults/main.yml @@ -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" diff --git a/roles/komga/docs/komga.md b/roles/komga/docs/komga.md new file mode 100644 index 00000000..3c0b3c7d --- /dev/null +++ b/roles/komga/docs/komga.md @@ -0,0 +1,13 @@ +# Komga + +Homepage: + +Docker Image: + +Komga is a media server for your comics, mangas, BDs and magazines. + +## Usage + +Set `komga_enabled: true` in your `inventories//nas.yml` file. + +Access the webui at by default. diff --git a/roles/komga/molecule/default/molecule.yml b/roles/komga/molecule/default/molecule.yml new file mode 100644 index 00000000..8b6061b2 --- /dev/null +++ b/roles/komga/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + komga_enabled: true diff --git a/roles/komga/molecule/default/side_effect.yml b/roles/komga/molecule/default/side_effect.yml new file mode 100644 index 00000000..f923232d --- /dev/null +++ b/roles/komga/molecule/default/side_effect.yml @@ -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 diff --git a/roles/komga/molecule/default/verify.yml b/roles/komga/molecule/default/verify.yml new file mode 100644 index 00000000..aad4abe8 --- /dev/null +++ b/roles/komga/molecule/default/verify.yml @@ -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 diff --git a/roles/komga/molecule/default/verify_stopped.yml b/roles/komga/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..a601c796 --- /dev/null +++ b/roles/komga/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/komga/tasks/main.yml b/roles/komga/tasks/main.yml index 79758cd8..f5daa3b3 100644 --- a/roles/komga/tasks/main.yml +++ b/roles/komga/tasks/main.yml @@ -1,36 +1,48 @@ --- -- name: Create Komga Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ komga_data_directory }}" - - "{{ komga_data_directory }}/config" +- name: Start Komga + block: + - name: Create Komga Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ komga_data_directory }}" + - "{{ komga_data_directory }}/config" -- name: Komga Docker Container - docker_container: - name: komga - image: gotson/komga - pull: true - volumes: - - "{{ komga_comics_directory }}:/comics:ro" - - "{{ komga_books_directory }}:/books:ro" - - "{{ komga_data_directory }}:/data:rw" - - "{{ komga_data_directory }}/config:/config:rw" - network_mode: "bridge" - ports: - - "{{ komga_port_http }}:8080" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ komga_user_id }}" - PGID: "{{ komga_group_id }}" - restart_policy: unless-stopped - memory: "{{ komga_memory }}" - labels: - traefik.enable: "{{ komga_available_externally | string }}" - traefik.http.routers.komga.rule: "Host(`{{ komga_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.komga.tls.certresolver: "letsencrypt" - 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" + - name: Komga Docker Container + 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" + - "{{ komga_books_directory }}:/books:ro" + - "{{ komga_data_directory }}:/data:rw" + - "{{ komga_data_directory }}/config:/config:rw" + network_mode: "bridge" + ports: + - "{{ komga_port_http }}:8080" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ komga_user_id }}" + PGID: "{{ komga_group_id }}" + restart_policy: unless-stopped + memory: "{{ komga_memory }}" + labels: + traefik.enable: "{{ komga_available_externally | string }}" + traefik.http.routers.komga.rule: "Host(`{{ komga_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.komga.tls.certresolver: "letsencrypt" + 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 diff --git a/roles/krusader/defaults/main.yml b/roles/krusader/defaults/main.yml index 4f8a59c6..c68c4432 100644 --- a/roles/krusader/defaults/main.yml +++ b/roles/krusader/defaults/main.yml @@ -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 diff --git a/roles/krusader/docs/krusader.md b/roles/krusader/docs/krusader.md new file mode 100644 index 00000000..fc020a10 --- /dev/null +++ b/roles/krusader/docs/krusader.md @@ -0,0 +1,13 @@ +# Krusader + +Homepage: + +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//nas.yml` file. + +The Krusader web interface can be found at . diff --git a/roles/krusader/molecule/default/molecule.yml b/roles/krusader/molecule/default/molecule.yml new file mode 100644 index 00000000..8c716607 --- /dev/null +++ b/roles/krusader/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + krusader_enabled: true diff --git a/roles/krusader/molecule/default/side_effect.yml b/roles/krusader/molecule/default/side_effect.yml new file mode 100644 index 00000000..5f5a9c03 --- /dev/null +++ b/roles/krusader/molecule/default/side_effect.yml @@ -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 diff --git a/roles/krusader/molecule/default/verify.yml b/roles/krusader/molecule/default/verify.yml new file mode 100644 index 00000000..24b6cfb2 --- /dev/null +++ b/roles/krusader/molecule/default/verify.yml @@ -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 diff --git a/roles/krusader/molecule/default/verify_stopped.yml b/roles/krusader/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..081b85ad --- /dev/null +++ b/roles/krusader/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/krusader/tasks/main.yml b/roles/krusader/tasks/main.yml index d193dadd..2832fd38 100644 --- a/roles/krusader/tasks/main.yml +++ b/roles/krusader/tasks/main.yml @@ -1,34 +1,46 @@ --- -- name: Krusader Directory - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ krusader_config_directory }}/krusader" +- name: Start Krusader + block: + - name: Krusader Directory + 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 - pull: true - volumes: - - "{{ krusader_config_directory }}:/config:rw" - - "{{ krusader_browse_directory }}:/mnt/fs" - ports: - - "{{ krusader_port_http }}:5800" - - "{{ krusader_port_vnc }}:5900" - env: - USER_ID: "{{ krusader_user_id }}" - GROUP_ID: "{{ krusader_group_id }}" - SECURE_CONNECTION: "{{ krusader_secure_connection }}" - TZ: "{{ ansible_nas_timezone }}" - VNC_PASSWORD: "{{ krusader_vnc_password }}" - restart_policy: unless-stopped - memory: "{{ krusader_memory }}" - labels: - traefik.enable: "{{ krusader_available_externally }}" - traefik.http.routers.krusader.rule: "Host(`{{ krusader_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.krusader.tls.certresolver: "letsencrypt" - 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" + - name: Krusader Docker Container + 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" + - "{{ krusader_browse_directory }}:/mnt/fs" + ports: + - "{{ krusader_port_http }}:5800" + - "{{ krusader_port_vnc }}:5900" + env: + USER_ID: "{{ krusader_user_id }}" + GROUP_ID: "{{ krusader_group_id }}" + SECURE_CONNECTION: "{{ krusader_secure_connection }}" + TZ: "{{ ansible_nas_timezone }}" + VNC_PASSWORD: "{{ krusader_vnc_password }}" + restart_policy: unless-stopped + memory: "{{ krusader_memory }}" + labels: + traefik.enable: "{{ krusader_available_externally }}" + traefik.http.routers.krusader.rule: "Host(`{{ krusader_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.krusader.tls.certresolver: "letsencrypt" + 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 diff --git a/roles/lidarr/defaults/main.yml b/roles/lidarr/defaults/main.yml index ac89b710..7d65c8c2 100644 --- a/roles/lidarr/defaults/main.yml +++ b/roles/lidarr/defaults/main.yml @@ -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 diff --git a/roles/lidarr/docs/lidarr.md b/roles/lidarr/docs/lidarr.md new file mode 100644 index 00000000..39564454 --- /dev/null +++ b/roles/lidarr/docs/lidarr.md @@ -0,0 +1,9 @@ +# Lidarr + +Homepage: + +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//nas.yml` file. diff --git a/roles/lidarr/molecule/default/molecule.yml b/roles/lidarr/molecule/default/molecule.yml new file mode 100644 index 00000000..5881b498 --- /dev/null +++ b/roles/lidarr/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + lidarr_enabled: true diff --git a/roles/lidarr/molecule/default/side_effect.yml b/roles/lidarr/molecule/default/side_effect.yml new file mode 100644 index 00000000..9bca21b1 --- /dev/null +++ b/roles/lidarr/molecule/default/side_effect.yml @@ -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 diff --git a/roles/lidarr/molecule/default/verify.yml b/roles/lidarr/molecule/default/verify.yml new file mode 100644 index 00000000..02df6718 --- /dev/null +++ b/roles/lidarr/molecule/default/verify.yml @@ -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 diff --git a/roles/lidarr/molecule/default/verify_stopped.yml b/roles/lidarr/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..4fb70127 --- /dev/null +++ b/roles/lidarr/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/lidarr/tasks/main.yml b/roles/lidarr/tasks/main.yml index 8e6fa9ae..abfdccb2 100644 --- a/roles/lidarr/tasks/main.yml +++ b/roles/lidarr/tasks/main.yml @@ -1,30 +1,42 @@ --- -- name: Create Lidarr Directory - file: - path: "{{ lidarr_data_directory }}" - state: directory +- name: Start Lidarr + block: + - name: Create Lidarr Directory + ansible.builtin.file: + path: "{{ lidarr_data_directory }}" + state: directory -- name: Lidarr Docker Container - docker_container: - name: lidarr - image: linuxserver/lidarr - pull: true - volumes: - - "{{ lidarr_music_directory }}:/music:rw" - - "{{ lidarr_downloads_directory }}:/downloads:rw" - - "{{ lidarr_data_directory }}:/config:rw" - ports: - - "{{ lidarr_port }}:8686" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ lidarr_user_id }}" - PGID: "{{ lidarr_group_id }}" - restart_policy: unless-stopped - memory: "{{ lidarr_memory }}" - labels: - traefik.enable: "{{ lidarr_available_externally | string }}" - traefik.http.routers.lidarr.rule: "Host(`{{ lidarr_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.lidarr.tls.certresolver: "letsencrypt" - 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" + - name: Lidarr Docker Container + 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" + - "{{ lidarr_downloads_directory }}:/downloads:rw" + - "{{ lidarr_data_directory }}:/config:rw" + ports: + - "{{ lidarr_port }}:8686" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ lidarr_user_id }}" + PGID: "{{ lidarr_group_id }}" + restart_policy: unless-stopped + memory: "{{ lidarr_memory }}" + labels: + traefik.enable: "{{ lidarr_available_externally | string }}" + traefik.http.routers.lidarr.rule: "Host(`{{ lidarr_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.lidarr.tls.certresolver: "letsencrypt" + 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 diff --git a/roles/mealie/defaults/main.yml b/roles/mealie/defaults/main.yml index 9555a134..3a038c7e 100644 --- a/roles/mealie/defaults/main.yml +++ b/roles/mealie/defaults/main.yml @@ -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 diff --git a/roles/mealie/docs/mealie.md b/roles/mealie/docs/mealie.md new file mode 100644 index 00000000..6e6a1c26 --- /dev/null +++ b/roles/mealie/docs/mealie.md @@ -0,0 +1,11 @@ +# Mealie + +Homepage: + +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//nas.yml` file. + +The Mealie web interface can be found at . diff --git a/roles/mealie/molecule/default/molecule.yml b/roles/mealie/molecule/default/molecule.yml new file mode 100644 index 00000000..22adf926 --- /dev/null +++ b/roles/mealie/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + mealie_enabled: true diff --git a/roles/mealie/molecule/default/side_effect.yml b/roles/mealie/molecule/default/side_effect.yml new file mode 100644 index 00000000..53a89e50 --- /dev/null +++ b/roles/mealie/molecule/default/side_effect.yml @@ -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 diff --git a/roles/mealie/molecule/default/verify.yml b/roles/mealie/molecule/default/verify.yml new file mode 100644 index 00000000..ae2c3603 --- /dev/null +++ b/roles/mealie/molecule/default/verify.yml @@ -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 diff --git a/roles/mealie/molecule/default/verify_stopped.yml b/roles/mealie/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..1d1abad0 --- /dev/null +++ b/roles/mealie/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/mealie/tasks/main.yml b/roles/mealie/tasks/main.yml index b480eafa..9978441c 100644 --- a/roles/mealie/tasks/main.yml +++ b/roles/mealie/tasks/main.yml @@ -1,37 +1,50 @@ --- -- name: Create Mealie Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ mealie_data_directory }}/data" +- name: Start Mealie + block: + - name: Create Mealie Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ mealie_data_directory }}/data" + + - name: Mealie Docker Container + 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" + ports: + - "{{ mealie_port }}:80" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ mealie_user_id }}" + PGID: "{{ mealie_group_id }}" + RECIPE_PUBLIC: "true" + RECIPE_SHOW_NUTRITION: "true" + RECIPE_SHOW_ASSETS: "true" + RECIPE_LANDSCAPE_VIEW: "true" + RECIPE_DISABLE_COMMENTS: "false" + RECIPE_DISABLE_AMOUNT: "false" + BASE_URL: "{{ ansible_nas_domain }}:{{ mealie_port }}" + restart_policy: unless-stopped + memory: "{{ mealie_memory }}" + labels: + traefik.enable: "{{ mealie_available_externally | string }}" + traefik.http.routers.mealie.rule: "Host(`{{ mealie_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.mealie.tls.certresolver: "letsencrypt" + 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 -- name: Mealie Docker Container - docker_container: - name: mealie - image: hkotel/mealie:latest - pull: true - volumes: - - "{{ mealie_data_directory }}:/app/data:rw" - ports: - - "{{ mealie_port }}:80" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ mealie_user_id }}" - PGID: "{{ mealie_group_id }}" - RECIPE_PUBLIC: "true" - RECIPE_SHOW_NUTRITION: "true" - RECIPE_SHOW_ASSETS: "true" - RECIPE_LANDSCAPE_VIEW: "true" - RECIPE_DISABLE_COMMENTS: "false" - RECIPE_DISABLE_AMOUNT: "false" - BASE_URL: "{{ ansible_nas_domain }}:{{ mealie_port }}" - restart_policy: unless-stopped - memory: "{{ mealie_memory }}" - labels: - traefik.enable: "{{ mealie_available_externally | string }}" - traefik.http.routers.mealie.rule: "Host(`{{ mealie_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.mealie.tls.certresolver: "letsencrypt" - 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" diff --git a/roles/minecraft-server/defaults/main.yml b/roles/minecraft-server/defaults/main.yml index 4fee052b..6f29ebaf 100644 --- a/roles/minecraft-server/defaults/main.yml +++ b/roles/minecraft-server/defaults/main.yml @@ -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" diff --git a/roles/minecraft-server/docs/minecraft-server.md b/roles/minecraft-server/docs/minecraft-server.md new file mode 100644 index 00000000..e2ac52f8 --- /dev/null +++ b/roles/minecraft-server/docs/minecraft-server.md @@ -0,0 +1,13 @@ +# Minecraft Server + +Homepage: + +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//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. diff --git a/roles/minecraft-server/molecule/default/molecule.yml b/roles/minecraft-server/molecule/default/molecule.yml new file mode 100644 index 00000000..b1b89a83 --- /dev/null +++ b/roles/minecraft-server/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + minecraft_server_enabled: true diff --git a/roles/minecraft-server/molecule/default/side_effect.yml b/roles/minecraft-server/molecule/default/side_effect.yml new file mode 100644 index 00000000..e098c995 --- /dev/null +++ b/roles/minecraft-server/molecule/default/side_effect.yml @@ -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 diff --git a/roles/minecraft-server/molecule/default/verify.yml b/roles/minecraft-server/molecule/default/verify.yml new file mode 100644 index 00000000..5a145c44 --- /dev/null +++ b/roles/minecraft-server/molecule/default/verify.yml @@ -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 diff --git a/roles/minecraft-server/molecule/default/verify_stopped.yml b/roles/minecraft-server/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..f8956727 --- /dev/null +++ b/roles/minecraft-server/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/minecraft-server/tasks/main.yml b/roles/minecraft-server/tasks/main.yml index b3d721fb..a7be6228 100644 --- a/roles/minecraft-server/tasks/main.yml +++ b/roles/minecraft-server/tasks/main.yml @@ -1,20 +1,32 @@ --- -- name: Create Minecraft Server Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ minecraft_server_data_directory }}" +- name: Start Minecraft Server + block: + - name: Create Minecraft Server Directories + 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 - pull: true - volumes: - - "{{ minecraft_server_data_directory }}:/data:rw" - ports: - - "{{ minecraft_server_port }}:25565" - env: - EULA: "TRUE" - restart_policy: unless-stopped + - name: Minecraft Server Docker Container + 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" + ports: + - "{{ minecraft_server_port }}:25565" + 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 diff --git a/roles/minidlna/defaults/main.yml b/roles/minidlna/defaults/main.yml index fa29e4cf..4fe223f8 100644 --- a/roles/minidlna/defaults/main.yml +++ b/roles/minidlna/defaults/main.yml @@ -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" diff --git a/roles/minidlna/docs/minidlna.md b/roles/minidlna/docs/minidlna.md new file mode 100644 index 00000000..1f030d3d --- /dev/null +++ b/roles/minidlna/docs/minidlna.md @@ -0,0 +1,11 @@ +# MiniDLNA + +Homepage: + +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//nas.yml` file. + +The very basic MiniDLNA web interface can be found at . diff --git a/roles/minidlna/molecule/default/molecule.yml b/roles/minidlna/molecule/default/molecule.yml new file mode 100644 index 00000000..45dcbcbf --- /dev/null +++ b/roles/minidlna/molecule/default/molecule.yml @@ -0,0 +1,7 @@ +--- +provisioner: + inventory: + group_vars: + all: + minidlna_enabled: true + ansible_nas_hostname: ansible-nas diff --git a/roles/minidlna/molecule/default/side_effect.yml b/roles/minidlna/molecule/default/side_effect.yml new file mode 100644 index 00000000..8aa2b5ba --- /dev/null +++ b/roles/minidlna/molecule/default/side_effect.yml @@ -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 diff --git a/roles/minidlna/molecule/default/verify.yml b/roles/minidlna/molecule/default/verify.yml new file mode 100644 index 00000000..7cad6a8c --- /dev/null +++ b/roles/minidlna/molecule/default/verify.yml @@ -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 diff --git a/roles/minidlna/molecule/default/verify_stopped.yml b/roles/minidlna/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..cb144af7 --- /dev/null +++ b/roles/minidlna/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/minidlna/tasks/main.yml b/roles/minidlna/tasks/main.yml index 8feb8ebd..513c9696 100644 --- a/roles/minidlna/tasks/main.yml +++ b/roles/minidlna/tasks/main.yml @@ -1,17 +1,29 @@ --- -- name: MiniDLNA Docker Container - docker_container: - name: minidlna - image: vladgh/minidlna - pull: true - volumes: - - "{{ minidlna_media_directory1 }}:/media1:rw" - - "{{ minidlna_media_directory2 }}:/media2:rw" - env: - MINIDLNA_MEDIA_DIR1: "/media1" - MINIDLNA_MEDIA_DIR2: "/media2" - MINIDLNA_FRIENDLY_NAME: "{{ minidlna_friendly_name }}" - MINIDLNA_PORT: "{{ minidlna_port }}" - restart_policy: unless-stopped - network_mode: host - memory: "{{ minidlna_memory }}" +- name: Start MiniDLNA + block: + - name: MiniDLNA Docker Container + 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" + - "{{ minidlna_media_directory2 }}:/media2:rw" + env: + MINIDLNA_MEDIA_DIR1: "/media1" + MINIDLNA_MEDIA_DIR2: "/media2" + MINIDLNA_FRIENDLY_NAME: "{{ minidlna_friendly_name }}" + MINIDLNA_PORT: "{{ minidlna_port }}" + 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 diff --git a/roles/miniflux/defaults/main.yml b/roles/miniflux/defaults/main.yml index 40a3caa6..010223fd 100644 --- a/roles/miniflux/defaults/main.yml +++ b/roles/miniflux/defaults/main.yml @@ -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" diff --git a/roles/miniflux/docs/miniflux.md b/roles/miniflux/docs/miniflux.md new file mode 100644 index 00000000..92890158 --- /dev/null +++ b/roles/miniflux/docs/miniflux.md @@ -0,0 +1,15 @@ +# Miniflux + +Homepage: + +Miniflux is a minimalist and opinionated feed reader. + +## Usage + +Set `miniflux_enabled: true` in your `inventories//nas.yml` file. + +The Miniflux web interface can be found at , 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`. diff --git a/roles/miniflux/molecule/default/molecule.yml b/roles/miniflux/molecule/default/molecule.yml new file mode 100644 index 00000000..281aaf2a --- /dev/null +++ b/roles/miniflux/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + miniflux_enabled: true diff --git a/roles/miniflux/molecule/default/side_effect.yml b/roles/miniflux/molecule/default/side_effect.yml new file mode 100644 index 00000000..2f1a23d1 --- /dev/null +++ b/roles/miniflux/molecule/default/side_effect.yml @@ -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 diff --git a/roles/miniflux/molecule/default/verify.yml b/roles/miniflux/molecule/default/verify.yml new file mode 100644 index 00000000..89bb48fd --- /dev/null +++ b/roles/miniflux/molecule/default/verify.yml @@ -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 diff --git a/roles/miniflux/molecule/default/verify_stopped.yml b/roles/miniflux/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..05382c5d --- /dev/null +++ b/roles/miniflux/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/miniflux/tasks/main.yml b/roles/miniflux/tasks/main.yml index 969f3585..664813df 100644 --- a/roles/miniflux/tasks/main.yml +++ b/roles/miniflux/tasks/main.yml @@ -1,45 +1,58 @@ --- -- name: Create Miniflux Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ miniflux_data_directory }}/postgres" +- name: Start Miniflux + block: + - name: Create Miniflux Directories + 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 - pull: true - volumes: - - "{{ miniflux_data_directory }}/postgres:/var/lib/postgresql/data:rw" - env: - POSTGRES_USER: "miniflux" - POSTGRES_PASSWORD: "supersecure" - restart_policy: unless-stopped - memory: "{{ miniflux_postgres_memory }}" + - name: Create Postgres for Miniflux + 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" + env: + POSTGRES_USER: "miniflux" + POSTGRES_PASSWORD: "supersecure" + restart_policy: unless-stopped + memory: "{{ miniflux_postgres_memory }}" -- name: Create Miniflux Docker Container - docker_container: - name: miniflux - image: miniflux/miniflux:latest - pull: true - links: - - miniflux-postgres:db - ports: - - "{{ miniflux_port }}:8080" - env: - DATABASE_URL: "postgres://miniflux:supersecure@db/miniflux?sslmode=disable" - RUN_MIGRATIONS: "1" - CREATE_ADMIN: "1" - ADMIN_USERNAME: "{{ miniflux_admin_username }}" - ADMIN_PASSWORD: "{{ miniflux_admin_password }}" - restart_policy: unless-stopped - memory: "{{ miniflux_memory }}" - labels: - traefik.enable: "{{ miniflux_available_externally | string }}" - traefik.http.routers.miniflux.rule: "Host(`{{ miniflux_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.miniflux.tls.certresolver: "letsencrypt" - 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" + - name: Create Miniflux Docker Container + 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 + ports: + - "{{ miniflux_port }}:8080" + env: + DATABASE_URL: "postgres://miniflux:supersecure@db/miniflux?sslmode=disable" + RUN_MIGRATIONS: "1" + CREATE_ADMIN: "1" + ADMIN_USERNAME: "{{ miniflux_admin_username }}" + ADMIN_PASSWORD: "{{ miniflux_admin_password }}" + restart_policy: unless-stopped + memory: "{{ miniflux_memory }}" + labels: + traefik.enable: "{{ miniflux_available_externally | string }}" + traefik.http.routers.miniflux.rule: "Host(`{{ miniflux_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.miniflux.tls.certresolver: "letsencrypt" + 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 diff --git a/roles/mosquitto/defaults/main.yml b/roles/mosquitto/defaults/main.yml index f1aa88a6..0060d18a 100644 --- a/roles/mosquitto/defaults/main.yml +++ b/roles/mosquitto/defaults/main.yml @@ -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 diff --git a/roles/mosquitto/docs/mosquitto.md b/roles/mosquitto/docs/mosquitto.md new file mode 100644 index 00000000..4015613e --- /dev/null +++ b/roles/mosquitto/docs/mosquitto.md @@ -0,0 +1,9 @@ +# Mosquitto + +Homepage: + +Mosquitto is a lightweight open source MQTT message broker. + +## Usage + +Set `mosquitto_enabled: true` in your `inventories//nas.yml` file. diff --git a/roles/mosquitto/molecule/default/molecule.yml b/roles/mosquitto/molecule/default/molecule.yml new file mode 100644 index 00000000..0cbf69e3 --- /dev/null +++ b/roles/mosquitto/molecule/default/molecule.yml @@ -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 diff --git a/roles/mosquitto/molecule/default/side_effect.yml b/roles/mosquitto/molecule/default/side_effect.yml new file mode 100644 index 00000000..5b4097e6 --- /dev/null +++ b/roles/mosquitto/molecule/default/side_effect.yml @@ -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 diff --git a/roles/mosquitto/molecule/default/verify.yml b/roles/mosquitto/molecule/default/verify.yml new file mode 100644 index 00000000..0656648d --- /dev/null +++ b/roles/mosquitto/molecule/default/verify.yml @@ -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 diff --git a/roles/mosquitto/molecule/default/verify_stopped.yml b/roles/mosquitto/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..f7e040cc --- /dev/null +++ b/roles/mosquitto/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/mosquitto/tasks/main.yml b/roles/mosquitto/tasks/main.yml index aa787c77..94421845 100644 --- a/roles/mosquitto/tasks/main.yml +++ b/roles/mosquitto/tasks/main.yml @@ -1,31 +1,43 @@ --- -- name: Create Mosquitto Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ mosquitto_data_directory }}/config" - - "{{ mosquitto_data_directory }}/data" - - "{{ mosquitto_data_directory }}/log" +- name: Start Mosquitto + block: + - name: Create Mosquitto Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ mosquitto_data_directory }}/config" + - "{{ mosquitto_data_directory }}/data" + - "{{ mosquitto_data_directory }}/log" -- name: Template mosquitto.conf - copy: - src: mosquitto.conf - dest: "{{ mosquitto_data_directory }}/config/mosquitto.conf" - register: mosquitto_conf + - name: Template mosquitto.conf + 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 - pull: true - volumes: - - "{{ mosquitto_data_directory }}/config/mosquitto.conf:/mosquitto/config/mosquitto.conf:rw" - - "{{ mosquitto_data_directory }}/data:/mosquitto/data:rw" - - "{{ mosquitto_data_directory }}/log:/mosquitto/log:rw" - ports: - - "{{ mosquitto_port_a }}:1883" - - "{{ mosquitto_port_b }}:9001" - restart_policy: unless-stopped - restart: "{{ mosquitto_conf is changed }}" - memory: 1g + - name: Create Mosquitto container + 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" + - "{{ mosquitto_data_directory }}/data:/mosquitto/data:rw" + - "{{ mosquitto_data_directory }}/log:/mosquitto/log:rw" + ports: + - "{{ mosquitto_port_a }}:1883" + - "{{ mosquitto_port_b }}:9001" + 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 diff --git a/roles/mylar/defaults/main.yml b/roles/mylar/defaults/main.yml index ad073aac..f91212e2 100644 --- a/roles/mylar/defaults/main.yml +++ b/roles/mylar/defaults/main.yml @@ -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" diff --git a/roles/mylar/docs/mylar.md b/roles/mylar/docs/mylar.md new file mode 100644 index 00000000..0ddf2e91 --- /dev/null +++ b/roles/mylar/docs/mylar.md @@ -0,0 +1,15 @@ +# Mylar + +Homepage: + +Docker Container: + +An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents + +## Usage + +Set `mylar_enabled: true` in your `inventories//nas.yml` file. + +If you want to access Mylar externally, don't forget to set `mylar_available_externally: true` in your `inventories//nas.yml` file. + +The Mylar web interface can be found at . diff --git a/roles/mylar/molecule/default/molecule.yml b/roles/mylar/molecule/default/molecule.yml new file mode 100644 index 00000000..8eb0e567 --- /dev/null +++ b/roles/mylar/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + mylar_enabled: true diff --git a/roles/mylar/molecule/default/side_effect.yml b/roles/mylar/molecule/default/side_effect.yml new file mode 100644 index 00000000..bf19034e --- /dev/null +++ b/roles/mylar/molecule/default/side_effect.yml @@ -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 diff --git a/roles/mylar/molecule/default/verify.yml b/roles/mylar/molecule/default/verify.yml new file mode 100644 index 00000000..fb17cd41 --- /dev/null +++ b/roles/mylar/molecule/default/verify.yml @@ -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 diff --git a/roles/mylar/molecule/default/verify_stopped.yml b/roles/mylar/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..8d3cf8a7 --- /dev/null +++ b/roles/mylar/molecule/default/verify_stopped.yml @@ -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 diff --git a/roles/mylar/tasks/main.yml b/roles/mylar/tasks/main.yml index c7e1e240..16d4f97d 100644 --- a/roles/mylar/tasks/main.yml +++ b/roles/mylar/tasks/main.yml @@ -1,34 +1,46 @@ --- -- name: Create Mylar Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ mylar_data_directory }}/config" +- name: Start Mylar + block: + - name: Create Mylar Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ mylar_data_directory }}/config" -- name: Mylar Docker Container - docker_container: - name: mylar - image: linuxserver/mylar - pull: true - volumes: - - "{{ mylar_comics_directory }}:/comics:rw" - - "{{ mylar_downloads_directory }}:/downloads:rw" - - "{{ mylar_data_directory }}/config:/config:rw" - network_mode: "bridge" - ports: - - "{{ mylar_port_http }}:8090" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ mylar_user_id }}" - PGID: "{{ mylar_group_id }}" - restart_policy: unless-stopped - memory: "{{ mylar_memory }}" - labels: - traefik.enable: "{{ mylar_available_externally | string }}" - traefik.http.routers.mylar.rule: "Host(`{{ mylar_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.mylar.tls.certresolver: "letsencrypt" - 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" + - name: Mylar Docker Container + 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" + - "{{ mylar_downloads_directory }}:/downloads:rw" + - "{{ mylar_data_directory }}/config:/config:rw" + network_mode: "bridge" + ports: + - "{{ mylar_port_http }}:8090" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ mylar_user_id }}" + PGID: "{{ mylar_group_id }}" + restart_policy: unless-stopped + memory: "{{ mylar_memory }}" + labels: + traefik.enable: "{{ mylar_available_externally | string }}" + traefik.http.routers.mylar.rule: "Host(`{{ mylar_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.mylar.tls.certresolver: "letsencrypt" + 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 diff --git a/roles/mymediaforalexa/defaults/main.yml b/roles/mymediaforalexa/defaults/main.yml index 048b4010..f95a7ec0 100644 --- a/roles/mymediaforalexa/defaults/main.yml +++ b/roles/mymediaforalexa/defaults/main.yml @@ -6,5 +6,10 @@ mymediaforalexa_enabled: false mymediaforalexa_media_directory: "{{ music_root }}" mymediaforalexa_data_directory: "{{ docker_home }}/mymediaforalexa" +# docker +mymediaforalexa_container_name: "mymediaforalexa" +mymediaforalexa_image_name: "bizmodeller/mymediaforalexa" +mymediaforalexa_image_version: "latest" + # specs mymediaforalexa_memory: "1g" diff --git a/roles/mymediaforalexa/docs/mymediaforalexa.md b/roles/mymediaforalexa/docs/mymediaforalexa.md new file mode 100644 index 00000000..174f19d7 --- /dev/null +++ b/roles/mymediaforalexa/docs/mymediaforalexa.md @@ -0,0 +1,11 @@ +# My Media for Alexa + +Homepage: + +My Media lets you stream your music collection to your Amazon Echo or Amazon Dot without having to upload all your music collection to the Cloud. This keeps your music under your control. + +## Usage + +Set `mymediaforalexa_enabled: true` in your `inventories//nas.yml` file. + +The My Media for Alexa web interface can be found at . diff --git a/roles/mymediaforalexa/molecule/default/molecule.yml b/roles/mymediaforalexa/molecule/default/molecule.yml new file mode 100644 index 00000000..da34cf39 --- /dev/null +++ b/roles/mymediaforalexa/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + mymediaforalexa_enabled: true diff --git a/roles/mymediaforalexa/molecule/default/side_effect.yml b/roles/mymediaforalexa/molecule/default/side_effect.yml new file mode 100644 index 00000000..c08d3232 --- /dev/null +++ b/roles/mymediaforalexa/molecule/default/side_effect.yml @@ -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: + mymediaforalexa_enabled: false diff --git a/roles/mymediaforalexa/molecule/default/verify.yml b/roles/mymediaforalexa/molecule/default/verify.yml new file mode 100644 index 00000000..c9a5e4bd --- /dev/null +++ b/roles/mymediaforalexa/molecule/default/verify.yml @@ -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 mymediaforalexa container state + community.docker.docker_container: + name: "{{ mymediaforalexa_container_name }}" + register: result + + - name: Check if mymediaforalexa containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/mymediaforalexa/molecule/default/verify_stopped.yml b/roles/mymediaforalexa/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..6d26c297 --- /dev/null +++ b/roles/mymediaforalexa/molecule/default/verify_stopped.yml @@ -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 mymediaforalexa + community.docker.docker_container: + name: "{{ mymediaforalexa_container_name }}" + state: absent + register: result + + - name: Check if mymediaforalexa is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/mymediaforalexa/tasks/main.yml b/roles/mymediaforalexa/tasks/main.yml index 4c2264d7..540e6aba 100644 --- a/roles/mymediaforalexa/tasks/main.yml +++ b/roles/mymediaforalexa/tasks/main.yml @@ -1,20 +1,32 @@ --- -- name: Create Mymediaforalexa Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ mymediaforalexa_media_directory }}" - - "{{ mymediaforalexa_data_directory }}" +- name: Start Mymediaforalexa + block: + - name: Create Mymediaforalexa Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ mymediaforalexa_media_directory }}" + - "{{ mymediaforalexa_data_directory }}" -- name: Mymediaforalexa Docker Container - docker_container: - name: mymediaforalexa - image: bizmodeller/mymediaforalexa - pull: true - volumes: - - "{{ mymediaforalexa_media_directory }}:/medialibrary:rw" - - "{{ mymediaforalexa_data_directory }}:/datadir:rw" - network_mode: host - restart_policy: unless-stopped - memory: "{{ mymediaforalexa_memory }}" + - name: Mymediaforalexa Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ mymediaforalexa_container_name }}" + image: "{{ mymediaforalexa_image_name }}:{{ mymediaforalexa_image_version }}" + pull: true + volumes: + - "{{ mymediaforalexa_media_directory }}:/medialibrary:rw" + - "{{ mymediaforalexa_data_directory }}:/datadir:rw" + network_mode: host + restart_policy: unless-stopped + memory: "{{ mymediaforalexa_memory }}" + when: mymediaforalexa_enabled is true + +- name: Stop Mymediaforalexa + block: + - name: Stop Mymediaforalexa + community.docker.docker_container: + name: "{{ mymediaforalexa_container_name }}" + state: absent + when: mymediaforalexa_enabled is false diff --git a/roles/n8n/defaults/main.yml b/roles/n8n/defaults/main.yml index eec83925..aebb7fa1 100644 --- a/roles/n8n/defaults/main.yml +++ b/roles/n8n/defaults/main.yml @@ -13,5 +13,10 @@ n8n_data_directory: "{{ docker_home }}/n8n" n8n_basic_auth_user: "n8n_user" n8n_basic_auth_password: "n8n_change_me" +# docker +n8n_container_name: "n8n" +n8n_image_name: "n8nio/n8n" +n8n_image_version: "latest" + # specs n8n_memory: 1g diff --git a/roles/n8n/docs/n8n.md b/roles/n8n/docs/n8n.md new file mode 100644 index 00000000..5f531246 --- /dev/null +++ b/roles/n8n/docs/n8n.md @@ -0,0 +1,18 @@ +# Nodemation (n8n) + +Homepage: + +Extendable workflow automation tool that enables you to connect anything to everything. More pragrmatically, it helps you interconnect API with each other to build your own information / work flows. + +## Usage + +Set `n8n_enabled: true` in your `inventories//nas.yml` file. + +n8n is secured by default, he user and password can be set with: + +```yaml + n8n_basic_auth_user: "" + n8n_basic_auth_password: "" +``` + +The default for these is "n8n_user" and "n8n_change_me" respectively, it is recommended to change these. diff --git a/roles/n8n/molecule/default/molecule.yml b/roles/n8n/molecule/default/molecule.yml new file mode 100644 index 00000000..3ae3f608 --- /dev/null +++ b/roles/n8n/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + n8n_enabled: true diff --git a/roles/n8n/molecule/default/side_effect.yml b/roles/n8n/molecule/default/side_effect.yml new file mode 100644 index 00000000..5e5f2fb2 --- /dev/null +++ b/roles/n8n/molecule/default/side_effect.yml @@ -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: + n8n_enabled: false diff --git a/roles/n8n/molecule/default/verify.yml b/roles/n8n/molecule/default/verify.yml new file mode 100644 index 00000000..3ea8d266 --- /dev/null +++ b/roles/n8n/molecule/default/verify.yml @@ -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 n8n container state + community.docker.docker_container: + name: "{{ n8n_container_name }}" + register: result + + - name: Check if n8n containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/n8n/molecule/default/verify_stopped.yml b/roles/n8n/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..e6081311 --- /dev/null +++ b/roles/n8n/molecule/default/verify_stopped.yml @@ -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 n8n + community.docker.docker_container: + name: "{{ n8n_container_name }}" + state: absent + register: result + + - name: Check if n8n is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/n8n/tasks/main.yml b/roles/n8n/tasks/main.yml index 8d6fd8a2..f2b59ca0 100644 --- a/roles/n8n/tasks/main.yml +++ b/roles/n8n/tasks/main.yml @@ -1,31 +1,43 @@ --- -- name: Create n8n Directory - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ n8n_data_directory }}" +- name: Start n8n + block: + - name: Create n8n Directory + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ n8n_data_directory }}" -- name: Create 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: "{{ n8n_memory }}" - 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 | string }}" - 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.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.n8n.loadbalancer.server.port: "5678" + - name: Create n8n Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ n8n_container_name }}" + image: "{{ n8n_image_name }}:{{ n8n_image_version }}" + pull: true + ports: + - "{{ n8n_port }}:5678" + volumes: + - "{{ n8n_data_directory }}:/home/node/.n8n:rw" + - "/etc/timezone:/etc/timezone:ro" + restart_policy: unless-stopped + memory: "{{ n8n_memory }}" + 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 | string }}" + 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.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.n8n.loadbalancer.server.port: "5678" + when: n8n_enabled is true + +- name: Stop n8n + block: + - name: Stop n8n + community.docker.docker_container: + name: "{{ n8n_container_name }}" + state: absent + when: n8n_enabled is false diff --git a/roles/navidrome/defaults/main.yml b/roles/navidrome/defaults/main.yml index a5c894a8..9bb81403 100644 --- a/roles/navidrome/defaults/main.yml +++ b/roles/navidrome/defaults/main.yml @@ -10,6 +10,11 @@ navidrome_music_directory: "{{ music_root }}" navidrome_port: "4533" navidrome_hostname: "navidrome" +# docker +navidrome_container_name: "navidrome" +navidrome_image_name: "deluan/navidrome" +navidrome_image_version: "latest" + # specs navidrome_memory: 1g diff --git a/roles/navidrome/docs/navidrome.md b/roles/navidrome/docs/navidrome.md new file mode 100644 index 00000000..bd8bb180 --- /dev/null +++ b/roles/navidrome/docs/navidrome.md @@ -0,0 +1,11 @@ +# Navidrome + +Homepage: + +Navidrome is an open source web-based music collection server and streamer that is compatible with Subsonic/Airsonic. It gives you freedom to listen to your music collection from any browser or mobile device. It's like your personal Spotify! + +## Usage + +Set `navidrome_enabled: true` in your `inventories//nas.yml` file. + +The Navidrome web interface can be found at . diff --git a/roles/navidrome/molecule/default/molecule.yml b/roles/navidrome/molecule/default/molecule.yml new file mode 100644 index 00000000..0b83fc56 --- /dev/null +++ b/roles/navidrome/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + navidrome_enabled: true diff --git a/roles/navidrome/molecule/default/side_effect.yml b/roles/navidrome/molecule/default/side_effect.yml new file mode 100644 index 00000000..302d634f --- /dev/null +++ b/roles/navidrome/molecule/default/side_effect.yml @@ -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: + navidrome_enabled: false diff --git a/roles/navidrome/molecule/default/verify.yml b/roles/navidrome/molecule/default/verify.yml new file mode 100644 index 00000000..e791e779 --- /dev/null +++ b/roles/navidrome/molecule/default/verify.yml @@ -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 navidrome container state + community.docker.docker_container: + name: "{{ navidrome_container_name }}" + register: result + + - name: Check if navidrome containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/navidrome/molecule/default/verify_stopped.yml b/roles/navidrome/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..b26f69ba --- /dev/null +++ b/roles/navidrome/molecule/default/verify_stopped.yml @@ -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 navidrome + community.docker.docker_container: + name: "{{ navidrome_container_name }}" + state: absent + register: result + + - name: Check if navidrome is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/navidrome/tasks/main.yml b/roles/navidrome/tasks/main.yml index 9913c807..c4a8e92e 100644 --- a/roles/navidrome/tasks/main.yml +++ b/roles/navidrome/tasks/main.yml @@ -1,35 +1,47 @@ --- -- name: Create Navidrome Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ navidrome_data_directory }}/data" - - "{{ navidrome_data_directory }}/playlists" +- name: Start Navidrome + block: + - name: Create Navidrome Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ navidrome_data_directory }}/data" + - "{{ navidrome_data_directory }}/playlists" -- name: Navidrome Docker Container - docker_container: - name: navidrome - image: deluan/navidrome:latest - pull: true - volumes: - - "{{ navidrome_data_directory }}/data:/navidrome/data:rw" - - "{{ navidrome_music_directory }}:/navidrome/music:rw" - ports: - - "{{ navidrome_port }}:4533" - env: - ND_MUSICFOLDER: "/navidrome/music" - ND_DATAFOLDER: "/navidrome/data" - ND_SCANSCHEDULE: "{{ navidrome_scan_schedule }}" - ND_LOGLEVEL: "{{ navidrome_log_level }}" - ND_SESSIONTIMEOUT: "{{ navidrome_session_timeout }}" - restart_policy: unless-stopped - memory: "{{ navidrome_memory }}" - labels: - traefik.enable: "{{ navidrome_available_externally | string }}" - traefik.http.routers.navidrome.rule: "Host(`{{ navidrome_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.navidrome.tls.certresolver: "letsencrypt" - traefik.http.routers.navidrome.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.navidrome.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.navidrome.loadbalancer.server.port: "4533" + - name: Navidrome Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ navidrome_container_name }}" + image: "{{ navidrome_image_name }}:{{ navidrome_image_version }}" + pull: true + volumes: + - "{{ navidrome_data_directory }}/data:/navidrome/data:rw" + - "{{ navidrome_music_directory }}:/navidrome/music:rw" + ports: + - "{{ navidrome_port }}:4533" + env: + ND_MUSICFOLDER: "/navidrome/music" + ND_DATAFOLDER: "/navidrome/data" + ND_SCANSCHEDULE: "{{ navidrome_scan_schedule }}" + ND_LOGLEVEL: "{{ navidrome_log_level }}" + ND_SESSIONTIMEOUT: "{{ navidrome_session_timeout }}" + restart_policy: unless-stopped + memory: "{{ navidrome_memory }}" + labels: + traefik.enable: "{{ navidrome_available_externally | string }}" + traefik.http.routers.navidrome.rule: "Host(`{{ navidrome_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.navidrome.tls.certresolver: "letsencrypt" + traefik.http.routers.navidrome.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.navidrome.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.navidrome.loadbalancer.server.port: "4533" + when: navidrome_enabled is true + +- name: Stop Navidrome + block: + - name: Stop Navidrome + community.docker.docker_container: + name: "{{ navidrome_container_name }}" + state: absent + when: navidrome_enabled is false diff --git a/roles/netbootxyz/defaults/main.yml b/roles/netbootxyz/defaults/main.yml index d07a21bb..9664eacd 100644 --- a/roles/netbootxyz/defaults/main.yml +++ b/roles/netbootxyz/defaults/main.yml @@ -12,7 +12,10 @@ netbootxyz_port_http: "3002" netbootxyz_port_http2: "5803" netbootxyz_port_tftp: "69" -# uid/gid +# docker +netbootxyz_container_name: "netbootxyz" +netbootxyz_image_name: "linuxserver/netbootxyz" +netbootxyz_image_version: "latest" netbootxyz_user_id: "1000" netbootxyz_group_id: "1000" diff --git a/roles/netbootxyz/docs/netbootxyz.md b/roles/netbootxyz/docs/netbootxyz.md new file mode 100644 index 00000000..cff9c1d4 --- /dev/null +++ b/roles/netbootxyz/docs/netbootxyz.md @@ -0,0 +1,15 @@ +# netboot.xyz + +Homepage: + +Docker Container: + +netboot.xyz is a way to PXE boot various operating system installers or utilities from one place within the BIOS without the need of having to go retrieve the media to run the tool. [iPXE](https://ipxe.org/) is used to provide a user friendly menu from within the BIOS that lets you easily choose the operating system you want along with any specific types of versions or bootable flags. + +You can remote attach the ISO to servers, set it up as a rescue option in Grub, or even set up your home network to boot to it by default so that it's always available. + +## Usage + +Set `netbootxyz_enabled: true` in your `inventories//nas.yml` file. + +The netbooxyz web interface can be found at . diff --git a/roles/netbootxyz/molecule/default/molecule.yml b/roles/netbootxyz/molecule/default/molecule.yml new file mode 100644 index 00000000..c563631f --- /dev/null +++ b/roles/netbootxyz/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + netbootxyz_enabled: true diff --git a/roles/netbootxyz/molecule/default/side_effect.yml b/roles/netbootxyz/molecule/default/side_effect.yml new file mode 100644 index 00000000..aa02d185 --- /dev/null +++ b/roles/netbootxyz/molecule/default/side_effect.yml @@ -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: + netbootxyz_enabled: false diff --git a/roles/netbootxyz/molecule/default/verify.yml b/roles/netbootxyz/molecule/default/verify.yml new file mode 100644 index 00000000..2f2efee8 --- /dev/null +++ b/roles/netbootxyz/molecule/default/verify.yml @@ -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 netbootxyz container state + community.docker.docker_container: + name: "{{ netbootxyz_container_name }}" + register: result + + - name: Check if netbootxyz containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/netbootxyz/molecule/default/verify_stopped.yml b/roles/netbootxyz/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..86e12133 --- /dev/null +++ b/roles/netbootxyz/molecule/default/verify_stopped.yml @@ -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 netbootxyz + community.docker.docker_container: + name: "{{ netbootxyz_container_name }}" + state: absent + register: result + + - name: Check if netbootxyz is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/netbootxyz/tasks/main.yml b/roles/netbootxyz/tasks/main.yml index 4247a50c..e135ddb3 100644 --- a/roles/netbootxyz/tasks/main.yml +++ b/roles/netbootxyz/tasks/main.yml @@ -1,34 +1,46 @@ --- -- name: Netbootxyz Directory - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ netbootxyz_config_directory }}" - - "{{ netbootxyz_assets_directory }}" +- name: Start Netbootxyz + block: + - name: Netbootxyz Directory + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ netbootxyz_config_directory }}" + - "{{ netbootxyz_assets_directory }}" -- name: Netbootxyz Docker Container - docker_container: - name: netbootxyz - image: linuxserver/netbootxyz:latest - pull: true - volumes: - - "{{ netbootxyz_config_directory }}:/config:rw" - - "{{ netbootxyz_assets_directory }}:/assets:rw" - ports: - - "{{ netbootxyz_port_http }}:3000" - - "{{ netbootxyz_port_http2 }}:80" - - "{{ netbootxyz_port_tftp }}:69/udp" - memory: "{{ netbootxyz_memory }}" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ netbootxyz_user_id }}" - PGID: "{{ netbootxyz_group_id }}" - restart_policy: unless-stopped - labels: - traefik.enable: "{{ netbootxyz_available_externally | string }}" - traefik.http.routers.netbootxyz.rule: "Host(`{{ netbootxyz_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.netbootxyz.tls.certresolver: "letsencrypt" - traefik.http.routers.netbootxyz.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.netbootxyz.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.netbootxyz.loadbalancer.server.port: "3000" + - name: Netbootxyz Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ netbootxyz_container_name }}" + image: "{{ netbootxyz_image_name }}:{{ netbootxyz_image_version }}" + pull: true + volumes: + - "{{ netbootxyz_config_directory }}:/config:rw" + - "{{ netbootxyz_assets_directory }}:/assets:rw" + ports: + - "{{ netbootxyz_port_http }}:3000" + - "{{ netbootxyz_port_http2 }}:80" + - "{{ netbootxyz_port_tftp }}:69/udp" + memory: "{{ netbootxyz_memory }}" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ netbootxyz_user_id }}" + PGID: "{{ netbootxyz_group_id }}" + restart_policy: unless-stopped + labels: + traefik.enable: "{{ netbootxyz_available_externally | string }}" + traefik.http.routers.netbootxyz.rule: "Host(`{{ netbootxyz_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.netbootxyz.tls.certresolver: "letsencrypt" + traefik.http.routers.netbootxyz.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.netbootxyz.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.netbootxyz.loadbalancer.server.port: "3000" + when: netbootxyz_enabled is true + +- name: Stop Netbootxyz + block: + - name: Stop Netbootxyz + community.docker.docker_container: + name: "{{ netbootxyz_container_name }}" + state: absent + when: netbootxyz_enabled is false diff --git a/roles/netdata/defaults/main.yml b/roles/netdata/defaults/main.yml index 148e8b11..80135fb2 100644 --- a/roles/netdata/defaults/main.yml +++ b/roles/netdata/defaults/main.yml @@ -6,5 +6,10 @@ netdata_available_externally: false netdata_hostname: "netdata" netdata_port: "19999" +# docker +netdata_container_name: "netdata" +netdata_image_name: "netdata/netdata" +netdata_image_version: "latest" + # specs netdata_memory: 1g diff --git a/roles/netdata/docs/netdata.md b/roles/netdata/docs/netdata.md new file mode 100644 index 00000000..e8ef6884 --- /dev/null +++ b/roles/netdata/docs/netdata.md @@ -0,0 +1,11 @@ +# Netdata + +Homepage: + +An extremely comprehensive system monitoring solution. + +## Usage + +Set `netdata_enabled: true` in your `inventories//nas.yml` file. + +Netdata web interface can be found at . diff --git a/roles/netdata/molecule/default/molecule.yml b/roles/netdata/molecule/default/molecule.yml new file mode 100644 index 00000000..ac74c328 --- /dev/null +++ b/roles/netdata/molecule/default/molecule.yml @@ -0,0 +1,7 @@ +--- +provisioner: + inventory: + group_vars: + all: + netdata_enabled: true + ansible_nas_hostname: ansible-nas diff --git a/roles/netdata/molecule/default/side_effect.yml b/roles/netdata/molecule/default/side_effect.yml new file mode 100644 index 00000000..49ed1fb6 --- /dev/null +++ b/roles/netdata/molecule/default/side_effect.yml @@ -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: + netdata_enabled: false diff --git a/roles/netdata/molecule/default/verify.yml b/roles/netdata/molecule/default/verify.yml new file mode 100644 index 00000000..6094369d --- /dev/null +++ b/roles/netdata/molecule/default/verify.yml @@ -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 netdata container state + community.docker.docker_container: + name: "{{ netdata_container_name }}" + register: result + + - name: Check if netdata containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/netdata/molecule/default/verify_stopped.yml b/roles/netdata/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..7fe1d292 --- /dev/null +++ b/roles/netdata/molecule/default/verify_stopped.yml @@ -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 netdata + community.docker.docker_container: + name: "{{ netdata_container_name }}" + state: absent + register: result + + - name: Check if netdata is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/netdata/tasks/main.yml b/roles/netdata/tasks/main.yml index d41c3486..d1e2063f 100644 --- a/roles/netdata/tasks/main.yml +++ b/roles/netdata/tasks/main.yml @@ -1,34 +1,46 @@ --- -- name: Get docker group id - group: - name: docker - register: docker_group +- name: Start Netdata + block: + - name: Get docker group id + ansible.builtin.group: + name: docker + register: docker_group -- name: Netdata Docker Container - docker_container: - name: netdata - hostname: "{{ ansible_nas_hostname }}.{{ ansible_nas_domain }}" - image: netdata/netdata - state: started - pull: true - ports: - - "{{ netdata_port }}:19999" - volumes: - - "/proc:/host/proc:ro" - - "/sys:/host/sys:ro" - - "/var/run/docker.sock:/var/run/docker.sock:ro" - env: - PGID: "{{ docker_group.gid }}" - capabilities: - - SYS_PTRACE - security_opts: - - apparmor:unconfined - restart_policy: unless-stopped - memory: "{{ netdata_memory }}" - labels: - traefik.enable: "{{ netdata_available_externally | string }}" - traefik.http.routers.netdata.rule: "Host(`{{ netdata_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.netdata.tls.certresolver: "letsencrypt" - traefik.http.routers.netdata.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.netdata.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.netdata.loadbalancer.server.port: "19999" + - name: Netdata Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ netdata_container_name }}" + image: "{{ netdata_image_name }}:{{ netdata_image_version }}" + hostname: "{{ ansible_nas_hostname }}.{{ ansible_nas_domain }}" + state: started + pull: true + ports: + - "{{ netdata_port }}:19999" + volumes: + - "/proc:/host/proc:ro" + - "/sys:/host/sys:ro" + - "/var/run/docker.sock:/var/run/docker.sock:ro" + env: + PGID: "{{ docker_group.gid }}" + capabilities: + - SYS_PTRACE + security_opts: + - apparmor:unconfined + restart_policy: unless-stopped + memory: "{{ netdata_memory }}" + labels: + traefik.enable: "{{ netdata_available_externally | string }}" + traefik.http.routers.netdata.rule: "Host(`{{ netdata_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.netdata.tls.certresolver: "letsencrypt" + traefik.http.routers.netdata.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.netdata.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.netdata.loadbalancer.server.port: "19999" + when: netdata_enabled is true + +- name: Stop Netdata + block: + - name: Stop Netdata + community.docker.docker_container: + name: "{{ netdata_container_name }}" + state: absent + when: netdata_enabled is false diff --git a/roles/nextcloud/defaults/main.yml b/roles/nextcloud/defaults/main.yml index adfe0cfa..802fe365 100644 --- a/roles/nextcloud/defaults/main.yml +++ b/roles/nextcloud/defaults/main.yml @@ -5,13 +5,18 @@ nextcloud_available_externally: false # directories nextcloud_data_directory: "{{ docker_home }}/nextcloud" -# images -nextcloud_image: "nextcloud:stable" -nextcloud_mysql_image: "mysql:5.7" - # network nextcloud_port: "8080" nextcloud_hostname: "nextcloud" +nextcloud_network_name: "nextcloud" + +# docker +nextcloud_container_name: "nextcloud" +nextcloud_image_name: "nextcloud" +nextcloud_image_version: "stable" +nextcloud_db_container_name: "nextcloud-db" +nextcloud_db_image_name: "mysql" +nextcloud_db_image_version: "5.7" # username / passwords nextcloud_sql_user: "nextcloud-user" @@ -20,4 +25,4 @@ nextcloud_sql_root_password: "nextcloud-secret" # specs nextcloud_memory: 1g -nextcloud_mysql_memory: 1g +nextcloud_db_memory: 1g diff --git a/roles/nextcloud/docs/nextcloud.md b/roles/nextcloud/docs/nextcloud.md new file mode 100644 index 00000000..842839af --- /dev/null +++ b/roles/nextcloud/docs/nextcloud.md @@ -0,0 +1,25 @@ +# Nextcloud + +Homepage: + +## Usage + +Set `nextcloud_enabled: true` in your `inventories//nas.yml` file. + +Tread carefully. + +External access may require that you manually configure your Fully Qualified Domain Name (FQDN) as a trusted domain within the application. There is an environment variable set up for this in the "nextcloud task" which will most likely make manual configuration unnecessary. If you get the following [screenshot](https://docs.nextcloud.com/server/14/admin_manual/installation/installation_wizard.html#trusted-domains) warning when trying to access nextcloud externally you'll need to manually set it up. + +This can be accomplished in two commands. + +```bash +# On the server where the docker containers are running +$ docker exec -it --user www-data nextcloud /bin/bash +$ php occ config:system:set trusted_domains INDEX_FOR_NEW_ENTRY_SEE_DOCS_LINK_BELOW --value=YOUR_FQDN_HERE --update-only +``` + +The above commands are documented in the administration guide for Nextcloud: + +* [set array values](https://docs.nextcloud.com/server/14/admin_manual/configuration_server/occ_command.html#setting-an-array-configuration-value) + +* [docker container docs, references environment variables](https://github.com/nextcloud/docker) diff --git a/roles/nextcloud/molecule/default/molecule.yml b/roles/nextcloud/molecule/default/molecule.yml new file mode 100644 index 00000000..16ec0be5 --- /dev/null +++ b/roles/nextcloud/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + nextcloud_enabled: true diff --git a/roles/nextcloud/molecule/default/side_effect.yml b/roles/nextcloud/molecule/default/side_effect.yml new file mode 100644 index 00000000..e760bb55 --- /dev/null +++ b/roles/nextcloud/molecule/default/side_effect.yml @@ -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: + nextcloud_enabled: false diff --git a/roles/nextcloud/molecule/default/verify.yml b/roles/nextcloud/molecule/default/verify.yml new file mode 100644 index 00000000..d4213726 --- /dev/null +++ b/roles/nextcloud/molecule/default/verify.yml @@ -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 nextcloud db container state + community.docker.docker_container: + name: "{{ nextcloud_db_container_name }}" + register: result_db + + - name: Get nextcloud container state + community.docker.docker_container: + name: "{{ nextcloud_container_name }}" + register: result + + - name: Check if nextcloud 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 diff --git a/roles/nextcloud/molecule/default/verify_stopped.yml b/roles/nextcloud/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..26edbcab --- /dev/null +++ b/roles/nextcloud/molecule/default/verify_stopped.yml @@ -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 nextcloud + community.docker.docker_container: + name: "{{ nextcloud_container_name }}" + state: absent + register: result + + - name: Try and stop and remove nextcloud db + community.docker.docker_container: + name: "{{ nextcloud_db_container_name }}" + state: absent + register: result_db + + - name: Check if nextcloud is stopped + ansible.builtin.assert: + that: + - not result.changed + - not result_db.changed diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml index 48f16286..5841354b 100644 --- a/roles/nextcloud/tasks/main.yml +++ b/roles/nextcloud/tasks/main.yml @@ -1,50 +1,75 @@ --- -- name: Create Nextcloud directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ nextcloud_data_directory }}/nextcloud" - - "{{ nextcloud_data_directory }}/mysql" +- name: Start Nextcloud + block: + - name: Create Nextcloud directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ nextcloud_data_directory }}/nextcloud" + - "{{ nextcloud_data_directory }}/mysql" -- name: Nextcloud Mysql Docker Container - docker_container: - name: nextcloud-mysql - image: "{{ nextcloud_mysql_image }}" - pull: true - volumes: - - "{{ nextcloud_data_directory }}/mysql:/var/lib/mysql:rw" - env: - MYSQL_DATABASE: "nextcloud" - MYSQL_USER: "{{ nextcloud_sql_user }}" - MYSQL_PASSWORD: "{{ nextcloud_sql_password }}" - MYSQL_ROOT_PASSWORD: "{{ nextcloud_sql_root_password }}" - restart_policy: unless-stopped - memory: "{{ nextcloud_mysql_memory }}" + - name: Create Nextcloud network + community.docker.docker_network: + name: "{{ nextcloud_network_name }}" -- name: Nextcloud Docker Container - docker_container: - name: nextcloud - image: "{{ nextcloud_image }}" - pull: true - links: - - nextcloud-mysql:mysql - volumes: - - "{{ nextcloud_data_directory }}/nextcloud:/var/www/html:rw" - ports: - - "{{ nextcloud_port }}:80" - env: - MYSQL_HOST: "mysql" - MYSQL_DATABASE: "nextcloud" - MYSQL_USER: "{{ nextcloud_sql_user }}" - MYSQL_PASSWORD: "{{ nextcloud_sql_password }}" - NEXTCLOUD_TRUSTED_DOMAINS: "{{ nextcloud_hostname }}.{{ ansible_nas_domain }}" - restart_policy: unless-stopped - memory: "{{ nextcloud_memory }}" - labels: - traefik.enable: "{{ nextcloud_available_externally | string }}" - traefik.http.routers.nextcloud.rule: "Host(`{{ nextcloud_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.nextcloud.tls.certresolver: "letsencrypt" - traefik.http.routers.nextcloud.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.nextcloud.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.nextcloud.loadbalancer.server.port: "80" + - name: Nextcloud Mysql Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ nextcloud_db_container_name }}" + image: "{{ nextcloud_db_image_name }}:{{ nextcloud_db_image_version }}" + networks: + - name: "{{ nextcloud_network_name }}" + network_mode: "{{ nextcloud_network_name }}" + pull: true + volumes: + - "{{ nextcloud_data_directory }}/mysql:/var/lib/mysql:rw" + env: + MYSQL_DATABASE: "nextcloud" + MYSQL_USER: "{{ nextcloud_sql_user }}" + MYSQL_PASSWORD: "{{ nextcloud_sql_password }}" + MYSQL_ROOT_PASSWORD: "{{ nextcloud_sql_root_password }}" + restart_policy: unless-stopped + memory: "{{ nextcloud_db_memory }}" + + - name: Nextcloud Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ nextcloud_container_name }}" + image: "{{ nextcloud_image_name }}:{{ nextcloud_image_version }}" + networks: + - name: "{{ nextcloud_network_name }}" + network_mode: "{{ nextcloud_network_name }}" + pull: true + volumes: + - "{{ nextcloud_data_directory }}/nextcloud:/var/www/html:rw" + ports: + - "{{ nextcloud_port }}:80" + env: + MYSQL_HOST: "{{ nextcloud_db_container_name }}" + MYSQL_DATABASE: "nextcloud" + MYSQL_USER: "{{ nextcloud_sql_user }}" + MYSQL_PASSWORD: "{{ nextcloud_sql_password }}" + NEXTCLOUD_TRUSTED_DOMAINS: "{{ nextcloud_hostname }}.{{ ansible_nas_domain }}" + restart_policy: unless-stopped + memory: "{{ nextcloud_memory }}" + labels: + traefik.enable: "{{ nextcloud_available_externally | string }}" + traefik.http.routers.nextcloud.rule: "Host(`{{ nextcloud_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.nextcloud.tls.certresolver: "letsencrypt" + traefik.http.routers.nextcloud.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.nextcloud.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.nextcloud.loadbalancer.server.port: "80" + when: nextcloud_enabled is true + +- name: Stop Nextcloud + block: + - name: Stop Nextcloud + community.docker.docker_container: + name: "{{ nextcloud_container_name }}" + state: absent + - name: Stop Nextcloud DB + community.docker.docker_container: + name: "{{ nextcloud_db_container_name }}" + state: absent + when: nextcloud_enabled is false diff --git a/roles/nomad/docs/nomad.md b/roles/nomad/docs/nomad.md new file mode 100644 index 00000000..17e9569b --- /dev/null +++ b/roles/nomad/docs/nomad.md @@ -0,0 +1,11 @@ +# Nomad + +Homepage: + +A simple and flexible scheduler and orchestrator to deploy and manage containers and non-containerised applications across on-prem and clouds at scale. + +## Usage + +Set `nomad_enabled: true` in your `inventories//nas.yml` file. + +Nomad's web interface can be found at diff --git a/roles/nomad/molecule/default/molecule.yml b/roles/nomad/molecule/default/molecule.yml new file mode 100644 index 00000000..232bcfee --- /dev/null +++ b/roles/nomad/molecule/default/molecule.yml @@ -0,0 +1,16 @@ +--- +provisioner: + inventory: + group_vars: + all: + nomad_enabled: true +platforms: + - name: instance + image: geerlingguy/docker-ubuntu2204-ansible:latest + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:rw + - /var/run/docker.sock:/var/run/docker.sock + cgroupns_mode: host + command: "/usr/sbin/init" + privileged: true + pre_build_image: true diff --git a/roles/nomad/molecule/default/side_effect.yml b/roles/nomad/molecule/default/side_effect.yml new file mode 100644 index 00000000..c9375ee0 --- /dev/null +++ b/roles/nomad/molecule/default/side_effect.yml @@ -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: + nomad_enabled: false diff --git a/roles/nomad/molecule/default/verify.yml b/roles/nomad/molecule/default/verify.yml new file mode 100644 index 00000000..717a7d47 --- /dev/null +++ b/roles/nomad/molecule/default/verify.yml @@ -0,0 +1,21 @@ +--- +- name: Verify + hosts: all + gather_facts: false + tasks: + - name: Include vars + ansible.builtin.include_vars: + file: ../../defaults/main.yml + + - name: Get Nomad service state + ansible.builtin.systemd: + name: nomad + state: started + register: service_result + + - name: Check that Nomad service is running + ansible.builtin.assert: + that: + - service_result.status['ActiveState'] == "active" + - service_result.status['Result'] == "success" + - service_result.state == "started" diff --git a/roles/nomad/molecule/default/verify_stopped.yml b/roles/nomad/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..e51d9c9f --- /dev/null +++ b/roles/nomad/molecule/default/verify_stopped.yml @@ -0,0 +1,18 @@ +--- +- name: Verify + hosts: all + gather_facts: false + tasks: + - name: Include vars + ansible.builtin.include_vars: + file: ../../defaults/main.yml + + - name: Nomad - retrieve information + ansible.builtin.stat: + path: /usr/bin/nomad + register: nomad_file + + - name: Nomad - assert that file is removed + ansible.builtin.assert: + that: not nomad_file.stat.exists + fail_msg: "The file /usr/bin/nomad still exists!" diff --git a/roles/nomad/tasks/main.yml b/roles/nomad/tasks/main.yml index f11a764e..f0ea6b28 100644 --- a/roles/nomad/tasks/main.yml +++ b/roles/nomad/tasks/main.yml @@ -2,13 +2,21 @@ - name: Install and start Nomad block: - name: Add Hashicorp GPG key - ansible.builtin.apt_key: + ansible.builtin.get_url: url: https://apt.releases.hashicorp.com/gpg - state: present + dest: /etc/apt/trusted.gpg.d/hashicorp.asc + # dest: /usr/share/keyrings/hashicorp-nomad-keyring.gpg + mode: '0644' + force: true + # - name: Add Hashicorp GPG key + # ansible.builtin.apt_key: + # url: https://apt.releases.hashicorp.com/gpg + # state: present - name: Add Hashicorp apt repository ansible.builtin.apt_repository: repo: "deb https://apt.releases.hashicorp.com {{ ansible_facts['lsb']['codename'] }} main" + # repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/hashicorp-nomad-keyring.gpg] https://apt.releases.hashicorp.com {{ ansible_facts['lsb']['codename'] }} main" state: present filename: hashicorp diff --git a/roles/nzbget/defaults/main.yml b/roles/nzbget/defaults/main.yml index d18e7ddf..6fb474d2 100644 --- a/roles/nzbget/defaults/main.yml +++ b/roles/nzbget/defaults/main.yml @@ -14,5 +14,10 @@ nzbget_group_id: "0" nzbget_port: "6789" nzbget_hostname: "nzbget" +# docker +nzbget_container_name: "nzbget" +nzbget_image_name: "linuxserver/nzbget" +nzbget_image_version: "latest" + # specs nzbget_memory: "1g" diff --git a/roles/nzbget/docs/nzbget.md b/roles/nzbget/docs/nzbget.md new file mode 100644 index 00000000..a0d82adc --- /dev/null +++ b/roles/nzbget/docs/nzbget.md @@ -0,0 +1,11 @@ +# NZBGet + +Homepage: + +The most efficient Usenet downloader. NZBGet is written in C++ and designed with performance in mind to achieve maximum download speed by using very little system resources. + +## Usage + +Set `nzbget_enabled: true` in your `inventories//nas.yml` file. + +The NZBget web interface can be found at , the default username is `nzbget` and password `tegbzn6789`. Change this once you've logged in! diff --git a/roles/nzbget/molecule/default/molecule.yml b/roles/nzbget/molecule/default/molecule.yml new file mode 100644 index 00000000..b05e1d50 --- /dev/null +++ b/roles/nzbget/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + nzbget_enabled: true diff --git a/roles/nzbget/molecule/default/side_effect.yml b/roles/nzbget/molecule/default/side_effect.yml new file mode 100644 index 00000000..32a100e2 --- /dev/null +++ b/roles/nzbget/molecule/default/side_effect.yml @@ -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: + nzbget_enabled: false diff --git a/roles/nzbget/molecule/default/verify.yml b/roles/nzbget/molecule/default/verify.yml new file mode 100644 index 00000000..b9d7422e --- /dev/null +++ b/roles/nzbget/molecule/default/verify.yml @@ -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 nzbget container state + community.docker.docker_container: + name: "{{ nzbget_container_name }}" + register: result + + - name: Check if nzbget containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/nzbget/molecule/default/verify_stopped.yml b/roles/nzbget/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..1c228aec --- /dev/null +++ b/roles/nzbget/molecule/default/verify_stopped.yml @@ -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 nzbget + community.docker.docker_container: + name: "{{ nzbget_container_name }}" + state: absent + register: result + + - name: Check if nzbget is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/nzbget/tasks/main.yml b/roles/nzbget/tasks/main.yml index d951041d..767ea625 100644 --- a/roles/nzbget/tasks/main.yml +++ b/roles/nzbget/tasks/main.yml @@ -1,31 +1,43 @@ --- -- name: Create NZBget Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ nzbget_data_directory }}" +- name: Start NZBget + block: + - name: Create NZBget Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ nzbget_data_directory }}" -- name: NZBGet - docker_container: - name: nzbget - image: linuxserver/nzbget - pull: true - volumes: - - "{{ nzbget_download_directory }}:/downloads:rw" - - "{{ nzbget_data_directory }}:/config:rw" - ports: - - "{{ nzbget_port }}:6789" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ nzbget_user_id }}" - PGID: "{{ nzbget_group_id }}" - restart_policy: unless-stopped - memory: "{{ nzbget_memory }}" - labels: - traefik.enable: "{{ nzbget_available_externally | string }}" - traefik.http.routers.nzbget.rule: "Host(`{{ nzbget_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.nzbget.tls.certresolver: "letsencrypt" - traefik.http.routers.nzbget.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.nzbget.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.nzbget.loadbalancer.server.port: "6789" + - name: NZBGet + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ nzbget_container_name }}" + image: "{{ nzbget_image_name }}:{{ nzbget_image_version }}" + pull: true + volumes: + - "{{ nzbget_download_directory }}:/downloads:rw" + - "{{ nzbget_data_directory }}:/config:rw" + ports: + - "{{ nzbget_port }}:6789" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ nzbget_user_id }}" + PGID: "{{ nzbget_group_id }}" + restart_policy: unless-stopped + memory: "{{ nzbget_memory }}" + labels: + traefik.enable: "{{ nzbget_available_externally | string }}" + traefik.http.routers.nzbget.rule: "Host(`{{ nzbget_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.nzbget.tls.certresolver: "letsencrypt" + traefik.http.routers.nzbget.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.nzbget.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.nzbget.loadbalancer.server.port: "6789" + when: nzbget_enabled is true + +- name: Stop NZBget + block: + - name: Stop NZBget + community.docker.docker_container: + name: "{{ nzbget_container_name }}" + state: absent + when: nzbget_enabled is false diff --git a/roles/octoprint/defaults/main.yml b/roles/octoprint/defaults/main.yml index 91bf467f..7bb80e4d 100644 --- a/roles/octoprint/defaults/main.yml +++ b/roles/octoprint/defaults/main.yml @@ -9,6 +9,11 @@ octoprint_data_directory: "{{ docker_home }}/octoprint" octoprint_port: "8095" octoprint_hostname: "octoprint" +# docker +octoprint_container_name: "octoprint" +octoprint_image_name: "octoprint/octoprint" +octoprint_image_version: "latest" + # devices octoprint_printer_mountpoint: "/dev/ttyUSB0" diff --git a/roles/octoprint/docs/octoprint.md b/roles/octoprint/docs/octoprint.md new file mode 100644 index 00000000..75450645 --- /dev/null +++ b/roles/octoprint/docs/octoprint.md @@ -0,0 +1,11 @@ +# Octoprint + +Homepage: + +Octoprint is a control and monitoring application for your 3D printer. You can start and stop print jobs, view your webcam feed, move the print head and extruder manually and check your gcode files, all from a single web interface. Octoprint doesn't require modifications on the printer firmware, just make sure your NAS is phisically connected to it with a usb cable. + +## Usage + +Connect the printer to your NAS, and take note of where the serial interface is mounted (usually it's automounted in `/dev/ttyUSB0`). Set `octoprint_enabled: true` in your `inventories//nas.yml` file, as well as the `octoprint_printer_mountpoint` variable if your printer doesn't mount to the default location. + +If you want to also have a webcam feed, attach one to your NAS and take note of its mountpoint as well (usually `/dev/video0`). Set `octoprint_enable_webcam: true` and add a `octoprint_webcam_mountpoint` variable if the webcam doesn't mount to the default location. diff --git a/roles/octoprint/molecule/default/molecule.yml b/roles/octoprint/molecule/default/molecule.yml new file mode 100644 index 00000000..7d54b88f --- /dev/null +++ b/roles/octoprint/molecule/default/molecule.yml @@ -0,0 +1,19 @@ +--- +provisioner: + inventory: + group_vars: + all: + octoprint_enabled: true + octoprint_printer_mountpoint: "/dev/null" + octoprint_webcam_mountpoint: "/dev/null" +platforms: + - name: instance + image: geerlingguy/docker-ubuntu2204-ansible:latest + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:rw + - /var/run/docker.sock:/var/run/docker.sock + - /dev/null:/dev/null + cgroupns_mode: host + privileged: true + pre_build_image: true + diff --git a/roles/octoprint/molecule/default/side_effect.yml b/roles/octoprint/molecule/default/side_effect.yml new file mode 100644 index 00000000..c9f53c2e --- /dev/null +++ b/roles/octoprint/molecule/default/side_effect.yml @@ -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: + octoprint_enabled: false diff --git a/roles/octoprint/molecule/default/verify.yml b/roles/octoprint/molecule/default/verify.yml new file mode 100644 index 00000000..e7b628f8 --- /dev/null +++ b/roles/octoprint/molecule/default/verify.yml @@ -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 octoprint container state + community.docker.docker_container: + name: "{{ octoprint_container_name }}" + register: result + + - name: Check if octoprint containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/octoprint/molecule/default/verify_stopped.yml b/roles/octoprint/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..23dca6fc --- /dev/null +++ b/roles/octoprint/molecule/default/verify_stopped.yml @@ -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 octoprint + community.docker.docker_container: + name: "{{ octoprint_container_name }}" + state: absent + register: result + + - name: Check if octoprint is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/octoprint/tasks/main.yml b/roles/octoprint/tasks/main.yml index 40d84fce..77cf2b16 100644 --- a/roles/octoprint/tasks/main.yml +++ b/roles/octoprint/tasks/main.yml @@ -1,33 +1,45 @@ --- -- name: Create Octoprint Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ octoprint_data_directory }}" +- name: Start Octoprint + block: + - name: Create Octoprint Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ octoprint_data_directory }}" -- name: Octoprint Docker Container - docker_container: - name: octoprint - image: octoprint/octoprint - pull: true - volumes: - - "{{ octoprint_data_directory }}:/octoprint:rw" - ports: - - "{{ octoprint_port }}:80" - devices: - - "{{ octoprint_printer_mountpoint }}" - - "{{ octoprint_enable_webcam | ternary(octoprint_webcam_mountpoint, '/dev/null') }}" - restart_policy: unless-stopped - memory: "{{ octoprint_memory }}" - env: - TZ: "{{ ansible_nas_timezone }}" - MJPG_STREAMER_INPUT: "-n -r 1080x1024 -f 30" - ENABLE_MJPG_STREAMER: "{{ octoprint_enable_webcam | string }}" - labels: - traefik.enable: "{{ octoprint_available_externally | string }}" - traefik.http.routers.octoprint.rule: "Host(`{{ octoprint_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.octoprint.tls.certresolver: "letsencrypt" - traefik.http.routers.octoprint.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.octoprint.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.octoprint.loadbalancer.server.port: "80" + - name: Octoprint Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ octoprint_container_name }}" + image: "{{ octoprint_image_name }}:{{ octoprint_image_version }}" + pull: true + volumes: + - "{{ octoprint_data_directory }}:/octoprint:rw" + ports: + - "{{ octoprint_port }}:80" + devices: + - "{{ octoprint_printer_mountpoint }}" + - "{{ octoprint_enable_webcam | ternary(octoprint_webcam_mountpoint, '/dev/null') }}" + restart_policy: unless-stopped + memory: "{{ octoprint_memory }}" + env: + TZ: "{{ ansible_nas_timezone }}" + MJPG_STREAMER_INPUT: "-n -r 1080x1024 -f 30" + ENABLE_MJPG_STREAMER: "{{ octoprint_enable_webcam | string }}" + labels: + traefik.enable: "{{ octoprint_available_externally | string }}" + traefik.http.routers.octoprint.rule: "Host(`{{ octoprint_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.octoprint.tls.certresolver: "letsencrypt" + traefik.http.routers.octoprint.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.octoprint.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.octoprint.loadbalancer.server.port: "80" + when: octoprint_enabled is true + +- name: Stop Octoprint + block: + - name: Stop Octoprint + community.docker.docker_container: + name: "{{ octoprint_container_name }}" + state: absent + when: octoprint_enabled is false diff --git a/roles/ombi/defaults/main.yml b/roles/ombi/defaults/main.yml index 7de3e157..c29a1cbe 100644 --- a/roles/ombi/defaults/main.yml +++ b/roles/ombi/defaults/main.yml @@ -9,7 +9,10 @@ ombi_config_directory: "{{ docker_home }}/ombi/config" ombi_port: "3579" ombi_hostname: "ombi" -# uid / gid +# docker +ombi_container_name: "ombi" +ombi_image_name: "linuxserver/ombi" +ombi_image_version: "latest" ombi_user_id: "0" ombi_group_id: "0" diff --git a/roles/ombi/docs/ombi.md b/roles/ombi/docs/ombi.md new file mode 100644 index 00000000..e4ba8884 --- /dev/null +++ b/roles/ombi/docs/ombi.md @@ -0,0 +1,9 @@ +# Ombi + +Homepage: + +Ombi is a self-hosted web application that automatically gives your shared Plex or Emby users the ability to request content by themselves! Ombi can be linked to multiple TV Show and Movie DVR tools to create a seamless end-to-end experience for your users. + +## Usage + +Set `ombi_enabled: true` in your `inventories//nas.yml` file. diff --git a/roles/ombi/molecule/default/molecule.yml b/roles/ombi/molecule/default/molecule.yml new file mode 100644 index 00000000..01f8b451 --- /dev/null +++ b/roles/ombi/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + ombi_enabled: true diff --git a/roles/ombi/molecule/default/side_effect.yml b/roles/ombi/molecule/default/side_effect.yml new file mode 100644 index 00000000..aa51bb8d --- /dev/null +++ b/roles/ombi/molecule/default/side_effect.yml @@ -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: + ombi_enabled: false diff --git a/roles/ombi/molecule/default/verify.yml b/roles/ombi/molecule/default/verify.yml new file mode 100644 index 00000000..91f442a8 --- /dev/null +++ b/roles/ombi/molecule/default/verify.yml @@ -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 ombi container state + community.docker.docker_container: + name: "{{ ombi_container_name }}" + register: result + + - name: Check if ombi containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/ombi/molecule/default/verify_stopped.yml b/roles/ombi/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..2ee8ef53 --- /dev/null +++ b/roles/ombi/molecule/default/verify_stopped.yml @@ -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 ombi + community.docker.docker_container: + name: "{{ ombi_container_name }}" + state: absent + register: result + + - name: Check if ombi is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/ombi/tasks/main.yml b/roles/ombi/tasks/main.yml index 226a368e..140d2e42 100644 --- a/roles/ombi/tasks/main.yml +++ b/roles/ombi/tasks/main.yml @@ -1,28 +1,40 @@ --- -- name: Create Ombi Directories - file: - path: "{{ ombi_config_directory }}" - state: directory +- name: Start Ombi + block: + - name: Create Ombi Directories + ansible.builtin.file: + path: "{{ ombi_config_directory }}" + state: directory -- name: Ombi Docker Container - docker_container: - name: ombi - image: linuxserver/ombi - pull: true - volumes: - - "{{ ombi_config_directory }}:/config:rw" - ports: - - "{{ ombi_port }}:3579" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ ombi_user_id }}" - PGID: "{{ ombi_group_id }}" - restart_policy: unless-stopped - memory: "{{ ombi_memory }}" - labels: - traefik.enable: "{{ ombi_available_externally | string }}" - traefik.http.routers.ombi.rule: "Host(`{{ ombi_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.ombi.tls.certresolver: "letsencrypt" - traefik.http.routers.ombi.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.ombi.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.ombi.loadbalancer.server.port: "3579" + - name: Ombi Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ ombi_container_name }}" + image: "{{ ombi_image_name }}:{{ ombi_image_version }}" + pull: true + volumes: + - "{{ ombi_config_directory }}:/config:rw" + ports: + - "{{ ombi_port }}:3579" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ ombi_user_id }}" + PGID: "{{ ombi_group_id }}" + restart_policy: unless-stopped + memory: "{{ ombi_memory }}" + labels: + traefik.enable: "{{ ombi_available_externally | string }}" + traefik.http.routers.ombi.rule: "Host(`{{ ombi_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.ombi.tls.certresolver: "letsencrypt" + traefik.http.routers.ombi.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.ombi.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.ombi.loadbalancer.server.port: "3579" + when: ombi_enabled is true + +- name: Stop Ombi + block: + - name: Stop Ombi + community.docker.docker_container: + name: "{{ ombi_container_name }}" + state: absent + when: ombi_enabled is false diff --git a/roles/openhab/defaults/main.yml b/roles/openhab/defaults/main.yml index 0e62c638..97193ed6 100644 --- a/roles/openhab/defaults/main.yml +++ b/roles/openhab/defaults/main.yml @@ -10,5 +10,10 @@ openhab_port_http: "7777" openhab_port_https: "7778" openhab_hostname: "openhab" +# docker +openhab_container_name: "openhab" +openhab_image_name: "openhab/openhab" +openhab_image_version: "latest" + # specs openhab_memory: 1g diff --git a/roles/openhab/docs/openhab.md b/roles/openhab/docs/openhab.md new file mode 100644 index 00000000..2ea46ddf --- /dev/null +++ b/roles/openhab/docs/openhab.md @@ -0,0 +1,15 @@ +# openHAB + +Homepage: + +OpenHab is a vendor and technology agnostic open source automation software for your home. +It allows you to connect many different IoT-Devices (which in this case means "Intranet of Things") using custom bindings made by the community. + +## Usage + +Set `openhab_enabled: true` in your `inventories//nas.yml` file. + +## Specific Configuration + +The openHAB Webinterface is available at port 7777 (HTTP) and 7778 (HTTPS). +Visit the webinterface and follow the setup instructions found in the [openHAB Documentation](https://www.openhab.org/docs/tutorial/1sttimesetup.html) diff --git a/roles/openhab/molecule/default/molecule.yml b/roles/openhab/molecule/default/molecule.yml new file mode 100644 index 00000000..eba46adf --- /dev/null +++ b/roles/openhab/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + openhab_enabled: true diff --git a/roles/openhab/molecule/default/side_effect.yml b/roles/openhab/molecule/default/side_effect.yml new file mode 100644 index 00000000..f8d54f8b --- /dev/null +++ b/roles/openhab/molecule/default/side_effect.yml @@ -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: + openhab_enabled: false diff --git a/roles/openhab/molecule/default/verify.yml b/roles/openhab/molecule/default/verify.yml new file mode 100644 index 00000000..78a33001 --- /dev/null +++ b/roles/openhab/molecule/default/verify.yml @@ -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 openhab container state + community.docker.docker_container: + name: "{{ openhab_container_name }}" + register: result + + - name: Check if openhab containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/openhab/molecule/default/verify_stopped.yml b/roles/openhab/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..d7aeec10 --- /dev/null +++ b/roles/openhab/molecule/default/verify_stopped.yml @@ -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 openhab + community.docker.docker_container: + name: "{{ openhab_container_name }}" + state: absent + register: result + + - name: Check if openhab is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/openhab/tasks/main.yml b/roles/openhab/tasks/main.yml index 2b463247..ecfe75e4 100644 --- a/roles/openhab/tasks/main.yml +++ b/roles/openhab/tasks/main.yml @@ -1,53 +1,65 @@ --- -- name: Create openHAB group - group: - name: openhab - gid: 9001 - state: present +- name: Start openHAB + block: + - name: Create openHAB group + ansible.builtin.group: + name: openhab + gid: 9001 + state: present -- name: Create openHAB user - user: - name: openhab - uid: 9001 - state: present - system: yes - update_password: on_create - create_home: no - group: openhab + - name: Create openHAB user + ansible.builtin.user: + name: openhab + uid: 9001 + state: present + system: yes + update_password: on_create + create_home: no + group: openhab -- name: Create openHAB Directories - file: - path: "{{ item }}" - state: directory - owner: openhab - group: openhab - with_items: - - "{{ openhab_data_directory }}" - - "{{ openhab_data_directory }}/conf" - - "{{ openhab_data_directory }}/userdata" - - "{{ openhab_data_directory }}/addons" + - name: Create openHAB Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + owner: openhab + group: openhab + with_items: + - "{{ openhab_data_directory }}" + - "{{ openhab_data_directory }}/conf" + - "{{ openhab_data_directory }}/userdata" + - "{{ openhab_data_directory }}/addons" -- name: Create openHAB container - docker_container: - name: openHAB - image: openhab/openhab - pull: true - network_mode: "host" - volumes: - - "{{ openhab_data_directory }}/conf:/openhab/conf:rw" - - "{{ openhab_data_directory }}/userdata:/openhab/userdata:rw" - - "{{ openhab_data_directory }}/addons:/openhab/addons:rw" - - "/etc/localtime:/etc/localtime:ro" - - "/etc/timezone:/etc/timezone:ro" - env: - OPENHAB_HTTP_PORT: "{{ openhab_port_http }}" - OPENHAB_HTTPS_PORT: "{{ openhab_port_https }}" - restart_policy: unless-stopped - memory: "{{ openhab_memory }}" - labels: - traefik.enable: "{{ openhab_available_externally | string }}" - traefik.http.routers.openhab.rule: "Host(`{{ openhab_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.openhab.tls.certresolver: "letsencrypt" - traefik.http.routers.openhab.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.openhab.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.openhab.loadbalancer.server.port: "7777" + - name: Create openHAB container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ openhab_container_name }}" + image: "{{ openhab_image_name }}:{{ openhab_image_version }}" + pull: true + network_mode: "host" + volumes: + - "{{ openhab_data_directory }}/conf:/openhab/conf:rw" + - "{{ openhab_data_directory }}/userdata:/openhab/userdata:rw" + - "{{ openhab_data_directory }}/addons:/openhab/addons:rw" + - "/etc/localtime:/etc/localtime:ro" + - "/etc/timezone:/etc/timezone:ro" + env: + OPENHAB_HTTP_PORT: "{{ openhab_port_http }}" + OPENHAB_HTTPS_PORT: "{{ openhab_port_https }}" + restart_policy: unless-stopped + memory: "{{ openhab_memory }}" + labels: + traefik.enable: "{{ openhab_available_externally | string }}" + traefik.http.routers.openhab.rule: "Host(`{{ openhab_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.openhab.tls.certresolver: "letsencrypt" + traefik.http.routers.openhab.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.openhab.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.openhab.loadbalancer.server.port: "7777" + when: openhab_enabled is true + +- name: Stop openHAB + block: + - name: Stop openHAB + community.docker.docker_container: + name: "{{ openhab_container_name }}" + state: absent + when: openhab_enabled is false diff --git a/roles/organizr/defaults/main.yml b/roles/organizr/defaults/main.yml index 9e0f7a9b..27ed930f 100644 --- a/roles/organizr/defaults/main.yml +++ b/roles/organizr/defaults/main.yml @@ -10,7 +10,10 @@ organizr_port_http: "10081" organizr_port_https: "10444" organizr_hostname: "organizr" -# uid / gid +# docker +organizr_container_name: "organizr" +organizr_image_name: "organizr/organizr" +organizr_image_version: "latest" organizr_user_id: "1000" organizr_group_id: "1000" diff --git a/roles/organizr/docs/organizr.md b/roles/organizr/docs/organizr.md new file mode 100644 index 00000000..df1b293f --- /dev/null +++ b/roles/organizr/docs/organizr.md @@ -0,0 +1,15 @@ +# Organizr + +Homepage: + +ORGANIZR aims to be your one stop shop for your Servers Frontend. + +Do you have quite a bit of services running on your computer or server? Do you have a lot of bookmarks or have to memor$ + +TODO: finish this truncated description + +## Usage + +Set `organizr_enabled: true` in your `inventories//nas.yml` file. + +The Organizr web interface can be found at . diff --git a/roles/organizr/molecule/default/molecule.yml b/roles/organizr/molecule/default/molecule.yml new file mode 100644 index 00000000..b9bf48dc --- /dev/null +++ b/roles/organizr/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + organizr_enabled: true diff --git a/roles/organizr/molecule/default/side_effect.yml b/roles/organizr/molecule/default/side_effect.yml new file mode 100644 index 00000000..06e293f3 --- /dev/null +++ b/roles/organizr/molecule/default/side_effect.yml @@ -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: + organizr_enabled: false diff --git a/roles/organizr/molecule/default/verify.yml b/roles/organizr/molecule/default/verify.yml new file mode 100644 index 00000000..7777f614 --- /dev/null +++ b/roles/organizr/molecule/default/verify.yml @@ -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 organizr container state + community.docker.docker_container: + name: "{{ organizr_container_name }}" + register: result + + - name: Check if organizr containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/organizr/molecule/default/verify_stopped.yml b/roles/organizr/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..3001c7c5 --- /dev/null +++ b/roles/organizr/molecule/default/verify_stopped.yml @@ -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 organizr + community.docker.docker_container: + name: "{{ organizr_container_name }}" + state: absent + register: result + + - name: Check if organizr is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/organizr/tasks/main.yml b/roles/organizr/tasks/main.yml index a6e197b3..9c1d97c5 100644 --- a/roles/organizr/tasks/main.yml +++ b/roles/organizr/tasks/main.yml @@ -1,31 +1,43 @@ --- -- name: Create Organizr Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ organizr_data_directory }}" +- name: Start Organizr + block: + - name: Create Organizr Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ organizr_data_directory }}" -- name: Create Organizr container - docker_container: - name: organizr - image: organizr/organizr:latest - pull: true - volumes: - - "{{ organizr_data_directory }}:/config:rw" - env: - PUID: "{{ organizr_user_id }}" - PGID: "{{ organizr_group_id }}" - TZ: "{{ ansible_nas_timezone }}" - ports: - - "{{ organizr_port_http }}:80" - - "{{ organizr_port_https }}:443" - restart_policy: unless-stopped - memory: "{{ organizr_memory }}" - labels: - traefik.enable: "{{ organizr_available_externally | string }}" - traefik.http.routers.organizr.rule: "Host(`{{ organizr_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.organizr.tls.certresolver: "letsencrypt" - traefik.http.routers.organizr.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.organizr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.organizr.loadbalancer.server.port: "80" + - name: Create Organizr container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ organizr_container_name }}" + image: "{{ organizr_image_name }}:{{ organizr_image_version }}" + pull: true + volumes: + - "{{ organizr_data_directory }}:/config:rw" + env: + PUID: "{{ organizr_user_id }}" + PGID: "{{ organizr_group_id }}" + TZ: "{{ ansible_nas_timezone }}" + ports: + - "{{ organizr_port_http }}:80" + - "{{ organizr_port_https }}:443" + restart_policy: unless-stopped + memory: "{{ organizr_memory }}" + labels: + traefik.enable: "{{ organizr_available_externally | string }}" + traefik.http.routers.organizr.rule: "Host(`{{ organizr_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.organizr.tls.certresolver: "letsencrypt" + traefik.http.routers.organizr.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.organizr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.organizr.loadbalancer.server.port: "80" + when: organizr_enabled is true + +- name: Stop Organizr + block: + - name: Stop Organizr + community.docker.docker_container: + name: "{{ organizr_container_name }}" + state: absent + when: organizr_enabled is false diff --git a/roles/overseerr/defaults/main.yml b/roles/overseerr/defaults/main.yml index e5b14a41..6a051e09 100644 --- a/roles/overseerr/defaults/main.yml +++ b/roles/overseerr/defaults/main.yml @@ -5,7 +5,10 @@ overseerr_available_externally: false # directories overseerr_data_directory: "{{ docker_home }}/overseerr" -# uid / gid +# docker +overseerr_container_name: "overseerr" +overseerr_image_name: "sctx/overseerr" +overseerr_image_version: "latest" overseerr_user_id: "1000" overseerr_group_id: "1000" diff --git a/roles/overseerr/docs/overseerr.md b/roles/overseerr/docs/overseerr.md new file mode 100644 index 00000000..8a017edb --- /dev/null +++ b/roles/overseerr/docs/overseerr.md @@ -0,0 +1,13 @@ +# Overseerr + + Homepage: + + Docker Container: + + Overseerr is a free and open source software application for managing requests for your media library. It integrates with your existing services, such as Sonarr, Radarr, and Plex! + +## Usage + + Using overseerr: Set `overseerr_enabled: true` in your `inventories//nas.yml` file. + + The overseerr web interface can be found at . diff --git a/roles/overseerr/molecule/default/molecule.yml b/roles/overseerr/molecule/default/molecule.yml new file mode 100644 index 00000000..c63d2109 --- /dev/null +++ b/roles/overseerr/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + overseerr_enabled: true diff --git a/roles/overseerr/molecule/default/side_effect.yml b/roles/overseerr/molecule/default/side_effect.yml new file mode 100644 index 00000000..ced8fa26 --- /dev/null +++ b/roles/overseerr/molecule/default/side_effect.yml @@ -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: + overseerr_enabled: false diff --git a/roles/overseerr/molecule/default/verify.yml b/roles/overseerr/molecule/default/verify.yml new file mode 100644 index 00000000..26215c95 --- /dev/null +++ b/roles/overseerr/molecule/default/verify.yml @@ -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 overseerr container state + community.docker.docker_container: + name: "{{ overseerr_container_name }}" + register: result + + - name: Check if overseerr containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/overseerr/molecule/default/verify_stopped.yml b/roles/overseerr/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..63b0dabc --- /dev/null +++ b/roles/overseerr/molecule/default/verify_stopped.yml @@ -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 overseerr + community.docker.docker_container: + name: "{{ overseerr_container_name }}" + state: absent + register: result + + - name: Check if overseerr is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/overseerr/tasks/main.yml b/roles/overseerr/tasks/main.yml index 1f513875..9af6f942 100644 --- a/roles/overseerr/tasks/main.yml +++ b/roles/overseerr/tasks/main.yml @@ -1,31 +1,43 @@ --- -- name: Create overseerr Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ overseerr_data_directory }}" - - "{{ overseerr_data_directory }}/config" +- name: Start Overseerr + block: + - name: Create Overseerr Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ overseerr_data_directory }}" + - "{{ overseerr_data_directory }}/config" -- name: Overseerr - docker_container: - name: overseerr - image: sctx/overseerr:latest - pull: true - volumes: - - "{{ overseerr_data_directory }}/config:/app/config:rw" - ports: - - "{{ overseerr_webui_port }}:5055" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ overseerr_user_id }}" - PGID: "{{ overseerr_group_id }}" - restart_policy: unless-stopped - memory: "{{ overseerr_memory }}" - labels: - traefik.enable: "{{ overseerr_available_externally | string }}" - traefik.http.routers.overseerr.rule: "Host(`{{ overseerr_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.overseerr.tls.certresolver: "letsencrypt" - traefik.http.routers.overseerr.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.overseerr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.overseerr.loadbalancer.server.port: "5055" + - name: Overseerr + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ overseerr_container_name }}" + image: "{{ overseerr_image_name }}:{{ overseerr_image_version }}" + pull: true + volumes: + - "{{ overseerr_data_directory }}/config:/app/config:rw" + ports: + - "{{ overseerr_webui_port }}:5055" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ overseerr_user_id }}" + PGID: "{{ overseerr_group_id }}" + restart_policy: unless-stopped + memory: "{{ overseerr_memory }}" + labels: + traefik.enable: "{{ overseerr_available_externally | string }}" + traefik.http.routers.overseerr.rule: "Host(`{{ overseerr_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.overseerr.tls.certresolver: "letsencrypt" + traefik.http.routers.overseerr.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.overseerr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.overseerr.loadbalancer.server.port: "5055" + when: overseerr_enabled is true + +- name: Stop Overseerr + block: + - name: Stop Overseerr + community.docker.docker_container: + name: "{{ overseerr_container_name }}" + state: absent + when: overseerr_enabled is false diff --git a/roles/paperless_ng/docs/trilium.md b/roles/paperless_ng/docs/trilium.md new file mode 100644 index 00000000..333cf7fb --- /dev/null +++ b/roles/paperless_ng/docs/trilium.md @@ -0,0 +1,11 @@ +# Trilium + +Homepage: + +A hierarchical note taking application with focus on building large personal knowledge bases. + +## Usage + +Set `trilium_enabled: true` in your `inventories//nas.yml` file. + +Trilium web interface can be found at . diff --git a/roles/paperless_ng/molecule/default/molecule.yml b/roles/paperless_ng/molecule/default/molecule.yml new file mode 100644 index 00000000..91b053f0 --- /dev/null +++ b/roles/paperless_ng/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + trilium_enabled: true diff --git a/roles/paperless_ng/molecule/default/side_effect.yml b/roles/paperless_ng/molecule/default/side_effect.yml new file mode 100644 index 00000000..92e03151 --- /dev/null +++ b/roles/paperless_ng/molecule/default/side_effect.yml @@ -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: + trilium_enabled: false diff --git a/roles/paperless_ng/molecule/default/verify.yml b/roles/paperless_ng/molecule/default/verify.yml new file mode 100644 index 00000000..9080137d --- /dev/null +++ b/roles/paperless_ng/molecule/default/verify.yml @@ -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 trilium container state + community.docker.docker_container: + name: "{{ trilium_container_name }}" + register: result + + - name: Check if trilium containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/paperless_ng/molecule/default/verify_stopped.yml b/roles/paperless_ng/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..e82fff95 --- /dev/null +++ b/roles/paperless_ng/molecule/default/verify_stopped.yml @@ -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 trilium + community.docker.docker_container: + name: "{{ trilium_container_name }}" + state: absent + register: result + + - name: Check if trilium is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/piwigo/docs/trilium.md b/roles/piwigo/docs/trilium.md new file mode 100644 index 00000000..333cf7fb --- /dev/null +++ b/roles/piwigo/docs/trilium.md @@ -0,0 +1,11 @@ +# Trilium + +Homepage: + +A hierarchical note taking application with focus on building large personal knowledge bases. + +## Usage + +Set `trilium_enabled: true` in your `inventories//nas.yml` file. + +Trilium web interface can be found at . diff --git a/roles/piwigo/molecule/default/molecule.yml b/roles/piwigo/molecule/default/molecule.yml new file mode 100644 index 00000000..91b053f0 --- /dev/null +++ b/roles/piwigo/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + trilium_enabled: true diff --git a/roles/piwigo/molecule/default/side_effect.yml b/roles/piwigo/molecule/default/side_effect.yml new file mode 100644 index 00000000..92e03151 --- /dev/null +++ b/roles/piwigo/molecule/default/side_effect.yml @@ -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: + trilium_enabled: false diff --git a/roles/piwigo/molecule/default/verify.yml b/roles/piwigo/molecule/default/verify.yml new file mode 100644 index 00000000..9080137d --- /dev/null +++ b/roles/piwigo/molecule/default/verify.yml @@ -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 trilium container state + community.docker.docker_container: + name: "{{ trilium_container_name }}" + register: result + + - name: Check if trilium containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/piwigo/molecule/default/verify_stopped.yml b/roles/piwigo/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..e82fff95 --- /dev/null +++ b/roles/piwigo/molecule/default/verify_stopped.yml @@ -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 trilium + community.docker.docker_container: + name: "{{ trilium_container_name }}" + state: absent + register: result + + - name: Check if trilium is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/plex/docs/trilium.md b/roles/plex/docs/trilium.md new file mode 100644 index 00000000..333cf7fb --- /dev/null +++ b/roles/plex/docs/trilium.md @@ -0,0 +1,11 @@ +# Trilium + +Homepage: + +A hierarchical note taking application with focus on building large personal knowledge bases. + +## Usage + +Set `trilium_enabled: true` in your `inventories//nas.yml` file. + +Trilium web interface can be found at . diff --git a/roles/plex/molecule/default/molecule.yml b/roles/plex/molecule/default/molecule.yml new file mode 100644 index 00000000..91b053f0 --- /dev/null +++ b/roles/plex/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + trilium_enabled: true diff --git a/roles/plex/molecule/default/side_effect.yml b/roles/plex/molecule/default/side_effect.yml new file mode 100644 index 00000000..92e03151 --- /dev/null +++ b/roles/plex/molecule/default/side_effect.yml @@ -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: + trilium_enabled: false diff --git a/roles/plex/molecule/default/verify.yml b/roles/plex/molecule/default/verify.yml new file mode 100644 index 00000000..9080137d --- /dev/null +++ b/roles/plex/molecule/default/verify.yml @@ -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 trilium container state + community.docker.docker_container: + name: "{{ trilium_container_name }}" + register: result + + - name: Check if trilium containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/plex/molecule/default/verify_stopped.yml b/roles/plex/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..e82fff95 --- /dev/null +++ b/roles/plex/molecule/default/verify_stopped.yml @@ -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 trilium + community.docker.docker_container: + name: "{{ trilium_container_name }}" + state: absent + register: result + + - name: Check if trilium is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/portainer/docs/trilium.md b/roles/portainer/docs/trilium.md new file mode 100644 index 00000000..333cf7fb --- /dev/null +++ b/roles/portainer/docs/trilium.md @@ -0,0 +1,11 @@ +# Trilium + +Homepage: + +A hierarchical note taking application with focus on building large personal knowledge bases. + +## Usage + +Set `trilium_enabled: true` in your `inventories//nas.yml` file. + +Trilium web interface can be found at . diff --git a/roles/portainer/molecule/default/molecule.yml b/roles/portainer/molecule/default/molecule.yml new file mode 100644 index 00000000..91b053f0 --- /dev/null +++ b/roles/portainer/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + trilium_enabled: true diff --git a/roles/portainer/molecule/default/side_effect.yml b/roles/portainer/molecule/default/side_effect.yml new file mode 100644 index 00000000..92e03151 --- /dev/null +++ b/roles/portainer/molecule/default/side_effect.yml @@ -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: + trilium_enabled: false diff --git a/roles/portainer/molecule/default/verify.yml b/roles/portainer/molecule/default/verify.yml new file mode 100644 index 00000000..9080137d --- /dev/null +++ b/roles/portainer/molecule/default/verify.yml @@ -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 trilium container state + community.docker.docker_container: + name: "{{ trilium_container_name }}" + register: result + + - name: Check if trilium containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/portainer/molecule/default/verify_stopped.yml b/roles/portainer/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..e82fff95 --- /dev/null +++ b/roles/portainer/molecule/default/verify_stopped.yml @@ -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 trilium + community.docker.docker_container: + name: "{{ trilium_container_name }}" + state: absent + register: result + + - name: Check if trilium is stopped + ansible.builtin.assert: + that: + - not result.changed From 2cddba35c48178490098b391229bcbc5884a4cfa Mon Sep 17 00:00:00 2001 From: Anarion Date: Fri, 10 Mar 2023 14:18:19 +0100 Subject: [PATCH 04/84] Another batch: from paperless-ng to portainer --- roles/paperless_ng/defaults/main.yml | 18 ++- roles/paperless_ng/docs/paperless_ng.md | 23 +++ roles/paperless_ng/docs/trilium.md | 11 -- .../molecule/default/molecule.yml | 2 +- .../molecule/default/side_effect.yml | 2 +- .../paperless_ng/molecule/default/verify.yml | 20 ++- .../molecule/default/verify_stopped.yml | 20 ++- roles/paperless_ng/tasks/main.yml | 151 +++++++++++------- roles/piwigo/defaults/main.yml | 9 ++ roles/piwigo/docs/piwigo.md | 28 ++++ roles/piwigo/docs/trilium.md | 11 -- roles/piwigo/molecule/default/molecule.yml | 2 +- roles/piwigo/molecule/default/side_effect.yml | 2 +- roles/piwigo/molecule/default/verify.yml | 13 +- .../molecule/default/verify_stopped.yml | 13 +- roles/piwigo/tasks/main.yml | 121 ++++++++------ roles/plex/defaults/main.yml | 5 + roles/plex/docs/plex.md | 16 ++ roles/plex/docs/trilium.md | 11 -- roles/plex/molecule/default/molecule.yml | 2 +- roles/plex/molecule/default/side_effect.yml | 2 +- roles/plex/molecule/default/verify.yml | 6 +- .../plex/molecule/default/verify_stopped.yml | 6 +- roles/plex/tasks/main.yml | 88 +++++----- roles/portainer/defaults/main.yml | 5 + roles/portainer/docs/portainer.md | 9 ++ roles/portainer/docs/trilium.md | 11 -- roles/portainer/molecule/default/molecule.yml | 2 +- .../molecule/default/side_effect.yml | 2 +- roles/portainer/molecule/default/verify.yml | 6 +- .../molecule/default/verify_stopped.yml | 6 +- roles/portainer/tasks/main.yml | 64 +++++--- 32 files changed, 434 insertions(+), 253 deletions(-) create mode 100644 roles/paperless_ng/docs/paperless_ng.md delete mode 100644 roles/paperless_ng/docs/trilium.md create mode 100644 roles/piwigo/docs/piwigo.md delete mode 100644 roles/piwigo/docs/trilium.md create mode 100644 roles/plex/docs/plex.md delete mode 100644 roles/plex/docs/trilium.md create mode 100644 roles/portainer/docs/portainer.md delete mode 100644 roles/portainer/docs/trilium.md diff --git a/roles/paperless_ng/defaults/main.yml b/roles/paperless_ng/defaults/main.yml index fb2a8be6..d7ff6d36 100644 --- a/roles/paperless_ng/defaults/main.yml +++ b/roles/paperless_ng/defaults/main.yml @@ -1,5 +1,6 @@ --- paperless_ng_enabled: false +paperless_ng_available_externally: false # directories paperless_ng_config_directory: "{{ docker_home }}/paperless_ng" @@ -14,6 +15,7 @@ paperless_ng_consume_directory: "{{ paperless_ng_files_directory }}/consume" # network paperless_ng_port: "16922" paperless_ng_hostname: "paperless_ng" +paperless_ng_network_name: "paperless_ng" # postgres paperless_ng_postgres_db: "paperless" @@ -21,10 +23,18 @@ paperless_ng_postgres_user: "paperless" paperless_ng_postgres_password: "paperless" # container names -paperless_ng_container_network_name: "paperless_ng_network" -paperless_ng_container_name_redis: "paperless_ng_redis" -paperless_ng_container_name_postgres: "paperless_ng_postgres" -paperless_ng_container_name_uiserver: "paperless_ng_uiserver" + +paperless_ng_redis_container_name: "paperless-redis" +paperless_ng_redis_image_name: "redis" +paperless_ng_redis_image_version: "6.0" + +paperless_ng_db_container_name: "paperless-db" +paperless_ng_db_image_name: "postgres" +paperless_ng_db_image_version: "13" + +paperless_ng_uiserver_container_name: "paperless-uiserver" +paperless_ng_uiserver_image_name: "jonaswinkler/paperless-ng" +paperless_ng_uiserver_image_version: "latest" # uid/guid paperless_ng_user_id: "1000" diff --git a/roles/paperless_ng/docs/paperless_ng.md b/roles/paperless_ng/docs/paperless_ng.md new file mode 100644 index 00000000..5adabc31 --- /dev/null +++ b/roles/paperless_ng/docs/paperless_ng.md @@ -0,0 +1,23 @@ +# Paperless-ng + +Homepage: + +Paperless is an application by Daniel Quinn and contributors that indexes your scanned documents and allows you to easily search for documents and store metadata alongside your documents. + +Paperless-ng is a fork of the original project, adding a new interface and many other changes under the hood + +## Usage + +Set `paperless_ng_enabled: true` in your `inventories//nas.yml` file. + +The paperless-ng web interface can be found at . + +### Create the superuser + +To be able to login, you will need a super user. To create it, execute the following command: + +```bash +docker exec -it paperless_ng_uiserver python manage.py createsuperuser +``` + +This will prompt you to set a username, an optional e-mail address and finally a password (at least 8 characters). diff --git a/roles/paperless_ng/docs/trilium.md b/roles/paperless_ng/docs/trilium.md deleted file mode 100644 index 333cf7fb..00000000 --- a/roles/paperless_ng/docs/trilium.md +++ /dev/null @@ -1,11 +0,0 @@ -# Trilium - -Homepage: - -A hierarchical note taking application with focus on building large personal knowledge bases. - -## Usage - -Set `trilium_enabled: true` in your `inventories//nas.yml` file. - -Trilium web interface can be found at . diff --git a/roles/paperless_ng/molecule/default/molecule.yml b/roles/paperless_ng/molecule/default/molecule.yml index 91b053f0..e009fab6 100644 --- a/roles/paperless_ng/molecule/default/molecule.yml +++ b/roles/paperless_ng/molecule/default/molecule.yml @@ -3,4 +3,4 @@ provisioner: inventory: group_vars: all: - trilium_enabled: true + paperless_ng_enabled: true diff --git a/roles/paperless_ng/molecule/default/side_effect.yml b/roles/paperless_ng/molecule/default/side_effect.yml index 92e03151..5a9810b7 100644 --- a/roles/paperless_ng/molecule/default/side_effect.yml +++ b/roles/paperless_ng/molecule/default/side_effect.yml @@ -7,4 +7,4 @@ ansible.builtin.include_role: name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" vars: - trilium_enabled: false + paperless_ng_enabled: false diff --git a/roles/paperless_ng/molecule/default/verify.yml b/roles/paperless_ng/molecule/default/verify.yml index 9080137d..500fae12 100644 --- a/roles/paperless_ng/molecule/default/verify.yml +++ b/roles/paperless_ng/molecule/default/verify.yml @@ -7,13 +7,27 @@ ansible.builtin.include_vars: file: ../../defaults/main.yml - - name: Get trilium container state + - name: Get paperless_ng redis container state community.docker.docker_container: - name: "{{ trilium_container_name }}" + name: "{{ paperless_ng_redis_container_name }}" + register: result_redis + + - name: Get paperless_ng db container state + community.docker.docker_container: + name: "{{ paperless_ng_db_container_name }}" + register: result_db + + - name: Get paperless_ng container state + community.docker.docker_container: + name: "{{ paperless_ng_uiserver_container_name }}" register: result - - name: Check if trilium containers are running + - name: Check if paperless_ng containers are running ansible.builtin.assert: that: + - result_redis.container['State']['Status'] == "running" + - result_redis.container['State']['Restarting'] == false + - result_db.container['State']['Status'] == "running" + - result_db.container['State']['Restarting'] == false - result.container['State']['Status'] == "running" - result.container['State']['Restarting'] == false diff --git a/roles/paperless_ng/molecule/default/verify_stopped.yml b/roles/paperless_ng/molecule/default/verify_stopped.yml index e82fff95..24f87932 100644 --- a/roles/paperless_ng/molecule/default/verify_stopped.yml +++ b/roles/paperless_ng/molecule/default/verify_stopped.yml @@ -7,13 +7,27 @@ ansible.builtin.include_vars: file: ../../defaults/main.yml - - name: Try and stop and remove trilium + - name: Try and stop and remove paperless_ng community.docker.docker_container: - name: "{{ trilium_container_name }}" + name: "{{ paperless_ng_uiserver_container_name }}" state: absent register: result - - name: Check if trilium is stopped + - name: Try and stop and remove paperless_ng db + community.docker.docker_container: + name: "{{ paperless_ng_db_container_name }}" + state: absent + register: result_db + + - name: Try and stop and remove paperless_ng redis + community.docker.docker_container: + name: "{{ paperless_ng_redis_container_name }}" + state: absent + register: result_redis + + - name: Check if paperless_ng is stopped ansible.builtin.assert: that: - not result.changed + - not result_db.changed + - not result_redis.changed diff --git a/roles/paperless_ng/tasks/main.yml b/roles/paperless_ng/tasks/main.yml index fe3cedb6..bca48846 100644 --- a/roles/paperless_ng/tasks/main.yml +++ b/roles/paperless_ng/tasks/main.yml @@ -1,67 +1,96 @@ --- -- name: Create paperless_ng directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ paperless_ng_config_directory }}" - - "{{ paperless_ng_files_directory }}" - - "{{ paperless_ng_postgres_directory }}" - - "{{ paperless_ng_data_directory }}" - - "{{ paperless_ng_export_directory }}" - - "{{ paperless_ng_media_directory }}" - - "{{ paperless_ng_consume_directory }}" +- name: Start paperless_ng + block: + - name: Create paperless_ng directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ paperless_ng_config_directory }}" + - "{{ paperless_ng_files_directory }}" + - "{{ paperless_ng_postgres_directory }}" + - "{{ paperless_ng_data_directory }}" + - "{{ paperless_ng_export_directory }}" + - "{{ paperless_ng_media_directory }}" + - "{{ paperless_ng_consume_directory }}" + - name: Create paperless_ng network + community.docker.docker_network: + name: "{{ paperless_ng_network_name }}" -- name: Create paperless_ng network - docker_network: - name: "{{ paperless_ng_container_network_name }}" + - name: Create paperless_ng redis broker + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ paperless_ng_redis_container_name }}" + image: "{{ paperless_ng_redis_image_name }}:{{ paperless_ng_redis_image_version }}" + pull: true + restart_policy: unless-stopped + memory: "{{ paperless_ng_redis_memory }}" + networks: + - name: "{{ paperless_ng_network_name }}" + network_mode: "{{ paperless_ng_network_name }}" -- name: Create paperless_ng redis broker - docker_container: - name: "{{ paperless_ng_container_name_redis }}" - image: redis:6.0 - pull: true - restart_policy: unless-stopped - memory: "{{ paperless_ng_redis_memory }}" - networks: - - name: "{{ paperless_ng_container_network_name }}" + - name: Create paperless_ng postgres Docker Container + community.docker.docker_container: + name: "{{ paperless_ng_db_container_name }}" + image: "{{ paperless_ng_db_image_name }}:{{ paperless_ng_db_image_version }}" + pull: true + volumes: + - "{{ paperless_ng_postgres_directory }}:/var/lib/postgresql/data" + env: + POSTGRES_DB: "{{ paperless_ng_postgres_db }}" + POSTGRES_USER: "{{ paperless_ng_postgres_user }}" + POSTGRES_PASSWORD: "{{ paperless_ng_postgres_password }}" + restart_policy: unless-stopped + memory: "{{ paperless_ng_postgres_memory }}" + networks: + - name: "{{ paperless_ng_network_name }}" + network_mode: "{{ paperless_ng_network_name }}" -- name: Create paperless_ng postgres Docker Container - docker_container: - name: "{{ paperless_ng_container_name_postgres }}" - image: postgres:13 - pull: true - volumes: - - "{{ paperless_ng_postgres_directory }}:/var/lib/postgresql/data" - env: - POSTGRES_DB: "{{ paperless_ng_postgres_db }}" - POSTGRES_USER: "{{ paperless_ng_postgres_user }}" - POSTGRES_PASSWORD: "{{ paperless_ng_postgres_password }}" - restart_policy: unless-stopped - memory: "{{ paperless_ng_postgres_memory }}" - networks: - - name: "{{ paperless_ng_container_network_name }}" + - name: Create paperless_ng UI Docker Container + community.docker.docker_container: + name: "{{ paperless_ng_uiserver_container_name }}" + image: "{{ paperless_ng_uiserver_image_name }}:{{ paperless_ng_uiserver_image_version }}" + pull: true + volumes: + - "{{ paperless_ng_data_directory }}:/usr/src/paperless/data" + - "{{ paperless_ng_media_directory }}:/usr/src/paperless/media" + - "{{ paperless_ng_export_directory }}:/usr/src/paperless/export" + - "{{ paperless_ng_consume_directory }}:/usr/src/paperless/consume" + ports: + - "{{ paperless_ng_port }}:8000" + env: + PAPERLESS_REDIS: "redis://{{ paperless_ng_redis_container_name | string }}:6379" + PAPERLESS_DBHOST: "{{ paperless_ng_db_container_name | string }}" + USERMAP_UID: "{{ paperless_ng_user_id }}" + USERMAP_GID: "{{ paperless_ng_group_id }}" + PAPERLESS_OCR_LANGUAGES: "{{ paperless_ng_languages }}" + restart_policy: unless-stopped + memory: "{{ paperless_ng_ui_memory }}" + networks: + - name: "{{ paperless_ng_network_name }}" + network_mode: "{{ paperless_ng_network_name }}" + labels: + traefik.enable: "{{ paperless_ng_available_externally | string }}" + traefik.http.routers.paperless_ng.rule: "Host(`{{ paperless_ng_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.paperless_ng.tls.certresolver: "letsencrypt" + traefik.http.routers.paperless_ng.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.paperless_ng.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.paperless_ng.loadbalancer.server.port: "8080" + when: paperless_ng_enabled is true -- name: Create paperless_ng UI Docker Container - docker_container: - name: "{{ paperless_ng_container_name_uiserver }}" - image: jonaswinkler/paperless-ng:latest - pull: true - volumes: - - "{{ paperless_ng_data_directory }}:/usr/src/paperless/data" - - "{{ paperless_ng_media_directory }}:/usr/src/paperless/media" - - "{{ paperless_ng_export_directory }}:/usr/src/paperless/export" - - "{{ paperless_ng_consume_directory }}:/usr/src/paperless/consume" - ports: - - "{{ paperless_ng_port }}:8000" - env: - PAPERLESS_REDIS: "redis://{{ paperless_ng_container_name_redis | string }}:6379" - PAPERLESS_DBHOST: "{{ paperless_ng_container_name_postgres | string }}" - USERMAP_UID: "{{ paperless_ng_user_id }}" - USERMAP_GID: "{{ paperless_ng_group_id }}" - PAPERLESS_OCR_LANGUAGES: "{{ paperless_ng_languages }}" - restart_policy: unless-stopped - memory: "{{ paperless_ng_ui_memory }}" - networks: - - name: "{{ paperless_ng_container_network_name }}" +- name: Stop paperless_ng + block: + - name: Stop paperless_ng + community.docker.docker_container: + name: "{{ paperless_ng_uiserver_container_name }}" + state: absent + - name: Stop paperless_ng redis + community.docker.docker_container: + name: "{{ paperless_ng_redis_container_name }}" + state: absent + - name: Stop paperless_ng db + community.docker.docker_container: + name: "{{ paperless_ng_db_container_name }}" + state: absent + when: paperless_ng_enabled is false diff --git a/roles/piwigo/defaults/main.yml b/roles/piwigo/defaults/main.yml index 82a9add6..efdcfd7c 100644 --- a/roles/piwigo/defaults/main.yml +++ b/roles/piwigo/defaults/main.yml @@ -18,8 +18,17 @@ piwigo_photos_permission: "rw" # network piwigo_hostname: "piwigo" +piwigo_network_name: "piwigo" piwigo_port: "16923" +# docker +piwigo_db_container_name: "piwigo-db" +piwigo_db_image_name: "mysql" +piwigo_db_image_version: "5.7" +piwigo_container_name: "piwigo" +piwigo_image_name: "linuxserver/piwigo" +piwigo_image_version: "latest" + # specs piwigo_memory: "1g" piwigo_mysql_memory: "1g" diff --git a/roles/piwigo/docs/piwigo.md b/roles/piwigo/docs/piwigo.md new file mode 100644 index 00000000..f691ba27 --- /dev/null +++ b/roles/piwigo/docs/piwigo.md @@ -0,0 +1,28 @@ +# Piwigo + +Homepage: [Piwigo.org](https://piwigo.org) + +Piwigo is open source photo gallery software for the web. Designed for organisations, teams and individuals. + +## Usage + +Set `piwigo_enabled: true` in your `inventories//nas.yml` file. + +If you want to access Piwigo externally, set `piwigo_available_externally: true` in your `inventories//nas.yml` file. + +The Piwigo web interface can be found at . + +## Specific Configuration + +Optional configurations: + +- Set `piwigo_mysql_user` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". +- Set `piwigo_mysql_password` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". +- Set `piwigo_mysql_root_password` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". + +- On first run you'll need to enter database details: + - Host: `db:3306` + - Username: the value of piwigo_mysql_user, defaults to "piwigo" + - Password: the value of piwigo_password, defaults to "piwigo" + - Database Name: `piwigo` + - Database tables prefix: should be prefilled with `piwigo_` diff --git a/roles/piwigo/docs/trilium.md b/roles/piwigo/docs/trilium.md deleted file mode 100644 index 333cf7fb..00000000 --- a/roles/piwigo/docs/trilium.md +++ /dev/null @@ -1,11 +0,0 @@ -# Trilium - -Homepage: - -A hierarchical note taking application with focus on building large personal knowledge bases. - -## Usage - -Set `trilium_enabled: true` in your `inventories//nas.yml` file. - -Trilium web interface can be found at . diff --git a/roles/piwigo/molecule/default/molecule.yml b/roles/piwigo/molecule/default/molecule.yml index 91b053f0..33909c29 100644 --- a/roles/piwigo/molecule/default/molecule.yml +++ b/roles/piwigo/molecule/default/molecule.yml @@ -3,4 +3,4 @@ provisioner: inventory: group_vars: all: - trilium_enabled: true + piwigo_enabled: true diff --git a/roles/piwigo/molecule/default/side_effect.yml b/roles/piwigo/molecule/default/side_effect.yml index 92e03151..b100aed6 100644 --- a/roles/piwigo/molecule/default/side_effect.yml +++ b/roles/piwigo/molecule/default/side_effect.yml @@ -7,4 +7,4 @@ ansible.builtin.include_role: name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" vars: - trilium_enabled: false + piwigo_enabled: false diff --git a/roles/piwigo/molecule/default/verify.yml b/roles/piwigo/molecule/default/verify.yml index 9080137d..32343069 100644 --- a/roles/piwigo/molecule/default/verify.yml +++ b/roles/piwigo/molecule/default/verify.yml @@ -7,13 +7,20 @@ ansible.builtin.include_vars: file: ../../defaults/main.yml - - name: Get trilium container state + - name: Get piwigo db container state community.docker.docker_container: - name: "{{ trilium_container_name }}" + name: "{{ piwigo_db_container_name }}" + register: result_db + + - name: Get piwigo container state + community.docker.docker_container: + name: "{{ piwigo_container_name }}" register: result - - name: Check if trilium containers are running + - name: Check if piwigo containers are running ansible.builtin.assert: that: - result.container['State']['Status'] == "running" - result.container['State']['Restarting'] == false + - result_db.container['State']['Status'] == "running" + - result_db.container['State']['Restarting'] == false diff --git a/roles/piwigo/molecule/default/verify_stopped.yml b/roles/piwigo/molecule/default/verify_stopped.yml index e82fff95..750ae3d4 100644 --- a/roles/piwigo/molecule/default/verify_stopped.yml +++ b/roles/piwigo/molecule/default/verify_stopped.yml @@ -7,13 +7,20 @@ ansible.builtin.include_vars: file: ../../defaults/main.yml - - name: Try and stop and remove trilium + - name: Try and stop and remove piwigo community.docker.docker_container: - name: "{{ trilium_container_name }}" + name: "{{ piwigo_container_name }}" state: absent register: result - - name: Check if trilium is stopped + - name: Try and stop and remove piwigo db + community.docker.docker_container: + name: "{{ piwigo_db_container_name }}" + state: absent + register: result_db + + - name: Check if piwigo is stopped ansible.builtin.assert: that: - not result.changed + - not result_db.changed diff --git a/roles/piwigo/tasks/main.yml b/roles/piwigo/tasks/main.yml index 67c02ea9..9c5dd0de 100644 --- a/roles/piwigo/tasks/main.yml +++ b/roles/piwigo/tasks/main.yml @@ -1,51 +1,76 @@ --- -- name: Create Piwigo Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ piwigo_config_directory }}" - - "{{ piwigo_data_directory }}" - - "{{ piwigo_photos }}" +- name: Start Piwigo + block: + - name: Create Piwigo Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ piwigo_config_directory }}" + - "{{ piwigo_data_directory }}" + - "{{ piwigo_photos }}" -- name: Create MySQL container for Piwigo - docker_container: - name: piwigo-mysql - image: mysql:5.7 - pull: true - volumes: - - "{{ piwigo_data_directory }}/mysql:/var/lib/mysql:rw" - env: - MYSQL_DATABASE: "piwigo" - MYSQL_USER: "{{ piwigo_mysql_user }}" - MYSQL_PASSWORD: "{{ piwigo_mysql_password }}" - MYSQL_ROOT_PASSWORD: "{{ piwigo_mysql_root_password }}" - restart_policy: unless-stopped - memory: "{{ piwigo_mysql_memory }}" + - name: Create Piwigo network + community.docker.docker_network: + name: "{{ piwigo_network_name }}" -- name: Piwigo Docker Container - docker_container: - name: piwigo - image: linuxserver/piwigo - pull: true - volumes: - - "{{ piwigo_config_directory }}:/config:rw" - - "{{ piwigo_photos }}:/gallery:rw" - links: - - piwigo-mysql:db - ports: - - "{{ piwigo_port }}:80" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ piwigo_user_id }}" - PGID: "{{ piwigo_group_id }}" - VERSION: "{{ piwigo_version }}" - restart_policy: unless-stopped - memory: "{{ piwigo_memory }}" - labels: - traefik.enable: "{{ piwigo_available_externally | string }}" - traefik.http.routers.piwigo.rule: "Host(`{{ piwigo_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.piwigo.tls.certresolver: "letsencrypt" - traefik.http.routers.piwigo.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.piwigo.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.piwigo.loadbalancer.server.port: "80" + - name: Create MySQL container for Piwigo + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ piwigo_db_container_name }}" + image: "{{ piwigo_db_image_name }}:{{ piwigo_db_image_version }}" + pull: true + volumes: + - "{{ piwigo_data_directory }}/mysql:/var/lib/mysql:rw" + env: + MYSQL_DATABASE: "piwigo" + MYSQL_USER: "{{ piwigo_mysql_user }}" + MYSQL_PASSWORD: "{{ piwigo_mysql_password }}" + MYSQL_ROOT_PASSWORD: "{{ piwigo_mysql_root_password }}" + restart_policy: unless-stopped + memory: "{{ piwigo_mysql_memory }}" + networks: + - name: "{{ piwigo_network_name }}" + network_mode: "{{ piwigo_network_name }}" + + - name: Piwigo Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ piwigo_container_name }}" + image: "{{ piwigo_image_name }}:{{ piwigo_image_version }}" + pull: true + volumes: + - "{{ piwigo_config_directory }}:/config:rw" + - "{{ piwigo_photos }}:/gallery:rw" + ports: + - "{{ piwigo_port }}:80" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ piwigo_user_id }}" + PGID: "{{ piwigo_group_id }}" + VERSION: "{{ piwigo_version }}" + restart_policy: unless-stopped + memory: "{{ piwigo_memory }}" + networks: + - name: "{{ piwigo_network_name }}" + network_mode: "{{ piwigo_network_name }}" + labels: + traefik.enable: "{{ piwigo_available_externally | string }}" + traefik.http.routers.piwigo.rule: "Host(`{{ piwigo_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.piwigo.tls.certresolver: "letsencrypt" + traefik.http.routers.piwigo.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.piwigo.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.piwigo.loadbalancer.server.port: "80" + when: piwigo_enabled is true + +- name: Stop Piwigo + block: + - name: Stop Piwigo + community.docker.docker_container: + name: "{{ piwigo_container_name }}" + state: absent + - name: Stop Piwigo Db + community.docker.docker_container: + name: "{{ piwigo_db_container_name }}" + state: absent + when: piwigo_enabled is false diff --git a/roles/plex/defaults/main.yml b/roles/plex/defaults/main.yml index 220ebb6b..a53135ca 100644 --- a/roles/plex/defaults/main.yml +++ b/roles/plex/defaults/main.yml @@ -28,6 +28,11 @@ plex_audiobooks_permissions: "rw" # network plex_hostname: "plex" +# docker +plex_container_name: "plex" +plex_image_name: "linuxserver/plex" +plex_image_version: "latest" + # specs plex_memory: "2g" diff --git a/roles/plex/docs/plex.md b/roles/plex/docs/plex.md new file mode 100644 index 00000000..be9a37e0 --- /dev/null +++ b/roles/plex/docs/plex.md @@ -0,0 +1,16 @@ +# Plex + +Homepage: + +Plex is a personal media server that also provides access to several external movie, web show, and podcast services. Allows you to stream music too. Apps for many devices, including e.g. chromecast integration. + +## Usage + +Set `plex_enabled: true` in your `inventories//nas.yml` file. + +The Plex web interface can be found at . + +## Specific Configuration + +You'll need to log in with a plex account, (or possibly claim your server). +You'll need to set up your local file store - go to settings > Manage > Libraries, and add your libraries. These are mounted in the root directory by default. diff --git a/roles/plex/docs/trilium.md b/roles/plex/docs/trilium.md deleted file mode 100644 index 333cf7fb..00000000 --- a/roles/plex/docs/trilium.md +++ /dev/null @@ -1,11 +0,0 @@ -# Trilium - -Homepage: - -A hierarchical note taking application with focus on building large personal knowledge bases. - -## Usage - -Set `trilium_enabled: true` in your `inventories//nas.yml` file. - -Trilium web interface can be found at . diff --git a/roles/plex/molecule/default/molecule.yml b/roles/plex/molecule/default/molecule.yml index 91b053f0..4611624d 100644 --- a/roles/plex/molecule/default/molecule.yml +++ b/roles/plex/molecule/default/molecule.yml @@ -3,4 +3,4 @@ provisioner: inventory: group_vars: all: - trilium_enabled: true + plex_enabled: true diff --git a/roles/plex/molecule/default/side_effect.yml b/roles/plex/molecule/default/side_effect.yml index 92e03151..597eb871 100644 --- a/roles/plex/molecule/default/side_effect.yml +++ b/roles/plex/molecule/default/side_effect.yml @@ -7,4 +7,4 @@ ansible.builtin.include_role: name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" vars: - trilium_enabled: false + plex_enabled: false diff --git a/roles/plex/molecule/default/verify.yml b/roles/plex/molecule/default/verify.yml index 9080137d..d971c288 100644 --- a/roles/plex/molecule/default/verify.yml +++ b/roles/plex/molecule/default/verify.yml @@ -7,12 +7,12 @@ ansible.builtin.include_vars: file: ../../defaults/main.yml - - name: Get trilium container state + - name: Get plex container state community.docker.docker_container: - name: "{{ trilium_container_name }}" + name: "{{ plex_container_name }}" register: result - - name: Check if trilium containers are running + - name: Check if plex containers are running ansible.builtin.assert: that: - result.container['State']['Status'] == "running" diff --git a/roles/plex/molecule/default/verify_stopped.yml b/roles/plex/molecule/default/verify_stopped.yml index e82fff95..37859b3c 100644 --- a/roles/plex/molecule/default/verify_stopped.yml +++ b/roles/plex/molecule/default/verify_stopped.yml @@ -7,13 +7,13 @@ ansible.builtin.include_vars: file: ../../defaults/main.yml - - name: Try and stop and remove trilium + - name: Try and stop and remove plex community.docker.docker_container: - name: "{{ trilium_container_name }}" + name: "{{ plex_container_name }}" state: absent register: result - - name: Check if trilium is stopped + - name: Check if plex is stopped ansible.builtin.assert: that: - not result.changed diff --git a/roles/plex/tasks/main.yml b/roles/plex/tasks/main.yml index b22961a8..7597d22c 100644 --- a/roles/plex/tasks/main.yml +++ b/roles/plex/tasks/main.yml @@ -1,40 +1,52 @@ --- -- name: Create Plex Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ plex_config_directory }}" - - "{{ plex_logs }}" +- name: Start Plex + block: + - name: Create Plex Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ plex_config_directory }}" + - "{{ plex_logs }}" -- name: Create Plex Docker Container - docker_container: - name: plex - image: linuxserver/plex - pull: true - volumes: - - "{{ plex_config_directory }}:/config:rw" - - "{{ plex_logs }}:/opt/plex/Library/Application Support/Plex Media Server/Logs:rw" - - "{{ plex_movies_directory }}:/movies:{{ plex_movies_permissions }}" - - "{{ plex_tv_directory }}:/tv:{{ plex_tv_permissions }}" - - "{{ plex_photos_directory }}:/photos:{{ plex_photos_permissions }}" - - "{{ plex_podcasts_directory }}:/podcasts:{{ plex_podcasts_permissions }}" - - "{{ plex_music_directory }}:/music:{{ plex_music_permissions }}" - - "{{ plex_audiobooks_directory }}:/audiobooks:{{ plex_audiobooks_permissions }}" - network_mode: "host" - devices: "{{ plex_devices | default(omit) }}" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ plex_user_id }}" - PGID: "{{ plex_group_id }}" - VERSION: "{{ plex_version }}" - restart_policy: unless-stopped - memory: "{{ plex_memory }}" - labels: - traefik.enable: "{{ plex_available_externally | string }}" - traefik.http.routers.plex.rule: "Host(`{{ plex_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.plex.tls.certresolver: "letsencrypt" - traefik.http.routers.plex.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.plex.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.plex.loadbalancer.server.port: "32400" + - name: Create Plex Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ plex_container_name }}" + image: "{{ plex_image_name }}:{{ plex_image_version }}" + pull: true + volumes: + - "{{ plex_config_directory }}:/config:rw" + - "{{ plex_logs }}:/opt/plex/Library/Application Support/Plex Media Server/Logs:rw" + - "{{ plex_movies_directory }}:/movies:{{ plex_movies_permissions }}" + - "{{ plex_tv_directory }}:/tv:{{ plex_tv_permissions }}" + - "{{ plex_photos_directory }}:/photos:{{ plex_photos_permissions }}" + - "{{ plex_podcasts_directory }}:/podcasts:{{ plex_podcasts_permissions }}" + - "{{ plex_music_directory }}:/music:{{ plex_music_permissions }}" + - "{{ plex_audiobooks_directory }}:/audiobooks:{{ plex_audiobooks_permissions }}" + network_mode: "host" + devices: "{{ plex_devices | default(omit) }}" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ plex_user_id }}" + PGID: "{{ plex_group_id }}" + VERSION: "{{ plex_version }}" + restart_policy: unless-stopped + memory: "{{ plex_memory }}" + labels: + traefik.enable: "{{ plex_available_externally | string }}" + traefik.http.routers.plex.rule: "Host(`{{ plex_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.plex.tls.certresolver: "letsencrypt" + traefik.http.routers.plex.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.plex.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.plex.loadbalancer.server.port: "32400" + when: plex_enabled is true + +- name: Stop Plex + block: + - name: Stop Plex + community.docker.docker_container: + name: "{{ plex_container_name }}" + state: absent + when: plex_enabled is false diff --git a/roles/portainer/defaults/main.yml b/roles/portainer/defaults/main.yml index 7c3443d6..e5dd8138 100644 --- a/roles/portainer/defaults/main.yml +++ b/roles/portainer/defaults/main.yml @@ -9,5 +9,10 @@ portainer_data_directory: "{{ docker_home }}/portainer/config" portainer_port: "9000" portainer_hostname: "portainer" +# docker +portainer_container_name: "portainer" +portainer_image_name: "portainer/portainer-ce" +portainer_image_version: "latest" + # specs portainer_memory: 1g diff --git a/roles/portainer/docs/portainer.md b/roles/portainer/docs/portainer.md new file mode 100644 index 00000000..d9d9fe77 --- /dev/null +++ b/roles/portainer/docs/portainer.md @@ -0,0 +1,9 @@ +# Portainer + +Homepage: + +## Usage + +Set `portainer_enabled: true` in your `inventories//nas.yml` file. + +The Portainer web interface can be found at . diff --git a/roles/portainer/docs/trilium.md b/roles/portainer/docs/trilium.md deleted file mode 100644 index 333cf7fb..00000000 --- a/roles/portainer/docs/trilium.md +++ /dev/null @@ -1,11 +0,0 @@ -# Trilium - -Homepage: - -A hierarchical note taking application with focus on building large personal knowledge bases. - -## Usage - -Set `trilium_enabled: true` in your `inventories//nas.yml` file. - -Trilium web interface can be found at . diff --git a/roles/portainer/molecule/default/molecule.yml b/roles/portainer/molecule/default/molecule.yml index 91b053f0..9c88debc 100644 --- a/roles/portainer/molecule/default/molecule.yml +++ b/roles/portainer/molecule/default/molecule.yml @@ -3,4 +3,4 @@ provisioner: inventory: group_vars: all: - trilium_enabled: true + portainer_enabled: true diff --git a/roles/portainer/molecule/default/side_effect.yml b/roles/portainer/molecule/default/side_effect.yml index 92e03151..db6a99fb 100644 --- a/roles/portainer/molecule/default/side_effect.yml +++ b/roles/portainer/molecule/default/side_effect.yml @@ -7,4 +7,4 @@ ansible.builtin.include_role: name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" vars: - trilium_enabled: false + portainer_enabled: false diff --git a/roles/portainer/molecule/default/verify.yml b/roles/portainer/molecule/default/verify.yml index 9080137d..a53be8a4 100644 --- a/roles/portainer/molecule/default/verify.yml +++ b/roles/portainer/molecule/default/verify.yml @@ -7,12 +7,12 @@ ansible.builtin.include_vars: file: ../../defaults/main.yml - - name: Get trilium container state + - name: Get portainer container state community.docker.docker_container: - name: "{{ trilium_container_name }}" + name: "{{ portainer_container_name }}" register: result - - name: Check if trilium containers are running + - name: Check if portainer containers are running ansible.builtin.assert: that: - result.container['State']['Status'] == "running" diff --git a/roles/portainer/molecule/default/verify_stopped.yml b/roles/portainer/molecule/default/verify_stopped.yml index e82fff95..5add0bf7 100644 --- a/roles/portainer/molecule/default/verify_stopped.yml +++ b/roles/portainer/molecule/default/verify_stopped.yml @@ -7,13 +7,13 @@ ansible.builtin.include_vars: file: ../../defaults/main.yml - - name: Try and stop and remove trilium + - name: Try and stop and remove portainer community.docker.docker_container: - name: "{{ trilium_container_name }}" + name: "{{ portainer_container_name }}" state: absent register: result - - name: Check if trilium is stopped + - name: Check if portainer is stopped ansible.builtin.assert: that: - not result.changed diff --git a/roles/portainer/tasks/main.yml b/roles/portainer/tasks/main.yml index d49f1e78..665f8483 100644 --- a/roles/portainer/tasks/main.yml +++ b/roles/portainer/tasks/main.yml @@ -1,28 +1,40 @@ --- -- name: Create Portainer Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ portainer_data_directory }}" +- name: Start Portainer + block: + - name: Create Portainer Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ portainer_data_directory }}" -- name: Portainer Docker Container - docker_container: - name: portainer - image: portainer/portainer-ce - pull: true - volumes: - - "{{ portainer_data_directory }}:/data:rw" - - "/var/run/docker.sock:/var/run/docker.sock:ro" - - "/etc/timezone:/etc/timezone:ro" - ports: - - "{{ portainer_port }}:9000" - restart_policy: unless-stopped - memory: "{{ portainer_memory }}" - labels: - traefik.enable: "{{ portainer_available_externally | string }}" - traefik.http.routers.portainer.rule: "Host(`{{ portainer_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.portainer.tls.certresolver: "letsencrypt" - traefik.http.routers.portainer.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.portainer.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.portainer.loadbalancer.server.port: "9000" + - name: Portainer Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ portainer_container_name }}" + image: "{{ portainer_image_name }}:{{ portainer_image_version }}" + pull: true + volumes: + - "{{ portainer_data_directory }}:/data:rw" + - "/var/run/docker.sock:/var/run/docker.sock:ro" + - "/etc/timezone:/etc/timezone:ro" + ports: + - "{{ portainer_port }}:9000" + restart_policy: unless-stopped + memory: "{{ portainer_memory }}" + labels: + traefik.enable: "{{ portainer_available_externally | string }}" + traefik.http.routers.portainer.rule: "Host(`{{ portainer_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.portainer.tls.certresolver: "letsencrypt" + traefik.http.routers.portainer.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.portainer.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.portainer.loadbalancer.server.port: "9000" + when: portainer_enabled is true + +- name: Stop Portainer + block: + - name: Stop Portainer + community.docker.docker_container: + name: "{{ portainer_container_name }}" + state: absent + when: portainer_enabled is false From cf77fb6e5781621dae8ff888db7edf0c896917ff Mon Sep 17 00:00:00 2001 From: Anarion Date: Fri, 10 Mar 2023 16:07:16 +0100 Subject: [PATCH 05/84] Update Krusader after old image no longer available --- roles/krusader/defaults/main.yml | 15 +++++++++------ roles/krusader/tasks/main.yml | 14 ++++++++------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/roles/krusader/defaults/main.yml b/roles/krusader/defaults/main.yml index c68c4432..11741ae2 100644 --- a/roles/krusader/defaults/main.yml +++ b/roles/krusader/defaults/main.yml @@ -1,9 +1,6 @@ --- krusader_enabled: false -krusader_available_externally: false - -krusader_secure_connection: "0" -krusader_vnc_password: "topsecret" +krusader_available_externally: "false" # uid / gid krusader_user_id: "0" @@ -14,14 +11,20 @@ krusader_config_directory: "{{ docker_home }}/krusader/config" krusader_browse_directory: "/" # network -krusader_port_http: "5800" +krusader_port_http: "6080" krusader_port_vnc: "5900" krusader_hostname: "krusader" # docker krusader_container_name: "krusader" -krusader_image_name: "djaydev/krusader" +krusader_image_name: "binhex/arch-krusader" krusader_image_version: "latest" # specs krusader_memory: 1g + +# krusader +krusader_umask: "000" +krusader_webpage_title: "Tower" +krusader_temp_folder: "/config/krusader/tmp" +krusader_vnc_password: "topsecret" diff --git a/roles/krusader/tasks/main.yml b/roles/krusader/tasks/main.yml index 2832fd38..36b1c5bd 100644 --- a/roles/krusader/tasks/main.yml +++ b/roles/krusader/tasks/main.yml @@ -14,18 +14,20 @@ name: "{{ krusader_container_name }}" image: "{{ krusader_image_name }}:{{ krusader_image_version }}" pull: true + privileged: true volumes: - "{{ krusader_config_directory }}:/config:rw" - "{{ krusader_browse_directory }}:/mnt/fs" ports: - - "{{ krusader_port_http }}:5800" + - "{{ krusader_port_http }}:6080" - "{{ krusader_port_vnc }}:5900" env: - USER_ID: "{{ krusader_user_id }}" - GROUP_ID: "{{ krusader_group_id }}" - SECURE_CONNECTION: "{{ krusader_secure_connection }}" - TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ krusader_user_id }}" + PGID: "{{ krusader_group_id }}" VNC_PASSWORD: "{{ krusader_vnc_password }}" + TEMP_FOLDER: "{{ krusader_temp_folder }}" + WEBPAGE_TITLE: "{{ krusader_webpage_title }}" + UMASK: "{{ krusader_umask }}" restart_policy: unless-stopped memory: "{{ krusader_memory }}" labels: @@ -34,7 +36,7 @@ traefik.http.routers.krusader.tls.certresolver: "letsencrypt" 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" + traefik.http.services.krusader.loadbalancer.server.port: "6080" when: krusader_enabled is true - name: Stop Krusader From d54e1acf3062e7dd11689f0b5f4cc352db0f70c9 Mon Sep 17 00:00:00 2001 From: Anarion Date: Fri, 10 Mar 2023 16:40:33 +0100 Subject: [PATCH 06/84] Another barch: from prowlarr to sickchill --- nas.yml | 20 ----- roles/prowlarr/defaults/main.yml | 5 ++ roles/prowlarr/docs/prowlarr.md | 15 ++++ roles/prowlarr/molecule/default/molecule.yml | 6 ++ .../prowlarr/molecule/default/side_effect.yml | 10 +++ roles/prowlarr/molecule/default/verify.yml | 19 +++++ .../molecule/default/verify_stopped.yml | 19 +++++ roles/prowlarr/tasks/main.yml | 68 ++++++++------- roles/pyload/defaults/main.yml | 5 ++ roles/pyload/docs/pyload.md | 16 ++++ roles/pyload/molecule/default/molecule.yml | 6 ++ roles/pyload/molecule/default/side_effect.yml | 10 +++ roles/pyload/molecule/default/verify.yml | 19 +++++ .../molecule/default/verify_stopped.yml | 19 +++++ roles/pyload/tasks/main.yml | 74 +++++++++------- roles/pytivo/defaults/main.yml | 5 ++ roles/pytivo/docs/pytivo.md | 30 +++++++ roles/pytivo/molecule/default/molecule.yml | 6 ++ roles/pytivo/molecule/default/side_effect.yml | 10 +++ roles/pytivo/molecule/default/verify.yml | 19 +++++ .../molecule/default/verify_stopped.yml | 19 +++++ roles/pytivo/tasks/main.yml | 84 +++++++++++-------- roles/radarr/defaults/main.yml | 5 ++ roles/radarr/docs/radarr.md | 22 +++++ roles/radarr/molecule/default/molecule.yml | 6 ++ roles/radarr/molecule/default/side_effect.yml | 10 +++ roles/radarr/molecule/default/verify.yml | 19 +++++ .../molecule/default/verify_stopped.yml | 19 +++++ roles/radarr/tasks/main.yml | 72 +++++++++------- roles/route53_ddns/defaults/main.yml | 3 + roles/route53_ddns/docs/route53_ddns.md | 40 +++++++++ .../molecule/default/molecule.yml | 19 +++++ .../molecule/default/side_effect.yml | 10 +++ .../route53_ddns/molecule/default/verify.yml | 19 +++++ .../molecule/default/verify_stopped.yml | 19 +++++ roles/route53_ddns/tasks/main.yml | 53 +++++++----- roles/rssbridge/defaults/main.yml | 5 ++ roles/rssbridge/docs/rssbridge.md | 13 +++ roles/rssbridge/molecule/default/molecule.yml | 6 ++ .../molecule/default/side_effect.yml | 10 +++ roles/rssbridge/molecule/default/verify.yml | 19 +++++ .../molecule/default/verify_stopped.yml | 19 +++++ roles/rssbridge/tasks/main.yml | 62 ++++++++------ roles/sabnzbd/defaults/main.yml | 5 ++ roles/sabnzbd/docs/sabnzbd.md | 11 +++ roles/sabnzbd/molecule/default/molecule.yml | 6 ++ .../sabnzbd/molecule/default/side_effect.yml | 10 +++ roles/sabnzbd/molecule/default/verify.yml | 19 +++++ .../molecule/default/verify_stopped.yml | 19 +++++ roles/sabnzbd/tasks/main.yml | 70 +++++++++------- roles/sickchill/defaults/main.yml | 5 ++ roles/sickchill/docs/sickchill.md | 12 +++ roles/sickchill/molecule/default/molecule.yml | 6 ++ .../molecule/default/side_effect.yml | 10 +++ roles/sickchill/molecule/default/verify.yml | 19 +++++ .../molecule/default/verify_stopped.yml | 19 +++++ roles/sickchill/tasks/main.yml | 74 +++++++++------- 57 files changed, 968 insertions(+), 251 deletions(-) create mode 100644 roles/prowlarr/docs/prowlarr.md create mode 100644 roles/prowlarr/molecule/default/molecule.yml create mode 100644 roles/prowlarr/molecule/default/side_effect.yml create mode 100644 roles/prowlarr/molecule/default/verify.yml create mode 100644 roles/prowlarr/molecule/default/verify_stopped.yml create mode 100644 roles/pyload/docs/pyload.md create mode 100644 roles/pyload/molecule/default/molecule.yml create mode 100644 roles/pyload/molecule/default/side_effect.yml create mode 100644 roles/pyload/molecule/default/verify.yml create mode 100644 roles/pyload/molecule/default/verify_stopped.yml create mode 100644 roles/pytivo/docs/pytivo.md create mode 100644 roles/pytivo/molecule/default/molecule.yml create mode 100644 roles/pytivo/molecule/default/side_effect.yml create mode 100644 roles/pytivo/molecule/default/verify.yml create mode 100644 roles/pytivo/molecule/default/verify_stopped.yml create mode 100644 roles/radarr/docs/radarr.md create mode 100644 roles/radarr/molecule/default/molecule.yml create mode 100644 roles/radarr/molecule/default/side_effect.yml create mode 100644 roles/radarr/molecule/default/verify.yml create mode 100644 roles/radarr/molecule/default/verify_stopped.yml create mode 100644 roles/route53_ddns/docs/route53_ddns.md create mode 100644 roles/route53_ddns/molecule/default/molecule.yml create mode 100644 roles/route53_ddns/molecule/default/side_effect.yml create mode 100644 roles/route53_ddns/molecule/default/verify.yml create mode 100644 roles/route53_ddns/molecule/default/verify_stopped.yml create mode 100644 roles/rssbridge/docs/rssbridge.md create mode 100644 roles/rssbridge/molecule/default/molecule.yml create mode 100644 roles/rssbridge/molecule/default/side_effect.yml create mode 100644 roles/rssbridge/molecule/default/verify.yml create mode 100644 roles/rssbridge/molecule/default/verify_stopped.yml create mode 100644 roles/sabnzbd/docs/sabnzbd.md create mode 100644 roles/sabnzbd/molecule/default/molecule.yml create mode 100644 roles/sabnzbd/molecule/default/side_effect.yml create mode 100644 roles/sabnzbd/molecule/default/verify.yml create mode 100644 roles/sabnzbd/molecule/default/verify_stopped.yml create mode 100644 roles/sickchill/docs/sickchill.md create mode 100644 roles/sickchill/molecule/default/molecule.yml create mode 100644 roles/sickchill/molecule/default/side_effect.yml create mode 100644 roles/sickchill/molecule/default/verify.yml create mode 100644 roles/sickchill/molecule/default/verify_stopped.yml diff --git a/nas.yml b/nas.yml index a4d2e434..7833c0b0 100644 --- a/nas.yml +++ b/nas.yml @@ -220,22 +220,18 @@ - role: navidrome tags: - navidrome - when: (navidrome_enabled | default(False)) - role: netbootxyz tags: - netbootxyz - when: (netbootxyz_enabled | default(False)) - role: netdata tags: - netdata - when: (netdata_enabled | default(False)) - role: nextcloud tags: - nextcloud - when: (nextcloud_enabled | default(False)) - role: nomad tags: @@ -244,82 +240,66 @@ - role: nzbget tags: - nzbget - when: (nzbget_enabled | default(False)) - role: octoprint tags: - octoprint - when: (octoprint_enabled | default(False)) - role: ombi tags: - ombi - when: (ombi_enabled | default(False)) - role: openhab tags: - openhab - when: (openhab_enabled | default(False)) - role: organizr tags: - organizr - when: (organizr_enabled | default(False)) - role: overseerr tags: - overseerr - when: (overseerr_enabled | default(False)) - role: paperless_ng tags: - paperless_ng - when: (paperless_ng_enabled | default(False)) - role: piwigo tags: - piwigo - when: (piwigo_enabled | default(False)) - role: plex tags: - plex - when: (plex_enabled | default(False)) - role: portainer tags: - portainer - when: (portainer_enabled | default(False)) - role: prowlarr tags: - prowlarr - when: (prowlarr_enabled | default(False)) - role: pyload tags: - pyload - when: (pyload_enabled | default(False)) - role: pytivo tags: - pytivo - when: (pytivo_enabled | default(False)) - role: radarr tags: - radarr - when: (radarr_enabled | default(False)) - role: route53_ddns tags: - route53_ddns - when: (route53_ddns_enabled | default(False)) - role: rssbridge tags: - rssbridge - when: (rssbridge_enabled | default(False)) - role: sabnzbd tags: diff --git a/roles/prowlarr/defaults/main.yml b/roles/prowlarr/defaults/main.yml index dc47b86e..fbb072cf 100644 --- a/roles/prowlarr/defaults/main.yml +++ b/roles/prowlarr/defaults/main.yml @@ -13,5 +13,10 @@ prowlarr_group_id: "0" prowlarr_port: "9696" prowlarr_hostname: "prowlarr" +# docker +prowlarr_container_name: "prowlarr" +prowlarr_image_name: "ghcr.io/linuxserver/prowlarr" +prowlarr_image_version: "develop" + # specs prowlarr_memory: 1g diff --git a/roles/prowlarr/docs/prowlarr.md b/roles/prowlarr/docs/prowlarr.md new file mode 100644 index 00000000..1d5e871e --- /dev/null +++ b/roles/prowlarr/docs/prowlarr.md @@ -0,0 +1,15 @@ +# Prowlarr" + +Homepages: [prowlarr](https://github.com/Prowlarr/Prowlarr) + +**Prowlarr** is a indexer manager/proxy built on the popular arr .net/reactjs base stack to integrate with your various PVR apps. Prowlarr supports both Torrent Trackers and Usenet Indexers. It integrates seamlessly with Sonarr, Radarr, Lidarr, and Readarr offering complete management of your indexers with no per app Indexer setup required (we do it all). + +## Usage + +Set `prowlarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. + +The Prowlarr web interface can be found at `http://ansible_nas_host_or_ip:9696` by default + +## Specific Configuration + +For comprehensive configuration instructions see the [Prowlarr wiki](https://wiki.servarr.com/prowlarr) or [Prowlarr Github page](https://github.com/Prowlarr/Prowlarr) diff --git a/roles/prowlarr/molecule/default/molecule.yml b/roles/prowlarr/molecule/default/molecule.yml new file mode 100644 index 00000000..4d2be851 --- /dev/null +++ b/roles/prowlarr/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + prowlarr_enabled: true diff --git a/roles/prowlarr/molecule/default/side_effect.yml b/roles/prowlarr/molecule/default/side_effect.yml new file mode 100644 index 00000000..e7cfcab4 --- /dev/null +++ b/roles/prowlarr/molecule/default/side_effect.yml @@ -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: + prowlarr_enabled: false diff --git a/roles/prowlarr/molecule/default/verify.yml b/roles/prowlarr/molecule/default/verify.yml new file mode 100644 index 00000000..30a19ec6 --- /dev/null +++ b/roles/prowlarr/molecule/default/verify.yml @@ -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 prowlarr container state + community.docker.docker_container: + name: "{{ prowlarr_container_name }}" + register: result + + - name: Check if prowlarr containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/prowlarr/molecule/default/verify_stopped.yml b/roles/prowlarr/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..67d63e38 --- /dev/null +++ b/roles/prowlarr/molecule/default/verify_stopped.yml @@ -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 prowlarr + community.docker.docker_container: + name: "{{ prowlarr_container_name }}" + state: absent + register: result + + - name: Check if prowlarr is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/prowlarr/tasks/main.yml b/roles/prowlarr/tasks/main.yml index c4f9c480..7bc8726e 100644 --- a/roles/prowlarr/tasks/main.yml +++ b/roles/prowlarr/tasks/main.yml @@ -1,30 +1,42 @@ --- -- name: Create Prowlarr Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ prowlarr_data_directory }}" +- name: Start Prowlarr + block: + - name: Create Prowlarr Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ prowlarr_data_directory }}" -- name: Create Prowlarr Docker Container - docker_container: - name: prowlarr - image: ghcr.io/linuxserver/prowlarr:develop - pull: true - volumes: - - "{{ prowlarr_data_directory }}:/config:rw" - ports: - - "{{ prowlarr_port }}:9696" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ prowlarr_user_id }}" - PGID: "{{ prowlarr_group_id }}" - restart_policy: unless-stopped - memory: "{{ prowlarr_memory }}" - labels: - traefik.enable: "{{ prowlarr_available_externally | string }}" - traefik.http.routers.prowlarr.rule: "Host(`{{ prowlarr_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.prowlarr.tls.certresolver: "letsencrypt" - traefik.http.routers.prowlarr.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.prowlarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.prowlarr.loadbalancer.server.port: "9696" + - name: Create Prowlarr Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ prowlarr_container_name }}" + image: "{{ prowlarr_image_name }}:{{ prowlarr_image_version }}" + pull: true + volumes: + - "{{ prowlarr_data_directory }}:/config:rw" + ports: + - "{{ prowlarr_port }}:9696" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ prowlarr_user_id }}" + PGID: "{{ prowlarr_group_id }}" + restart_policy: unless-stopped + memory: "{{ prowlarr_memory }}" + labels: + traefik.enable: "{{ prowlarr_available_externally | string }}" + traefik.http.routers.prowlarr.rule: "Host(`{{ prowlarr_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.prowlarr.tls.certresolver: "letsencrypt" + traefik.http.routers.prowlarr.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.prowlarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.prowlarr.loadbalancer.server.port: "9696" + when: prowlarr_enabled is true + +- name: Stop Prowlarr + block: + - name: Stop Prowlarr + community.docker.docker_container: + name: "{{ prowlarr_container_name }}" + state: absent + when: prowlarr_enabled is false diff --git a/roles/pyload/defaults/main.yml b/roles/pyload/defaults/main.yml index 6da3d9b7..3e30a361 100644 --- a/roles/pyload/defaults/main.yml +++ b/roles/pyload/defaults/main.yml @@ -14,5 +14,10 @@ pyload_group_id: "0" pyload_hostname: "pyload" pyload_port: "8000" +# docker +pyload_container_name: "pyload" +pyload_image_name: "writl/pyload" +pyload_image_version: "latest" + # specs pyload_memory: "1g" diff --git a/roles/pyload/docs/pyload.md b/roles/pyload/docs/pyload.md new file mode 100644 index 00000000..5d0911c5 --- /dev/null +++ b/roles/pyload/docs/pyload.md @@ -0,0 +1,16 @@ +# pyLoad + +Homepage: [https://pyload.net/](https://pyload.net/) + +Free and Open Source download manager written in Python and designed to be extremely lightweight, easily extensible and fully manageable via web. + +## Usage + +Set `pyload_enabled: true` in your `inventories//nas.yml` file. + +pyLoad's web interface can be found at . + +## Specific Configuration + +Default username is `pyload` and default password is `pyload` +In order to add or remove users, you will need to access the container from an interactive shell (can easily be done from portainer, if installed) and enter pyLoad's home directory `/opt/pyload` and using the command `python pyLoadCore.py -u` and follow the on-screen prompts. More commands to configure and customize pyLoad can be found on it's website. diff --git a/roles/pyload/molecule/default/molecule.yml b/roles/pyload/molecule/default/molecule.yml new file mode 100644 index 00000000..141f9e4b --- /dev/null +++ b/roles/pyload/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + pyload_enabled: true diff --git a/roles/pyload/molecule/default/side_effect.yml b/roles/pyload/molecule/default/side_effect.yml new file mode 100644 index 00000000..f609d9e3 --- /dev/null +++ b/roles/pyload/molecule/default/side_effect.yml @@ -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: + pyload_enabled: false diff --git a/roles/pyload/molecule/default/verify.yml b/roles/pyload/molecule/default/verify.yml new file mode 100644 index 00000000..f6183b3c --- /dev/null +++ b/roles/pyload/molecule/default/verify.yml @@ -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 pyload container state + community.docker.docker_container: + name: "{{ pyload_container_name }}" + register: result + + - name: Check if pyload containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/pyload/molecule/default/verify_stopped.yml b/roles/pyload/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..d340dfb4 --- /dev/null +++ b/roles/pyload/molecule/default/verify_stopped.yml @@ -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 pyload + community.docker.docker_container: + name: "{{ pyload_container_name }}" + state: absent + register: result + + - name: Check if pyload is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/pyload/tasks/main.yml b/roles/pyload/tasks/main.yml index 39d7a2e2..79ea4e6c 100644 --- a/roles/pyload/tasks/main.yml +++ b/roles/pyload/tasks/main.yml @@ -1,33 +1,45 @@ --- -- name: Create pyLoad Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ pyload_config_directory }}" - - "{{ pyload_download_directory }}" +- name: Start pyLoad + block: + - name: Create pyLoad Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ pyload_config_directory }}" + - "{{ pyload_download_directory }}" -- name: Create pyLoad Docker Container - docker_container: - name: pyload - image: writl/pyload - pull: true - volumes: - - "{{ pyload_config_directory }}:/opt/pyload/pyload-config:rw" - - "{{ pyload_download_directory }}:/opt/pyload/Downloads:rw" - ports: - - "{{ pyload_port }}:8000" - env: - TZ: "{{ ansible_nas_timezone }}" - UID: "{{ pyload_user_id }}" - GID: "{{ pyload_group_id }}" - restart_policy: unless-stopped - memory: "{{ pyload_memory }}" - labels: - traefik.enable: "{{ pyload_available_externally | string }}" - traefik.http.routers.pyload.rule: "Host(`{{ pyload_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.pyload.tls.certresolver: "letsencrypt" - traefik.http.routers.pyload.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.pyload.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.pyload.loadbalancer.server.port: "8000" + - name: Create pyLoad Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ pyload_container_name }}" + image: "{{ pyload_image_name }}:{{ pyload_image_version }}" + pull: true + volumes: + - "{{ pyload_config_directory }}:/opt/pyload/pyload-config:rw" + - "{{ pyload_download_directory }}:/opt/pyload/Downloads:rw" + ports: + - "{{ pyload_port }}:8000" + env: + TZ: "{{ ansible_nas_timezone }}" + UID: "{{ pyload_user_id }}" + GID: "{{ pyload_group_id }}" + restart_policy: unless-stopped + memory: "{{ pyload_memory }}" + labels: + traefik.enable: "{{ pyload_available_externally | string }}" + traefik.http.routers.pyload.rule: "Host(`{{ pyload_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.pyload.tls.certresolver: "letsencrypt" + traefik.http.routers.pyload.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.pyload.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.pyload.loadbalancer.server.port: "8000" + when: pyload_enabled is true + +- name: Stop pyLoad + block: + - name: Stop pyLoad + community.docker.docker_container: + name: "{{ pyload_container_name }}" + state: absent + when: pyload_enabled is false diff --git a/roles/pytivo/defaults/main.yml b/roles/pytivo/defaults/main.yml index b223e71a..79a1ff5e 100644 --- a/roles/pytivo/defaults/main.yml +++ b/roles/pytivo/defaults/main.yml @@ -16,3 +16,8 @@ pytivo_group_id: "0" # network pytivo_hostname: "pytivo" + +# docker +pytivo_container_name: "pytivo" +pytivo_image_name: "pinion/docker-pytivo" +pytivo_image_version: "latest" diff --git a/roles/pytivo/docs/pytivo.md b/roles/pytivo/docs/pytivo.md new file mode 100644 index 00000000..fda6fa9c --- /dev/null +++ b/roles/pytivo/docs/pytivo.md @@ -0,0 +1,30 @@ +# PyTivo + +Project Homepage: + + +Docker Homepage: + + +PyTivo is both an HMO and GoBack server. Similar to TiVo Desktop pyTivo +loads many standard video compression codecs and outputs mpeg2 video to +the TiVo. However, pyTivo is able to load MANY more file types than TiVo +Desktop. + +## Usage + +Set `pytivo_enabled: true` in your `group_vars/all.yml` file. The PyTivo +web interface can be found at . + +## Specific Configuration + +PyTivo needs to be configured for use. Your ansible-nas media is +available to share via: + +* /movies - Where your movies are stored +* /music - Where your music is stored +* /photos - Where your photos are stored +* /podcasts - Where your podcasts are stored +* /tv - Where your TV episodes are stored + +Configuration help for PyTivo settings can be found at [Configure_pyTivo](https://pytivo.sourceforge.io/wiki/index.php/Configure_pyTivo). diff --git a/roles/pytivo/molecule/default/molecule.yml b/roles/pytivo/molecule/default/molecule.yml new file mode 100644 index 00000000..7613679b --- /dev/null +++ b/roles/pytivo/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + pytivo_enabled: true diff --git a/roles/pytivo/molecule/default/side_effect.yml b/roles/pytivo/molecule/default/side_effect.yml new file mode 100644 index 00000000..5716e84b --- /dev/null +++ b/roles/pytivo/molecule/default/side_effect.yml @@ -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: + pytivo_enabled: false diff --git a/roles/pytivo/molecule/default/verify.yml b/roles/pytivo/molecule/default/verify.yml new file mode 100644 index 00000000..b185c872 --- /dev/null +++ b/roles/pytivo/molecule/default/verify.yml @@ -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 pytivo container state + community.docker.docker_container: + name: "{{ pytivo_container_name }}" + register: result + + - name: Check if pytivo containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/pytivo/molecule/default/verify_stopped.yml b/roles/pytivo/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..591d3867 --- /dev/null +++ b/roles/pytivo/molecule/default/verify_stopped.yml @@ -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 pytivo + community.docker.docker_container: + name: "{{ pytivo_container_name }}" + state: absent + register: result + + - name: Check if pytivo is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/pytivo/tasks/main.yml b/roles/pytivo/tasks/main.yml index 219d93cb..2e74270c 100644 --- a/roles/pytivo/tasks/main.yml +++ b/roles/pytivo/tasks/main.yml @@ -1,38 +1,50 @@ --- -- name: Create Pytivo Directories - file: - path: "{{ item }}" - state: directory - mode: 0777 - with_items: - - "{{ pytivo_config_directory }}" +- name: Start Pytivo + block: + - name: Create Pytivo Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: 0777 + with_items: + - "{{ pytivo_config_directory }}" -- name: Pytivo - docker_container: - name: pytivo - image: pinion/docker-pytivo - pull: true - volumes: - - "/etc/localtime:/etc/localtime:ro" - - "{{ pytivo_config_directory }}:/config:rw" - - "{{ pytivo_movies_directory }}:/movies:ro" - - "{{ pytivo_tv_directory }}:/tv:ro" - - "{{ pytivo_photos_directory }}:/photos:ro" - - "{{ pytivo_music_directory }}:/music:ro" - - "{{ pytivo_podcasts_directory }}:/podcasts:ro" - ports: - - "9032:9032" - - "2190:2190/udp" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ pytivo_user_id }}" - PGID: "{{ pytivo_group_id }}" - restart_policy: unless-stopped - memory: 1g - labels: - traefik.enable: "{{ pytivo_available_externally | string }}" - traefik.http.routers.pytivo.rule: "Host(`{{ pytivo_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.pytivo.tls.certresolver: "letsencrypt" - traefik.http.routers.pytivo.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.pytivo.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.pytivo.loadbalancer.server.port: "9032" + - name: Pytivo + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ pytivo_container_name }}" + image: "{{ pytivo_image_name }}:{{ pytivo_image_version }}" + pull: true + volumes: + - "/etc/localtime:/etc/localtime:ro" + - "{{ pytivo_config_directory }}:/config:rw" + - "{{ pytivo_movies_directory }}:/movies:ro" + - "{{ pytivo_tv_directory }}:/tv:ro" + - "{{ pytivo_photos_directory }}:/photos:ro" + - "{{ pytivo_music_directory }}:/music:ro" + - "{{ pytivo_podcasts_directory }}:/podcasts:ro" + ports: + - "9032:9032" + - "2190:2190/udp" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ pytivo_user_id }}" + PGID: "{{ pytivo_group_id }}" + restart_policy: unless-stopped + memory: 1g + labels: + traefik.enable: "{{ pytivo_available_externally | string }}" + traefik.http.routers.pytivo.rule: "Host(`{{ pytivo_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.pytivo.tls.certresolver: "letsencrypt" + traefik.http.routers.pytivo.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.pytivo.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.pytivo.loadbalancer.server.port: "9032" + when: pytivo_enabled is true + +- name: Stop Pytivo + block: + - name: Stop Pytivo + community.docker.docker_container: + name: "{{ pytivo_container_name }}" + state: absent + when: pytivo_enabled is false diff --git a/roles/radarr/defaults/main.yml b/roles/radarr/defaults/main.yml index 843520b7..f77a6329 100644 --- a/roles/radarr/defaults/main.yml +++ b/roles/radarr/defaults/main.yml @@ -15,5 +15,10 @@ radarr_group_id: "0" radarr_port: "7878" radarr_hostname: "radarr" +# docker +radarr_container_name: "radarr" +radarr_image_name: "linuxserver/radarr" +radarr_image_version: "latest" + # specs radarr_memory: 1g diff --git a/roles/radarr/docs/radarr.md b/roles/radarr/docs/radarr.md new file mode 100644 index 00000000..141bbebb --- /dev/null +++ b/roles/radarr/docs/radarr.md @@ -0,0 +1,22 @@ +# Radarr + +Homepage: [radarr](https://radarr.video/) + +**Radarr** is an independent fork of Sonarr reworked for automatically downloading movies via Usenet and BitTorrent. + +## Usage + +Set `radarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. + +The Radarr web interface can be found at `http://ansible_nas_host_or_ip:7878` by default + +## Specific Configuration + +**First make sure Radarr has permissions to write and read the `/download`, and `/movies` folders**. Do this by ensuring the `radarr_movies_directory:` and `radarr_download_directory` settings are correct. + +Radarr will get the file path from the Download client. On default settings with Transmission the path is `/storage/downloads/complete`. You will need to create a path mapping in the **Remote Path Mappings** settings under **Download Client** to point to your internal path that is by default `/downloads`. *If you have difficulties with the path mapping you could also just add a new volume path for the Transmission container and use `/downloads` as the download directory.* + +For Radarr to understand that the `/movies` folder is a folder, you'll need to add a new subfolder into it. +You can also do this by adding a random movie to the folder. Keep in mind to have the internal setting **Create empty movie folders** on **yes** + +Comprehensive setup information can be found on the [Radarr GitHub wiki](https://github.com/Radarr/Radarr/wiki/Setup-Guide) diff --git a/roles/radarr/molecule/default/molecule.yml b/roles/radarr/molecule/default/molecule.yml new file mode 100644 index 00000000..cadf085b --- /dev/null +++ b/roles/radarr/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + radarr_enabled: true diff --git a/roles/radarr/molecule/default/side_effect.yml b/roles/radarr/molecule/default/side_effect.yml new file mode 100644 index 00000000..d172923e --- /dev/null +++ b/roles/radarr/molecule/default/side_effect.yml @@ -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: + radarr_enabled: false diff --git a/roles/radarr/molecule/default/verify.yml b/roles/radarr/molecule/default/verify.yml new file mode 100644 index 00000000..5083dada --- /dev/null +++ b/roles/radarr/molecule/default/verify.yml @@ -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 radarr container state + community.docker.docker_container: + name: "{{ radarr_container_name }}" + register: result + + - name: Check if radarr containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/radarr/molecule/default/verify_stopped.yml b/roles/radarr/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..fd1f933e --- /dev/null +++ b/roles/radarr/molecule/default/verify_stopped.yml @@ -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 radarr + community.docker.docker_container: + name: "{{ radarr_container_name }}" + state: absent + register: result + + - name: Check if radarr is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/radarr/tasks/main.yml b/roles/radarr/tasks/main.yml index c7b1dad8..c13cdeaa 100644 --- a/roles/radarr/tasks/main.yml +++ b/roles/radarr/tasks/main.yml @@ -1,32 +1,44 @@ --- -- name: Create Radarr Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ radarr_data_directory }}" +- name: Start Radarr + block: + - name: Create Radarr Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ radarr_data_directory }}" -- name: Radarr - docker_container: - name: radarr - image: linuxserver/radarr - pull: true - volumes: - - "{{ radarr_movies_directory }}:/movies:rw" - - "{{ radarr_download_directory }}:/downloads:rw" - - "{{ radarr_data_directory }}:/config:rw" - ports: - - "{{ radarr_port }}:7878" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ radarr_user_id }}" - PGID: "{{ radarr_group_id }}" - restart_policy: unless-stopped - memory: "{{ radarr_memory }}" - labels: - traefik.enable: "{{ radarr_available_externally | string }}" - traefik.http.routers.radarr.rule: "Host(`{{ radarr_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.radarr.tls.certresolver: "letsencrypt" - traefik.http.routers.radarr.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.radarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.radarr.loadbalancer.server.port: "7878" + - name: Radarr + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ radarr_container_name }}" + image: "{{ radarr_image_name }}:{{ radarr_image_version }}" + pull: true + volumes: + - "{{ radarr_movies_directory }}:/movies:rw" + - "{{ radarr_download_directory }}:/downloads:rw" + - "{{ radarr_data_directory }}:/config:rw" + ports: + - "{{ radarr_port }}:7878" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ radarr_user_id }}" + PGID: "{{ radarr_group_id }}" + restart_policy: unless-stopped + memory: "{{ radarr_memory }}" + labels: + traefik.enable: "{{ radarr_available_externally | string }}" + traefik.http.routers.radarr.rule: "Host(`{{ radarr_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.radarr.tls.certresolver: "letsencrypt" + traefik.http.routers.radarr.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.radarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.radarr.loadbalancer.server.port: "7878" + when: radarr_enabled is true + +- name: Stop Radarr + block: + - name: Stop Radarr + community.docker.docker_container: + name: "{{ radarr_container_name }}" + state: absent + when: radarr_enabled is false diff --git a/roles/route53_ddns/defaults/main.yml b/roles/route53_ddns/defaults/main.yml index 06507ad0..ea3638ce 100644 --- a/roles/route53_ddns/defaults/main.yml +++ b/roles/route53_ddns/defaults/main.yml @@ -23,3 +23,6 @@ route53_schedule: "*/30 * * * *" # Container route53_memory: 512MB +route53_container_name: "route53-ddns" +route53_image_name: "crazymax/ddns-route53" +route53_image_version: "latest" diff --git a/roles/route53_ddns/docs/route53_ddns.md b/roles/route53_ddns/docs/route53_ddns.md new file mode 100644 index 00000000..c0b261d4 --- /dev/null +++ b/roles/route53_ddns/docs/route53_ddns.md @@ -0,0 +1,40 @@ +# AWS Route53 Dynamic DNS Updater + +ddns-route53: + +AWS Route53: + +If you want your Ansible-NAS accessible externally then you need a domain name. You will also need to set a wildcard host `A` record to point to your static IP, or enable this container to automatically update AWS Route53 with your dynamic IP address. + +## Usage + +Set `route53_ddns_enabled: true` in your `inventories//nas.yml` file. + +Set required AWS access credentials from the AWS Console. (See below.) + +## Specific Configuration + +Make sure you set your domain (if different than the `ansible-nas` default) and access details within your `inventories//nas.yml` file. + +To set up Route53 to work with the service, please review the [Prerequisites](https://crazymax.dev/ddns-route53/usage/prerequisites/) page. In short, you will need to set up a Route53 [Hosted Zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html), an [IAM Policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html), and an [IAM User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html) with API credentials. + +### AWS Access Credentials + +| Parameter | Description | Status | +|--------------------|-------------------|-----------| +| route53_key_id | AWS access key ID | mandatory | +| route53_secret_key | AWS secret key | mandatory | + +### Networking + +| Parameter | Description | Status | +|------------------------|--------------------------------|-----------| +| route53_hosted_zone_id | Route53 hosted zone ID | mandatory | +| route53_ttl | Time-to-live for the DNS entry | | +| route53_host | Wildcard domain to update | | + +### Application + +| Parameter | Description | Status | +|------------------|-----------------------------------------------------|-----------| +| route53_schedule | [CRON](https://pkg.go.dev/github.com/robfig/cron?utm_source=godoc#hdr-CRON_Expression_Format) schedule for checking and updating DNS entry | | diff --git a/roles/route53_ddns/molecule/default/molecule.yml b/roles/route53_ddns/molecule/default/molecule.yml new file mode 100644 index 00000000..fee9222f --- /dev/null +++ b/roles/route53_ddns/molecule/default/molecule.yml @@ -0,0 +1,19 @@ +--- +provisioner: + inventory: + group_vars: + all: + route53_enabled: true + route53_key_id: "abcdef" + route53_secret_key: "ghijkl" + route53_hosted_zone_id: "1000" + route53_data_directory: "/tmp/route53" +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 diff --git a/roles/route53_ddns/molecule/default/side_effect.yml b/roles/route53_ddns/molecule/default/side_effect.yml new file mode 100644 index 00000000..4ef789f9 --- /dev/null +++ b/roles/route53_ddns/molecule/default/side_effect.yml @@ -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: + route53_enabled: false diff --git a/roles/route53_ddns/molecule/default/verify.yml b/roles/route53_ddns/molecule/default/verify.yml new file mode 100644 index 00000000..f64de7d7 --- /dev/null +++ b/roles/route53_ddns/molecule/default/verify.yml @@ -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 route53 container state + community.docker.docker_container: + name: "{{ route53_container_name }}" + register: result + + - name: Check if route53 containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/route53_ddns/molecule/default/verify_stopped.yml b/roles/route53_ddns/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..114d5657 --- /dev/null +++ b/roles/route53_ddns/molecule/default/verify_stopped.yml @@ -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 route53 + community.docker.docker_container: + name: "{{ route53_container_name }}" + state: absent + register: result + + - name: Check if route53 is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/route53_ddns/tasks/main.yml b/roles/route53_ddns/tasks/main.yml index 20c0ad2e..df25e460 100644 --- a/roles/route53_ddns/tasks/main.yml +++ b/roles/route53_ddns/tasks/main.yml @@ -1,25 +1,36 @@ --- +- name: Start AWS Route53 Dynamic DNS + block: + - name: Create AWS Route53 Dynamic DNS Directories + ansible.builtin.file: + path: "{{ route53_data_directory }}" + state: directory -- name: Create AWS Route53 Dynamic DNS Directories - file: - path: "{{ route53_data_directory }}" - state: directory + - name: Generate AWS Route53 Dynamic DNS config file + template: + src: config.yml + dest: "{{ route53_data_directory }}/ddns-route53.yml" + register: template_config -- name: Generate AWS Route53 Dynamic DNS config file - template: - src: config.yml - dest: "{{ route53_data_directory }}/ddns-route53.yml" - register: template_config + - name: AWS Route53 Dynamic DNS Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ route53_container_name }}" + image: "{{ route53_image_name }}:{{ route53_image_version }}" + pull: true + env: + SCHEDULE: "{{ route53_schedule | string }}" + volumes: + - "{{ route53_data_directory }}/ddns-route53.yml:/etc/ddns-route53/ddns-route53.yml" + restart_policy: unless-stopped + memory: "{{ route53_memory }}" + recreate: "{{ template_config is changed }}" + when: route53_enabled is true -- name: AWS Route53 Dynamic DNS Container - docker_container: - name: route53-ddns - image: crazymax/ddns-route53:latest - pull: true - env: - SCHEDULE: "{{ route53_schedule | string }}" - volumes: - - "{{ route53_data_directory }}/ddns-route53.yml:/etc/ddns-route53/ddns-route53.yml" - restart_policy: unless-stopped - memory: "{{ route53_memory }}" - recreate: "{{ template_config is changed }}" +- name: Stop AWS Route53 Dynamic DNS + block: + - name: Stop AWS Route53 Dynamic DNS + community.docker.docker_container: + name: "{{ route53_container_name }}" + state: absent + when: route53_enabled is false diff --git a/roles/rssbridge/defaults/main.yml b/roles/rssbridge/defaults/main.yml index 3c02e8a6..6c3e2518 100644 --- a/roles/rssbridge/defaults/main.yml +++ b/roles/rssbridge/defaults/main.yml @@ -9,5 +9,10 @@ rssbridge_data_directory: "{{ docker_home }}/rssbridge" rssbridge_port: "8091" rssbridge_hostname: "rssbridge" +# docker +rssbridge_container_name: "rssbridge" +rssbridge_image_name: "rssbridge/rss-bridge" +rssbridge_image_version: "latest" + # specs rssbridge_memory: 1g diff --git a/roles/rssbridge/docs/rssbridge.md b/roles/rssbridge/docs/rssbridge.md new file mode 100644 index 00000000..517e5bef --- /dev/null +++ b/roles/rssbridge/docs/rssbridge.md @@ -0,0 +1,13 @@ +# RSS-Bridge + +Homepage: + +RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one. It can be used on webservers or as a stand-alone application in CLI mode. + +Important: RSS-Bridge is not a feed reader or feed aggregator, but a tool to generate feeds that are consumed by feed readers and feed aggregators. + +## Usage + +Set `rssbridge_enabled: true` in your `inventories//nas.yml` file. + +The RSS-Bridge web interface can be found at . diff --git a/roles/rssbridge/molecule/default/molecule.yml b/roles/rssbridge/molecule/default/molecule.yml new file mode 100644 index 00000000..c044b144 --- /dev/null +++ b/roles/rssbridge/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + rssbridge_enabled: true diff --git a/roles/rssbridge/molecule/default/side_effect.yml b/roles/rssbridge/molecule/default/side_effect.yml new file mode 100644 index 00000000..a073e68b --- /dev/null +++ b/roles/rssbridge/molecule/default/side_effect.yml @@ -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: + rssbridge_enabled: false diff --git a/roles/rssbridge/molecule/default/verify.yml b/roles/rssbridge/molecule/default/verify.yml new file mode 100644 index 00000000..20bee845 --- /dev/null +++ b/roles/rssbridge/molecule/default/verify.yml @@ -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 rssbridge container state + community.docker.docker_container: + name: "{{ rssbridge_container_name }}" + register: result + + - name: Check if rssbridge containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/rssbridge/molecule/default/verify_stopped.yml b/roles/rssbridge/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..2c260381 --- /dev/null +++ b/roles/rssbridge/molecule/default/verify_stopped.yml @@ -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 rssbridge + community.docker.docker_container: + name: "{{ rssbridge_container_name }}" + state: absent + register: result + + - name: Check if rssbridge is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/rssbridge/tasks/main.yml b/roles/rssbridge/tasks/main.yml index 1c942ce1..73b7e090 100644 --- a/roles/rssbridge/tasks/main.yml +++ b/roles/rssbridge/tasks/main.yml @@ -1,27 +1,39 @@ --- -- name: Create RSSBridge Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ rssbridge_data_directory }}/data" +- name: Start RSSBridge + block: + - name: Create RSSBridge Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ rssbridge_data_directory }}/data" -- name: RSSBridge Docker Container - docker_container: - name: rssbridge - image: rssbridge/rss-bridge - pull: true - volumes: - - "{{ rssbridge_data_directory }}/data:/config:rw" - ports: - - "{{ rssbridge_port }}:80" - restart_policy: unless-stopped - memory: "{{ rssbridge_memory }}" - labels: - traefik.enable: "{{ rssbridge_available_externally | string }}" - traefik.http.routers.rssbridge.rule: "Host(`{{ rssbridge_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.rssbridge.tls.certresolver: "letsencrypt" - traefik.http.routers.rssbridge.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.rssbridge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.rssbridge.loadbalancer.server.port: "80" + - name: RSSBridge Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ rssbridge_container_name }}" + image: "{{ rssbridge_image_name }}:{{ rssbridge_image_version }}" + pull: true + volumes: + - "{{ rssbridge_data_directory }}/data:/config:rw" + ports: + - "{{ rssbridge_port }}:80" + restart_policy: unless-stopped + memory: "{{ rssbridge_memory }}" + labels: + traefik.enable: "{{ rssbridge_available_externally | string }}" + traefik.http.routers.rssbridge.rule: "Host(`{{ rssbridge_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.rssbridge.tls.certresolver: "letsencrypt" + traefik.http.routers.rssbridge.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.rssbridge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.rssbridge.loadbalancer.server.port: "80" + when: rssbridge_enabled is true + +- name: Stop RSSBridge + block: + - name: Stop RSSBridge + community.docker.docker_container: + name: "{{ rssbridge_container_name }}" + state: absent + when: rssbridge_enabled is false diff --git a/roles/sabnzbd/defaults/main.yml b/roles/sabnzbd/defaults/main.yml index 3a39633c..3468a027 100644 --- a/roles/sabnzbd/defaults/main.yml +++ b/roles/sabnzbd/defaults/main.yml @@ -17,3 +17,8 @@ sabnzbd_memory: 1g # uid / gid sabnzbd_user_id: "0" sabnzbd_group_id: "0" + +# docker +sabnzbd_container_name: "sabnzbd" +sabnzbd_image_name: "linuxserver/sabnzbd" +sabnzbd_image_version: "latest" diff --git a/roles/sabnzbd/docs/sabnzbd.md b/roles/sabnzbd/docs/sabnzbd.md new file mode 100644 index 00000000..a4ed13d1 --- /dev/null +++ b/roles/sabnzbd/docs/sabnzbd.md @@ -0,0 +1,11 @@ +# Sabnzbd + +Homepage: + +The time tested Usenet downloader provided with FreeNAS. It just works for those migrating from FreeNAS. + +## Usage + +Set `sabnzbd_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. + +The Sabnzbd web interface can be found at . Use this interface to configure the software upon first connection. diff --git a/roles/sabnzbd/molecule/default/molecule.yml b/roles/sabnzbd/molecule/default/molecule.yml new file mode 100644 index 00000000..53d52b07 --- /dev/null +++ b/roles/sabnzbd/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + sabnzbd_enabled: true diff --git a/roles/sabnzbd/molecule/default/side_effect.yml b/roles/sabnzbd/molecule/default/side_effect.yml new file mode 100644 index 00000000..f7fe0b8e --- /dev/null +++ b/roles/sabnzbd/molecule/default/side_effect.yml @@ -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: + sabnzbd_enabled: false diff --git a/roles/sabnzbd/molecule/default/verify.yml b/roles/sabnzbd/molecule/default/verify.yml new file mode 100644 index 00000000..c8f767eb --- /dev/null +++ b/roles/sabnzbd/molecule/default/verify.yml @@ -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 sabnzbd container state + community.docker.docker_container: + name: "{{ sabnzbd_container_name }}" + register: result + + - name: Check if sabnzbd containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/sabnzbd/molecule/default/verify_stopped.yml b/roles/sabnzbd/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..d83fa89d --- /dev/null +++ b/roles/sabnzbd/molecule/default/verify_stopped.yml @@ -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 sabnzbd + community.docker.docker_container: + name: "{{ sabnzbd_container_name }}" + state: absent + register: result + + - name: Check if sabnzbd is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/sabnzbd/tasks/main.yml b/roles/sabnzbd/tasks/main.yml index 914769bd..7e5241cd 100644 --- a/roles/sabnzbd/tasks/main.yml +++ b/roles/sabnzbd/tasks/main.yml @@ -1,31 +1,43 @@ --- -- name: Create Sabnzbd Data Directory - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ sabnzbd_data_directory }}" +- name: Start Sabnzbd + block: + - name: Create Sabnzbd Data Directory + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ sabnzbd_data_directory }}" -- name: Sabnzbd - docker_container: - name: sabnzbd - image: linuxserver/sabnzbd - pull: true - volumes: - - "{{ sabnzbd_data_directory }}:/config:rw" - - "{{ sabnzbd_downloads_directory }}:/downloads" - - "{{ sabnzbd_incomplete_directory }}:/incomplete-downloads" - ports: - - "{{ sabnzbd_port }}:8080" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ sabnzbd_user_id }}" - PGID: "{{ sabnzbd_group_id }}" - restart_policy: unless-stopped - labels: - traefik.enable: "{{ sabnzbd_available_externally | string }}" - traefik.http.routers.sabnzbd.rule: "Host(`{{ sabnzbd_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.sabnzbd.tls.certresolver: "letsencrypt" - traefik.http.routers.sabnzbd.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.sabnzbd.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.sabnzbd.loadbalancer.server.port: "8080" + - name: Sabnzbd + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ sabnzbd_container_name }}" + image: "{{ sabnzbd_image_name }}:{{ sabnzbd_image_version }}" + pull: true + volumes: + - "{{ sabnzbd_data_directory }}:/config:rw" + - "{{ sabnzbd_downloads_directory }}:/downloads" + - "{{ sabnzbd_incomplete_directory }}:/incomplete-downloads" + ports: + - "{{ sabnzbd_port }}:8080" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ sabnzbd_user_id }}" + PGID: "{{ sabnzbd_group_id }}" + restart_policy: unless-stopped + labels: + traefik.enable: "{{ sabnzbd_available_externally | string }}" + traefik.http.routers.sabnzbd.rule: "Host(`{{ sabnzbd_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.sabnzbd.tls.certresolver: "letsencrypt" + traefik.http.routers.sabnzbd.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.sabnzbd.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.sabnzbd.loadbalancer.server.port: "8080" + when: sabnzbd_enabled is true + +- name: Stop Sabnzbd + block: + - name: Stop Sabnzbd + community.docker.docker_container: + name: "{{ sabnzbd_container_name }}" + state: absent + when: sabnzbd_enabled is false diff --git a/roles/sickchill/defaults/main.yml b/roles/sickchill/defaults/main.yml index 483b32d0..e91a12b0 100644 --- a/roles/sickchill/defaults/main.yml +++ b/roles/sickchill/defaults/main.yml @@ -15,5 +15,10 @@ sickchill_group_id: "0" sickchill_port: "8081" sickchill_hostname: "sickchill" +# docker +sickchill_container_name: "sickchill" +sickchill_image_name: "linuxserver/sickchill" +sickchill_image_version: "latest" + # specs sickchill_memory: 1g diff --git a/roles/sickchill/docs/sickchill.md b/roles/sickchill/docs/sickchill.md new file mode 100644 index 00000000..8fe2b75a --- /dev/null +++ b/roles/sickchill/docs/sickchill.md @@ -0,0 +1,12 @@ +# Sickchill + +Homepage: [Sickchill](https://sickchill.github.io/) + +SickChill is an automatic Video Library Manager for TV Shows. +It watches for new episodes of your favorite shows, and when they are posted it does its magic: automatic torrent/nzb searching, downloading, and processing at the qualities you want. + +## Usage + +Set `sickchill_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. + +The sickchill web interface can be found at `http://ansible_nas_host_or_ip:8081` by default diff --git a/roles/sickchill/molecule/default/molecule.yml b/roles/sickchill/molecule/default/molecule.yml new file mode 100644 index 00000000..b0c23f33 --- /dev/null +++ b/roles/sickchill/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + sickchill_enabled: true diff --git a/roles/sickchill/molecule/default/side_effect.yml b/roles/sickchill/molecule/default/side_effect.yml new file mode 100644 index 00000000..08bdee46 --- /dev/null +++ b/roles/sickchill/molecule/default/side_effect.yml @@ -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: + sickchill_enabled: false diff --git a/roles/sickchill/molecule/default/verify.yml b/roles/sickchill/molecule/default/verify.yml new file mode 100644 index 00000000..4a9bc9d1 --- /dev/null +++ b/roles/sickchill/molecule/default/verify.yml @@ -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 sickchill container state + community.docker.docker_container: + name: "{{ sickchill_container_name }}" + register: result + + - name: Check if sickchill containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/sickchill/molecule/default/verify_stopped.yml b/roles/sickchill/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..6da33063 --- /dev/null +++ b/roles/sickchill/molecule/default/verify_stopped.yml @@ -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 sickchill + community.docker.docker_container: + name: "{{ sickchill_container_name }}" + state: absent + register: result + + - name: Check if sickchill is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/sickchill/tasks/main.yml b/roles/sickchill/tasks/main.yml index 4c058a5b..f84dad76 100644 --- a/roles/sickchill/tasks/main.yml +++ b/roles/sickchill/tasks/main.yml @@ -1,33 +1,45 @@ --- -- name: Create Sickchill Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ sickchill_config_directory }}" +- name: Start Sickchill + block: + - name: Create Sickchill Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ sickchill_config_directory }}" -- name: Sickchill Docker Container - docker_container: - name: sickchill - image: linuxserver/sickchill - pull: true - volumes: - - "{{ sickchill_config_directory }}:/config:rw" - - "{{ sickchill_downloads_directory }}:/downloads:rw" - - "{{ sickchill_tv_directory }}:/tv:rw" - ports: - - "{{ sickchill_port }}:8081" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ sickchill_user_id }}" - PGID: "{{ sickchill_group_id }}" - restart_policy: unless-stopped - memory: "{{ sickchill_memory }}" - labels: - traefik.enable: "{{ sickchill_available_externally | string }}" - traefik.http.routers.sickchill.rule: "Host(`{{ sickchill_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.sickchill.tls.certresolver: "letsencrypt" - traefik.http.routers.sickchill.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.sickchill.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.sickchill.loadbalancer.server.port: "8081" + - name: Sickchill Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ sickchill_container_name }}" + image: "{{ sickchill_image_name }}:{{ sickchill_image_version }}" + pull: true + volumes: + - "{{ sickchill_config_directory }}:/config:rw" + - "{{ sickchill_downloads_directory }}:/downloads:rw" + - "{{ sickchill_tv_directory }}:/tv:rw" + ports: + - "{{ sickchill_port }}:8081" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ sickchill_user_id }}" + PGID: "{{ sickchill_group_id }}" + restart_policy: unless-stopped + memory: "{{ sickchill_memory }}" + labels: + traefik.enable: "{{ sickchill_available_externally | string }}" + traefik.http.routers.sickchill.rule: "Host(`{{ sickchill_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.sickchill.tls.certresolver: "letsencrypt" + traefik.http.routers.sickchill.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.sickchill.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.sickchill.loadbalancer.server.port: "8081" + when: sickchill_enabled is true + +- name: Stop Sickchill + block: + - name: Stop Sickchill + community.docker.docker_container: + name: "{{ sickchill_container_name }}" + state: absent + when: sickchill_enabled is false From defc17eaf3b0dde98685cf3d6126abeb3d8a2c5c Mon Sep 17 00:00:00 2001 From: Anarion Date: Fri, 10 Mar 2023 16:50:37 +0100 Subject: [PATCH 07/84] "Fix" Guacamole --- roles/guacamole/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/guacamole/tasks/main.yml b/roles/guacamole/tasks/main.yml index 1eee84fd..5a3be004 100644 --- a/roles/guacamole/tasks/main.yml +++ b/roles/guacamole/tasks/main.yml @@ -52,6 +52,7 @@ name: "{{ guacamole_container_name }}" image: "{{ guacamole_image_name }}:{{ guacamole_image_version }}" restart: true + tags: molecule-idempotence-notest when: guacamole_enabled is true - name: Stop Guacamole From ee6da57325f9a1322b99f565bdf0722498407add Mon Sep 17 00:00:00 2001 From: Anarion Date: Fri, 10 Mar 2023 22:00:37 +0100 Subject: [PATCH 08/84] Add last batch --- nas.yml | 22 --- roles/gitea/defaults/main.yml | 5 + roles/gitea/docs/gitea.md | 11 ++ roles/gitea/molecule/default/molecule.yml | 7 + roles/gitea/molecule/default/side_effect.yml | 10 ++ roles/gitea/molecule/default/verify.yml | 19 +++ .../gitea/molecule/default/verify_stopped.yml | 19 +++ roles/gitea/tasks/main.yml | 26 +++- roles/sonarr/defaults/main.yml | 5 + roles/sonarr/docs/sonarr.md | 22 +++ roles/sonarr/molecule/default/molecule.yml | 6 + roles/sonarr/molecule/default/side_effect.yml | 10 ++ roles/sonarr/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/sonarr/tasks/main.yml | 72 +++++---- roles/speedtest-tracker/defaults/main.yml | 7 +- roles/speedtest-tracker/docs/speedtest.md | 15 ++ .../molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ .../molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/speedtest-tracker/tasks/main.yml | 76 ++++++---- roles/stats/defaults/main.yml | 17 +++ roles/stats/docs/stats.md | 13 ++ roles/stats/molecule/default/molecule.yml | 24 +++ roles/stats/molecule/default/side_effect.yml | 10 ++ roles/stats/molecule/default/verify.yml | 47 ++++++ .../stats/molecule/default/verify_stopped.yml | 47 ++++++ roles/stats/tasks/exporters.yml | 57 ++++--- roles/stats/tasks/grafana.yml | 106 +++++++------ roles/stats/tasks/prometheus.yml | 96 ++++++------ roles/stats/tasks/telegraf.yml | 102 +++++++------ roles/syncthing/defaults/main.yml | 5 + roles/syncthing/docs/syncthing.md | 27 ++++ roles/syncthing/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/syncthing/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/syncthing/tasks/main.yml | 68 +++++---- roles/tautulli/defaults/main.yml | 5 + roles/tautulli/docs/tautulli.md | 11 ++ roles/tautulli/molecule/default/molecule.yml | 7 + .../tautulli/molecule/default/side_effect.yml | 10 ++ roles/tautulli/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/tautulli/tasks/main.yml | 74 +++++---- roles/thelounge/defaults/main.yml | 3 + roles/thelounge/docs/thelounge.md | 16 ++ roles/thelounge/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/thelounge/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/thelounge/tasks/main.yml | 76 ++++++---- roles/tiddlywiki/defaults/main.yml | 3 + roles/tiddlywiki/docs/tiddlywiki.md | 34 +++++ .../tiddlywiki/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/tiddlywiki/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/tiddlywiki/tasks/main.yml | 66 ++++---- roles/timemachine/defaults/main.yml | 3 + roles/timemachine/docs/timemachine.md | 29 ++++ .../timemachine/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/timemachine/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/timemachine/tasks/main.yml | 84 ++++++----- roles/traefik/defaults/main.yml | 4 +- roles/traefik/docs/traefik.md | 20 +++ roles/traefik/molecule/default/molecule.yml | 18 +++ .../traefik/molecule/default/side_effect.yml | 10 ++ roles/traefik/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/traefik/tasks/main.yml | 64 ++++---- .../defaults/main.yml | 4 + .../docs/transmission.md | 26 ++++ .../molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ .../molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ .../transmission-with-openvpn/tasks/main.yml | 122 ++++++++------- roles/transmission/defaults/main.yml | 4 + roles/transmission/docs/transmission.md | 26 ++++ .../molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ .../transmission/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/transmission/tasks/main.yml | 82 +++++----- roles/ubooquity/defaults/main.yml | 3 + roles/ubooquity/docs/ubooquity.md | 25 +++ roles/ubooquity/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/ubooquity/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/ubooquity/tasks/main.yml | 78 ++++++---- roles/utorrent/defaults/main.yml | 5 + roles/utorrent/docs/utorrent.md | 15 ++ roles/utorrent/molecule/default/molecule.yml | 6 + .../utorrent/molecule/default/side_effect.yml | 10 ++ roles/utorrent/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/utorrent/tasks/main.yml | 86 ++++++----- roles/virtual_desktop/defaults/main.yml | 5 +- roles/virtual_desktop/docs/virtual_desktop.md | 30 ++++ .../molecule/default/molecule.yml | 7 + .../molecule/default/side_effect.yml | 10 ++ .../molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/virtual_desktop/tasks/main.yml | 66 ++++---- roles/wallabag/defaults/main.yml | 3 + roles/wallabag/docs/wallabag.md | 17 +++ roles/wallabag/molecule/default/molecule.yml | 17 +++ .../wallabag/molecule/default/side_effect.yml | 10 ++ roles/wallabag/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/wallabag/tasks/main.yml | 71 +++++---- roles/watchtower/defaults/main.yml | 4 + roles/watchtower/docs/watchtower.md | 15 ++ .../watchtower/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/watchtower/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/watchtower/tasks/main.yml | 36 +++-- roles/wireshark/defaults/main.yml | 5 + roles/wireshark/docs/wireshark.md | 11 ++ roles/wireshark/molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ roles/wireshark/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/wireshark/tasks/main.yml | 72 +++++---- roles/woodpecker-ci/defaults/main.yml | 9 ++ roles/woodpecker-ci/docs/woodpecker_ci.md | 17 +++ .../molecule/default/molecule.yml | 22 +++ .../molecule/default/prepare.yml | 20 +++ .../molecule/default/side_effect.yml | 10 ++ .../woodpecker-ci/molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/woodpecker-ci/tasks/main.yml | 142 ++++++++++-------- roles/youtubedlmaterial/defaults/main.yml | 5 + .../docs/youtubedlmaterial.md | 17 +++ .../molecule/default/molecule.yml | 6 + .../molecule/default/side_effect.yml | 10 ++ .../molecule/default/verify.yml | 19 +++ .../molecule/default/verify_stopped.yml | 19 +++ roles/youtubedlmaterial/tasks/main.yml | 88 ++++++----- roles/znc/defaults/main.yml | 12 ++ roles/znc/docs/znc.md | 11 ++ roles/znc/molecule/default/molecule.yml | 17 +++ roles/znc/molecule/default/side_effect.yml | 10 ++ roles/znc/molecule/default/verify.yml | 19 +++ roles/znc/molecule/default/verify_stopped.yml | 19 +++ roles/znc/tasks/main.yml | 77 ++++++---- roles/znc/templates/znc.conf.j2 | 35 +++++ 153 files changed, 2932 insertions(+), 817 deletions(-) create mode 100644 roles/gitea/docs/gitea.md create mode 100644 roles/gitea/molecule/default/molecule.yml create mode 100644 roles/gitea/molecule/default/side_effect.yml create mode 100644 roles/gitea/molecule/default/verify.yml create mode 100644 roles/gitea/molecule/default/verify_stopped.yml create mode 100644 roles/sonarr/docs/sonarr.md create mode 100644 roles/sonarr/molecule/default/molecule.yml create mode 100644 roles/sonarr/molecule/default/side_effect.yml create mode 100644 roles/sonarr/molecule/default/verify.yml create mode 100644 roles/sonarr/molecule/default/verify_stopped.yml create mode 100644 roles/speedtest-tracker/docs/speedtest.md create mode 100644 roles/speedtest-tracker/molecule/default/molecule.yml create mode 100644 roles/speedtest-tracker/molecule/default/side_effect.yml create mode 100644 roles/speedtest-tracker/molecule/default/verify.yml create mode 100644 roles/speedtest-tracker/molecule/default/verify_stopped.yml create mode 100644 roles/stats/docs/stats.md create mode 100644 roles/stats/molecule/default/molecule.yml create mode 100644 roles/stats/molecule/default/side_effect.yml create mode 100644 roles/stats/molecule/default/verify.yml create mode 100644 roles/stats/molecule/default/verify_stopped.yml create mode 100644 roles/syncthing/docs/syncthing.md create mode 100644 roles/syncthing/molecule/default/molecule.yml create mode 100644 roles/syncthing/molecule/default/side_effect.yml create mode 100644 roles/syncthing/molecule/default/verify.yml create mode 100644 roles/syncthing/molecule/default/verify_stopped.yml create mode 100644 roles/tautulli/docs/tautulli.md create mode 100644 roles/tautulli/molecule/default/molecule.yml create mode 100644 roles/tautulli/molecule/default/side_effect.yml create mode 100644 roles/tautulli/molecule/default/verify.yml create mode 100644 roles/tautulli/molecule/default/verify_stopped.yml create mode 100644 roles/thelounge/docs/thelounge.md create mode 100644 roles/thelounge/molecule/default/molecule.yml create mode 100644 roles/thelounge/molecule/default/side_effect.yml create mode 100644 roles/thelounge/molecule/default/verify.yml create mode 100644 roles/thelounge/molecule/default/verify_stopped.yml create mode 100644 roles/tiddlywiki/docs/tiddlywiki.md create mode 100644 roles/tiddlywiki/molecule/default/molecule.yml create mode 100644 roles/tiddlywiki/molecule/default/side_effect.yml create mode 100644 roles/tiddlywiki/molecule/default/verify.yml create mode 100644 roles/tiddlywiki/molecule/default/verify_stopped.yml create mode 100644 roles/timemachine/docs/timemachine.md create mode 100644 roles/timemachine/molecule/default/molecule.yml create mode 100644 roles/timemachine/molecule/default/side_effect.yml create mode 100644 roles/timemachine/molecule/default/verify.yml create mode 100644 roles/timemachine/molecule/default/verify_stopped.yml create mode 100644 roles/traefik/docs/traefik.md create mode 100644 roles/traefik/molecule/default/molecule.yml create mode 100644 roles/traefik/molecule/default/side_effect.yml create mode 100644 roles/traefik/molecule/default/verify.yml create mode 100644 roles/traefik/molecule/default/verify_stopped.yml create mode 100644 roles/transmission-with-openvpn/docs/transmission.md create mode 100644 roles/transmission-with-openvpn/molecule/default/molecule.yml create mode 100644 roles/transmission-with-openvpn/molecule/default/side_effect.yml create mode 100644 roles/transmission-with-openvpn/molecule/default/verify.yml create mode 100644 roles/transmission-with-openvpn/molecule/default/verify_stopped.yml create mode 100644 roles/transmission/docs/transmission.md create mode 100644 roles/transmission/molecule/default/molecule.yml create mode 100644 roles/transmission/molecule/default/side_effect.yml create mode 100644 roles/transmission/molecule/default/verify.yml create mode 100644 roles/transmission/molecule/default/verify_stopped.yml create mode 100644 roles/ubooquity/docs/ubooquity.md create mode 100644 roles/ubooquity/molecule/default/molecule.yml create mode 100644 roles/ubooquity/molecule/default/side_effect.yml create mode 100644 roles/ubooquity/molecule/default/verify.yml create mode 100644 roles/ubooquity/molecule/default/verify_stopped.yml create mode 100644 roles/utorrent/docs/utorrent.md create mode 100644 roles/utorrent/molecule/default/molecule.yml create mode 100644 roles/utorrent/molecule/default/side_effect.yml create mode 100644 roles/utorrent/molecule/default/verify.yml create mode 100644 roles/utorrent/molecule/default/verify_stopped.yml create mode 100644 roles/virtual_desktop/docs/virtual_desktop.md create mode 100644 roles/virtual_desktop/molecule/default/molecule.yml create mode 100644 roles/virtual_desktop/molecule/default/side_effect.yml create mode 100644 roles/virtual_desktop/molecule/default/verify.yml create mode 100644 roles/virtual_desktop/molecule/default/verify_stopped.yml create mode 100644 roles/wallabag/docs/wallabag.md create mode 100644 roles/wallabag/molecule/default/molecule.yml create mode 100644 roles/wallabag/molecule/default/side_effect.yml create mode 100644 roles/wallabag/molecule/default/verify.yml create mode 100644 roles/wallabag/molecule/default/verify_stopped.yml create mode 100644 roles/watchtower/docs/watchtower.md create mode 100644 roles/watchtower/molecule/default/molecule.yml create mode 100644 roles/watchtower/molecule/default/side_effect.yml create mode 100644 roles/watchtower/molecule/default/verify.yml create mode 100644 roles/watchtower/molecule/default/verify_stopped.yml create mode 100644 roles/wireshark/docs/wireshark.md create mode 100644 roles/wireshark/molecule/default/molecule.yml create mode 100644 roles/wireshark/molecule/default/side_effect.yml create mode 100644 roles/wireshark/molecule/default/verify.yml create mode 100644 roles/wireshark/molecule/default/verify_stopped.yml create mode 100644 roles/woodpecker-ci/docs/woodpecker_ci.md create mode 100644 roles/woodpecker-ci/molecule/default/molecule.yml create mode 100644 roles/woodpecker-ci/molecule/default/prepare.yml create mode 100644 roles/woodpecker-ci/molecule/default/side_effect.yml create mode 100644 roles/woodpecker-ci/molecule/default/verify.yml create mode 100644 roles/woodpecker-ci/molecule/default/verify_stopped.yml create mode 100644 roles/youtubedlmaterial/docs/youtubedlmaterial.md create mode 100644 roles/youtubedlmaterial/molecule/default/molecule.yml create mode 100644 roles/youtubedlmaterial/molecule/default/side_effect.yml create mode 100644 roles/youtubedlmaterial/molecule/default/verify.yml create mode 100644 roles/youtubedlmaterial/molecule/default/verify_stopped.yml create mode 100644 roles/znc/docs/znc.md create mode 100644 roles/znc/molecule/default/molecule.yml create mode 100644 roles/znc/molecule/default/side_effect.yml create mode 100644 roles/znc/molecule/default/verify.yml create mode 100644 roles/znc/molecule/default/verify_stopped.yml create mode 100644 roles/znc/templates/znc.conf.j2 diff --git a/nas.yml b/nas.yml index 7833c0b0..b60460f6 100644 --- a/nas.yml +++ b/nas.yml @@ -304,109 +304,87 @@ - role: sabnzbd tags: - sabnzbd - when: (sabnzbd_enabled | default(False)) - role: sickchill tags: - sickchill - when: (sickchill_enabled | default(False)) - role: sonarr tags: - sonarr - when: (sonarr_enabled | default(False)) - role: speedtest-tracker tags: - speedtest-tracker - when: (speedtest_tracker_enabled | default(False)) - role: stats tags: - stats - when: (stats_enabled | default(False)) - role: syncthing tags: - syncthing - when: (syncthing_enabled | default(False)) - role: tautulli tags: - tautulli - when: (tautulli_enabled | default(False)) - role: thelounge tags: - thelounge - when: (thelounge_enabled | default(False)) - role: tiddlywiki tags: - tiddlywiki - when: (tiddlywiki_enabled | default(False)) - role: timemachine tags: - timemachine - when: (timemachine_enabled | default(False)) - role: traefik tags: - traefik - when: (traefik_enabled | default(False)) - role: transmission tags: - transmission - when: (transmission_enabled | default(False)) - role: transmission-with-openvpn tags: - transmission_with_openvpn - when: (transmission_with_openvpn_enabled | default(False)) - role: ubooquity tags: - ubooquity - when: (ubooquity_enabled | default(False)) - role: utorrent tags: - utorrent - when: (utorrent_enabled | default(False)) - role: virtual_desktop tags: - virtual_desktop - when: (virtual_desktop_enabled | default(False)) - role: wallabag tags: - wallabag - when: (wallabag_enabled | default(False)) - role: watchtower tags: - watchtower - when: (watchtower_enabled | default(False)) - role: wireshark tags: - wireshark - when: (wireshark_enabled | default(False)) - role: woodpecker-ci tags: - woodpecker_ci - when: (woodpecker_ci_enabled | default(False)) - role: youtubedlmaterial tags: - youtubedlmaterial - when: (youtubedlmaterial_enabled | default(False)) - role: znc tags: - znc - when: (znc_enabled | default(False)) diff --git a/roles/gitea/defaults/main.yml b/roles/gitea/defaults/main.yml index a83fbe95..7bb7b97b 100644 --- a/roles/gitea/defaults/main.yml +++ b/roles/gitea/defaults/main.yml @@ -7,6 +7,7 @@ gitea_data_directory: "{{ docker_home }}/gitea" # network gitea_hostname: "gitea" +gitea_network_name: "gitea" gitea_port_http: "3001" gitea_port_ssh: "222" @@ -16,4 +17,8 @@ gitea_mysql_memory: 1g # docker gitea_container_name: gitea +gitea_image_name: gitea/gitea +gitea_image_version: latest gitea_mysql_container_name: gitea-mysql +gitea_mysql_image_name: mysql +gitea_mysql_image_version: "5.7" diff --git a/roles/gitea/docs/gitea.md b/roles/gitea/docs/gitea.md new file mode 100644 index 00000000..ed2a2014 --- /dev/null +++ b/roles/gitea/docs/gitea.md @@ -0,0 +1,11 @@ +# Gitea + +Homepage: + +Gitea is a painless self-hosted Git service. + +## Usage + +Set `gitea_enabled: true` in your `inventories//nas.yml` file. + +The Gitea web interface can be found at . diff --git a/roles/gitea/molecule/default/molecule.yml b/roles/gitea/molecule/default/molecule.yml new file mode 100644 index 00000000..934916d3 --- /dev/null +++ b/roles/gitea/molecule/default/molecule.yml @@ -0,0 +1,7 @@ +--- +provisioner: + inventory: + group_vars: + all: + gitea_enabled: true + ansible_nas_hostname: ansible-nas diff --git a/roles/gitea/molecule/default/side_effect.yml b/roles/gitea/molecule/default/side_effect.yml new file mode 100644 index 00000000..7b75a3f9 --- /dev/null +++ b/roles/gitea/molecule/default/side_effect.yml @@ -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: + gitea_enabled: false diff --git a/roles/gitea/molecule/default/verify.yml b/roles/gitea/molecule/default/verify.yml new file mode 100644 index 00000000..d8924eb2 --- /dev/null +++ b/roles/gitea/molecule/default/verify.yml @@ -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 gitea container state + community.docker.docker_container: + name: "{{ gitea_container_name }}" + register: result + + - name: Check if gitea containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/gitea/molecule/default/verify_stopped.yml b/roles/gitea/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..0c3182e8 --- /dev/null +++ b/roles/gitea/molecule/default/verify_stopped.yml @@ -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 gitea + community.docker.docker_container: + name: "{{ gitea_container_name }}" + state: absent + register: result + + - name: Check if gitea is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/gitea/tasks/main.yml b/roles/gitea/tasks/main.yml index 0da9f232..b7b554bd 100644 --- a/roles/gitea/tasks/main.yml +++ b/roles/gitea/tasks/main.yml @@ -10,11 +10,19 @@ - "{{ gitea_data_directory }}/gitea" - "{{ gitea_data_directory }}/mysql" + - name: Create gitea network + community.docker.docker_network: + name: "{{ gitea_network_name }}" + - name: Create MySQL container for Gitea - docker_container: + community.docker.docker_container: + container_default_behavior: no_defaults name: "{{ gitea_mysql_container_name }}" - image: mysql:5.7 + image: "{{ gitea_mysql_image_name }}:{{ gitea_mysql_image_version }}" pull: true + networks: + - name: "{{ gitea_network_name }}" + network_mode: "{{ gitea_network_name }}" volumes: - "{{ gitea_data_directory }}/mysql:/var/lib/mysql:rw" env: @@ -26,12 +34,14 @@ memory: "{{ gitea_mysql_memory }}" - name: Create Gitea container - docker_container: - name: gitea - image: gitea/gitea:latest + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ gitea_container_name }}" + image: "{{ gitea_image_name }}:{{ gitea_image_version }}" pull: true - links: - - gitea-mysql:db + networks: + - name: "{{ gitea_network_name }}" + network_mode: "{{ gitea_network_name }}" volumes: - "{{ gitea_data_directory }}/gitea:/data:rw" ports: @@ -39,7 +49,7 @@ - "{{ gitea_port_ssh }}:22" env: DB_TYPE: "mysql" - DB_HOST: "db:3306" + DB_HOST: "{{ gitea_mysql_container_name }}:3306" DB_NAME: "gitea" DB_USER: "gitea" DB_PASSWD: "gitea" diff --git a/roles/sonarr/defaults/main.yml b/roles/sonarr/defaults/main.yml index 256f08fc..fe120377 100644 --- a/roles/sonarr/defaults/main.yml +++ b/roles/sonarr/defaults/main.yml @@ -15,5 +15,10 @@ sonarr_group_id: "0" sonarr_port: "8989" sonarr_hostname: "sonarr" +# docker +sonarr_container_name: "sonarr" +sonarr_image_name: "linuxserver/sonarr" +sonarr_image_version: "latest" + # specs sonarr_memory: 1g diff --git a/roles/sonarr/docs/sonarr.md b/roles/sonarr/docs/sonarr.md new file mode 100644 index 00000000..f856f75a --- /dev/null +++ b/roles/sonarr/docs/sonarr.md @@ -0,0 +1,22 @@ +# Sonarr + +Homepage: + +**Sonarr** is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows 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 `sonarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. + +The Sonarr web interface can be found at `http://ansible_nas_host_or_ip:8989` by default + +## Specific Configuration + +**First make sure Sonarr has permissions to write and read the `/download` and `/tv` folders**. Do this by ensuring the `sonarr_movies_directory:` and `sonarr_download_directory` settings are correct. + +Sonarr will get the file path from the Download client. On default settings with Transmission the path is `/storage/downloads/complete`. You will need to create a path mapping in the **Remote Path Mappings** settings under **Download Client** to point to your internal path that is by default `/downloads`. *If you have difficulties with the path mapping you could also just add a new volume path for the Transmission container and use `/downloads` as the download directory.* + +For Sonarr to understand that the `/tv` folder is a folder, you'll need to add a folder into it. +You can also do this by adding a random series to the folder. Keep in mind to have the setting **Create empty movie folders** on **yes** + +For comprehensive configuration instructions see the [Sonarr GitHub wiki](https://github.com/Sonarr/Sonarr/wiki) diff --git a/roles/sonarr/molecule/default/molecule.yml b/roles/sonarr/molecule/default/molecule.yml new file mode 100644 index 00000000..4c0a6d30 --- /dev/null +++ b/roles/sonarr/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + sonarr_enabled: true diff --git a/roles/sonarr/molecule/default/side_effect.yml b/roles/sonarr/molecule/default/side_effect.yml new file mode 100644 index 00000000..f3aaf103 --- /dev/null +++ b/roles/sonarr/molecule/default/side_effect.yml @@ -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: + sonarr_enabled: false diff --git a/roles/sonarr/molecule/default/verify.yml b/roles/sonarr/molecule/default/verify.yml new file mode 100644 index 00000000..15cbf349 --- /dev/null +++ b/roles/sonarr/molecule/default/verify.yml @@ -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 sonarr container state + community.docker.docker_container: + name: "{{ sonarr_container_name }}" + register: result + + - name: Check if sonarr containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/sonarr/molecule/default/verify_stopped.yml b/roles/sonarr/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..76a78fcc --- /dev/null +++ b/roles/sonarr/molecule/default/verify_stopped.yml @@ -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 sonarr + community.docker.docker_container: + name: "{{ sonarr_container_name }}" + state: absent + register: result + + - name: Check if sonarr is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/sonarr/tasks/main.yml b/roles/sonarr/tasks/main.yml index 4eeb70fa..3e429e8b 100644 --- a/roles/sonarr/tasks/main.yml +++ b/roles/sonarr/tasks/main.yml @@ -1,32 +1,44 @@ --- -- name: Create Sonarr Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ sonarr_data_directory }}" +- name: Start Sonarr + block: + - name: Create Sonarr Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ sonarr_data_directory }}" -- name: Sonarr - docker_container: - name: sonarr - image: linuxserver/sonarr - pull: true - volumes: - - "{{ sonarr_tv_directory }}:/tv:rw" - - "{{ sonarr_download_directory }}:/downloads:rw" - - "{{ sonarr_data_directory }}:/config:rw" - ports: - - "{{ sonarr_port }}:8989" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ sonarr_user_id }}" - PGID: "{{ sonarr_group_id }}" - restart_policy: unless-stopped - memory: "{{ sonarr_memory }}" - labels: - traefik.enable: "{{ sonarr_available_externally | string }}" - traefik.http.routers.sonarr.rule: "Host(`{{ sonarr_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.sonarr.tls.certresolver: "letsencrypt" - traefik.http.routers.sonarr.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.sonarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.sonarr.loadbalancer.server.port: "8989" + - name: Sonarr + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ sonarr_container_name }}" + image: "{{ sonarr_image_name }}:{{ sonarr_image_version }}" + pull: true + volumes: + - "{{ sonarr_tv_directory }}:/tv:rw" + - "{{ sonarr_download_directory }}:/downloads:rw" + - "{{ sonarr_data_directory }}:/config:rw" + ports: + - "{{ sonarr_port }}:8989" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ sonarr_user_id }}" + PGID: "{{ sonarr_group_id }}" + restart_policy: unless-stopped + memory: "{{ sonarr_memory }}" + labels: + traefik.enable: "{{ sonarr_available_externally | string }}" + traefik.http.routers.sonarr.rule: "Host(`{{ sonarr_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.sonarr.tls.certresolver: "letsencrypt" + traefik.http.routers.sonarr.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.sonarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.sonarr.loadbalancer.server.port: "8989" + when: sonarr_enabled is true + +- name: Stop Sonarr + block: + - name: Stop Sonarr + community.docker.docker_container: + name: "{{ sonarr_container_name }}" + state: absent + when: sonarr_enabled is false diff --git a/roles/speedtest-tracker/defaults/main.yml b/roles/speedtest-tracker/defaults/main.yml index 91505ca1..d0ad354f 100644 --- a/roles/speedtest-tracker/defaults/main.yml +++ b/roles/speedtest-tracker/defaults/main.yml @@ -3,7 +3,7 @@ speedtest_tracker_enabled: false speedtest_tracker_available_externally: false # directories -speedtest_data_directory: "{{ docker_home }}/speedtest_tracker/" +speedtest_data_directory: "{{ docker_home }}/speedtest_tracker" # uid / gid speedtest_tracker_user_id: "0" @@ -13,5 +13,10 @@ speedtest_tracker_group_id: "0" speedtest_tracker_port: "8765" speedtest_tracker_hostname: "speedtest-tracker" +# docker +speedtest_container_name: "speedtest-tracker" +speedtest_image_name: "henrywhitaker3/speedtest-tracker" +speedtest_image_version: "latest" + # specs speedtest_tracker_memory: 1g diff --git a/roles/speedtest-tracker/docs/speedtest.md b/roles/speedtest-tracker/docs/speedtest.md new file mode 100644 index 00000000..e88eb51f --- /dev/null +++ b/roles/speedtest-tracker/docs/speedtest.md @@ -0,0 +1,15 @@ +# Speedtest-Tracker + +Homepage: + +Docker Container: + +Continuously track your internet speed + +## Usage + +Set `speedtest_tracker_enabled: true` in your `inventories//nas.yml` file. + +If you want to access Speedtest-Tracker externally, don't forget to set `speedtest_tracker_available_externally: true` in your `inventories//nas.yml` file. + +The Speedtest-Tracker interface can be found at . diff --git a/roles/speedtest-tracker/molecule/default/molecule.yml b/roles/speedtest-tracker/molecule/default/molecule.yml new file mode 100644 index 00000000..aeaa6821 --- /dev/null +++ b/roles/speedtest-tracker/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + speedtest_enabled: true diff --git a/roles/speedtest-tracker/molecule/default/side_effect.yml b/roles/speedtest-tracker/molecule/default/side_effect.yml new file mode 100644 index 00000000..0a92588c --- /dev/null +++ b/roles/speedtest-tracker/molecule/default/side_effect.yml @@ -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: + speedtest_enabled: false diff --git a/roles/speedtest-tracker/molecule/default/verify.yml b/roles/speedtest-tracker/molecule/default/verify.yml new file mode 100644 index 00000000..a8faf3ec --- /dev/null +++ b/roles/speedtest-tracker/molecule/default/verify.yml @@ -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 speedtest container state + community.docker.docker_container: + name: "{{ speedtest_container_name }}" + register: result + + - name: Check if speedtest containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/speedtest-tracker/molecule/default/verify_stopped.yml b/roles/speedtest-tracker/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..8118ee41 --- /dev/null +++ b/roles/speedtest-tracker/molecule/default/verify_stopped.yml @@ -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 speedtest + community.docker.docker_container: + name: "{{ speedtest_container_name }}" + state: absent + register: result + + - name: Check if speedtest is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/speedtest-tracker/tasks/main.yml b/roles/speedtest-tracker/tasks/main.yml index e59920ad..bd1096a8 100644 --- a/roles/speedtest-tracker/tasks/main.yml +++ b/roles/speedtest-tracker/tasks/main.yml @@ -1,34 +1,48 @@ --- -- name: Speedtest-Tracker Directory - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ speedtest_data_directory }}/config" +- name: Start Speedtest-Tracker + block: + - name: Speedtest-Tracker Directory + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ speedtest_data_directory }}/config" -- name: Remove old Speedtest-Tracker Docker Container - docker_container: - name: speedtest_tracker - state: absent + - name: Remove old Speedtest-Tracker Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ speedtest_container_name }}" + state: absent + tags: molecule-idempotence-notest -- name: Speedtest-Tracker Docker Container - docker_container: - name: speedtest-tracker - image: henrywhitaker3/speedtest-tracker:latest - pull: true - volumes: - - "{{ speedtest_data_directory }}/config:/config:rw" - ports: - - "{{ speedtest_tracker_port }}:80" - env: - OOKLA_EULA_GDPR: "true" - TZ: "{{ ansible_nas_timezone }}" - restart_policy: unless-stopped - memory: "1g" - labels: - traefik.enable: "{{ speedtest_tracker_available_externally | string }}" - traefik.http.routers.speedtest_tracker.rule: "Host(`{{ speedtest_tracker_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.speedtest_tracker.tls.certresolver: "letsencrypt" - traefik.http.routers.speedtest_tracker.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.speedtest_tracker.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.speedtest_tracker.loadbalancer.server.port: "80" + - name: Speedtest-Tracker Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ speedtest_container_name }}" + image: "{{ speedtest_image_name }}:{{ speedtest_image_version }}" + pull: true + volumes: + - "{{ speedtest_data_directory }}/config:/config:rw" + ports: + - "{{ speedtest_tracker_port }}:80" + env: + OOKLA_EULA_GDPR: "true" + TZ: "{{ ansible_nas_timezone }}" + restart_policy: unless-stopped + memory: "1g" + labels: + traefik.enable: "{{ speedtest_tracker_available_externally | string }}" + traefik.http.routers.speedtest_tracker.rule: "Host(`{{ speedtest_tracker_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.speedtest_tracker.tls.certresolver: "letsencrypt" + traefik.http.routers.speedtest_tracker.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.speedtest_tracker.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.speedtest_tracker.loadbalancer.server.port: "80" + when: speedtest_enabled is true + +- name: Stop Speedtest-Tracker + block: + - name: Stop Speedtest-Tracker + community.docker.docker_container: + name: "{{ speedtest_container_name }}" + state: absent + when: speedtest_enabled is false diff --git a/roles/stats/defaults/main.yml b/roles/stats/defaults/main.yml index a0bd81f9..202531ca 100644 --- a/roles/stats/defaults/main.yml +++ b/roles/stats/defaults/main.yml @@ -21,6 +21,23 @@ stats_prometheus_hostname: "prometheus" stats_grafana_port: "3000" stats_grafana_hostname: "grafana" +# docker: +stats_grafana_container_name: "stats-grafana" +stats_grafana_image_name: "grafana/grafana" +stats_grafana_image_version: "latest" +stats_prometheus_container_name: "stats-prometheus" +stats_prometheus_image_name: "prom/prometheus" +stats_prometheus_image_version: "latest" +stats_telegraf_container_name: "stats-telegraf" +stats_telegraf_image_name: "telegraf" +stats_telegraf_image_version: "latest" +stats_smartctl_container_name: "stats-smartctl" +stats_smartctl_docker_image_name: "matusnovak/prometheus-smartctl" +stats_smartctl_docker_image_version: "latest" +stats_speedtest_container_name: "stats-speedtest" +stats_speedtest_docker_image_name: "miguelndecarvalho/speedtest-exporter" +stats_speedtest_docker_image_version: "latest" + # specs stats_telegraf_memory: 1g stats_prometheus_memory: 1g diff --git a/roles/stats/docs/stats.md b/roles/stats/docs/stats.md new file mode 100644 index 00000000..25620959 --- /dev/null +++ b/roles/stats/docs/stats.md @@ -0,0 +1,13 @@ +# Stats + +The stats role uses Prometheus, Grafana, Telegraf and a number of metrics exporters to collect and record lots of metrics about your NAS. + +Telegraf also exposes an InfluxDB endpoint for applications that require it. + +## Usage + +Set `stats_enabled: true` in your `inventories//nas.yml` file. If you want to gather metrics on your internet connection, enable `stats_internet_speed_test_enabled` too. + +If you want to access Grafana externally, set `stats_grafana_available_externally: true` in your `inventories//nas.yml` file. If you want to access Promethehus externally, set `stats_prometheus_available_externally: true` in your `inventories//nas.yml` file. + +The Grafana web interface can be found at , Prometheus can be found at diff --git a/roles/stats/molecule/default/molecule.yml b/roles/stats/molecule/default/molecule.yml new file mode 100644 index 00000000..d253635e --- /dev/null +++ b/roles/stats/molecule/default/molecule.yml @@ -0,0 +1,24 @@ +--- +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 +provisioner: + inventory: + group_vars: + all: + stats_enabled: true + stats_prometheus_enabled: true + stats_internet_speed_test_enabled: true + ansible_nas_hostname: "ansible-nas" + stats_grafana_data_directory: "/tmp/grafana/data" + stats_grafana_config_directory: "/tmp/grafana/config" + stats_prometheus_data_directory: "/tmp/prometheus/data" + stats_prometheus_config_directory: "/tmp/prometheus/config" + stats_telegraf_config_directory: "/tmp/telegraf/config" + stats_collection_interval: 15s diff --git a/roles/stats/molecule/default/side_effect.yml b/roles/stats/molecule/default/side_effect.yml new file mode 100644 index 00000000..887ccf16 --- /dev/null +++ b/roles/stats/molecule/default/side_effect.yml @@ -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: + stats_enabled: false diff --git a/roles/stats/molecule/default/verify.yml b/roles/stats/molecule/default/verify.yml new file mode 100644 index 00000000..4b08158d --- /dev/null +++ b/roles/stats/molecule/default/verify.yml @@ -0,0 +1,47 @@ +--- +- name: Verify + hosts: all + gather_facts: false + tasks: + - name: Include vars + include_vars: + file: ../../defaults/main.yml + + - name: Get Grafana container state + docker_container_info: + name: "{{ stats_grafana_container_name }}" + register: result_grafana + + - name: Get Prometheus container state + docker_container_info: + name: "{{ stats_prometheus_container_name }}" + register: result_prometheus + + - name: Get Telegraf container state + docker_container_info: + name: "{{ stats_telegraf_container_name }}" + register: result_telegraf + + - name: Get Smartctl container state + docker_container_info: + name: "{{ stats_smartctl_container_name }}" + register: result_smartctl + + - name: Get Speedtest container state + docker_container_info: + name: "{{ stats_speedtest_container_name }}" + register: result_speedtest + + - name: Check if stats docker containers are running + assert: + that: + - result_grafana.container['State']['Status'] == "running" + - result_grafana.container['State']['Restarting'] == false + - result_prometheus.container['State']['Status'] == "running" + - result_prometheus.container['State']['Restarting'] == false + - result_telegraf.container['State']['Status'] == "running" + - result_telegraf.container['State']['Restarting'] == false + - result_smartctl.container['State']['Status'] == "running" + - result_smartctl.container['State']['Restarting'] == false + - result_speedtest.container['State']['Status'] == "running" + - result_speedtest.container['State']['Restarting'] == false diff --git a/roles/stats/molecule/default/verify_stopped.yml b/roles/stats/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..7e04cfdb --- /dev/null +++ b/roles/stats/molecule/default/verify_stopped.yml @@ -0,0 +1,47 @@ +--- +- name: Verify + hosts: all + gather_facts: false + tasks: + - name: Include vars + include_vars: + file: ../../defaults/main.yml + + - name: Try and stop and remove Grafana + docker_container: + name: "{{ stats_grafana_container_name }}" + state: absent + register: result_grafana + + - name: Try and stop and remove Prometheus + docker_container: + name: "{{ stats_prometheus_container_name }}" + state: absent + register: result_prometheus + + - name: Try and stop and remove Telegraf + docker_container: + name: "{{ stats_telegraf_container_name }}" + state: absent + register: result_telegraf + + - name: Try and stop and remove Smartctl + docker_container: + name: "{{ stats_smartctl_container_name }}" + state: absent + register: result_smartctl + + - name: Try and stop and remove Speedtest + docker_container: + name: "{{ stats_speedtest_container_name }}" + state: absent + register: result_speedtest + + - name: Check if stats containers are stopped + assert: + that: + - not result_grafana.changed + - not result_prometheus.changed + - not result_telegraf.changed + - not result_smartctl.changed + - not result_speedtest.changed diff --git a/roles/stats/tasks/exporters.yml b/roles/stats/tasks/exporters.yml index 79965817..9e3a3313 100644 --- a/roles/stats/tasks/exporters.yml +++ b/roles/stats/tasks/exporters.yml @@ -1,22 +1,39 @@ --- -- name: Smartctl Exporter Docker Container - docker_container: - name: stats-smartctl - image: matusnovak/prometheus-smartctl:latest - pull: true - privileged: true - ports: - - "{{ stats_prometheus_smartctl_port }}:9902" - restart_policy: unless-stopped - memory: "{{ stats_prometheus_smartctl_memory }}" +- name: Start Exporters + block: + - name: Smartctl Exporter Docker Container + docker_container: + name: "{{ stats_smartctl_container_name }}" + image: "{{ stats_smartctl_docker_image_name }}:{{ stats_smartctl_docker_image_version }}" + container_default_behavior: no_defaults + pull: true + privileged: true + ports: + - "{{ stats_prometheus_smartctl_port }}:9902" + restart_policy: unless-stopped + memory: "{{ stats_prometheus_smartctl_memory }}" -- name: Speedtest Exporter Docker Container - docker_container: - name: stats-speedtest - image: miguelndecarvalho/speedtest-exporter - pull: true - ports: - "{{ stats_speedtest_exporter_port }}:9798" - restart_policy: unless-stopped - memory: "{{ stats_speedtest_exporter_memory }}" - when: stats_internet_speed_test_enabled + - name: Speedtest Exporter Docker Container + docker_container: + name: "{{ stats_speedtest_container_name }}" + image: "{{ stats_speedtest_docker_image_name }}:{{ stats_speedtest_docker_image_version }}" + container_default_behavior: no_defaults + pull: true + ports: + "{{ stats_speedtest_exporter_port }}:9798" + restart_policy: unless-stopped + memory: "{{ stats_speedtest_exporter_memory }}" + when: stats_internet_speed_test_enabled + when: stats_enabled is true + +- name: Stop Exporters + block: + - name: Stop Smartctl Exporter + docker_container: + name: "{{ stats_smartctl_container_name }}" + state: absent + - name: Stop Speedtest Exporter + docker_container: + name: "{{ stats_speedtest_container_name }}" + state: absent + when: stats_enabled is false diff --git a/roles/stats/tasks/grafana.yml b/roles/stats/tasks/grafana.yml index 78aab599..7d6b8b67 100644 --- a/roles/stats/tasks/grafana.yml +++ b/roles/stats/tasks/grafana.yml @@ -1,52 +1,64 @@ --- -- name: Create Grafana Directories - file: - path: "{{ item }}" - state: directory - owner: "472" - recurse: yes - with_items: - - "{{ stats_grafana_data_directory }}" - - "{{ stats_grafana_config_directory }}" - - "{{ stats_grafana_config_directory }}/dashboards" - - "{{ stats_grafana_config_directory }}/provisioning/datasources" - - "{{ stats_grafana_config_directory }}/provisioning/dashboards" +- name: Start Grafana + block: + - name: Create Grafana Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + owner: "472" + recurse: yes + with_items: + - "{{ stats_grafana_data_directory }}" + - "{{ stats_grafana_config_directory }}" + - "{{ stats_grafana_config_directory }}/dashboards" + - "{{ stats_grafana_config_directory }}/provisioning/datasources" + - "{{ stats_grafana_config_directory }}/provisioning/dashboards" -- name: Template Grafana data source - template: - src: datasources/ansible-nas.yml - dest: "{{ stats_grafana_config_directory }}/provisioning/datasources/ansible-nas.yml" + - name: Template Grafana data source + ansible.builtin.template: + src: datasources/ansible-nas.yml + dest: "{{ stats_grafana_config_directory }}/provisioning/datasources/ansible-nas.yml" -- name: Copy Grafana dashboards configuration - copy: - src: dashboards/ansible-nas.yml - dest: "{{ stats_grafana_config_directory }}/provisioning/dashboards/ansible-nas.yml" + - name: Copy Grafana dashboards configuration + ansible.builtin.copy: + src: dashboards/ansible-nas.yml + dest: "{{ stats_grafana_config_directory }}/provisioning/dashboards/ansible-nas.yml" -- name: Copy Grafana Ansible-NAS dashboard - copy: - src: dashboards/ansible-nas-overview.json - dest: "{{ stats_grafana_config_directory }}/dashboards/ansible-nas-overview.json" + - name: Copy Grafana Ansible-NAS dashboard + ansible.builtin.copy: + src: dashboards/ansible-nas-overview.json + dest: "{{ stats_grafana_config_directory }}/dashboards/ansible-nas-overview.json" -- name: Grafana Docker Container - docker_container: - name: grafana - image: grafana/grafana - pull: true - volumes: - - "{{ stats_grafana_data_directory }}:/var/lib/grafana:rw" - - "{{ stats_grafana_config_directory }}/provisioning:/etc/grafana/provisioning:ro" - - "{{ stats_grafana_config_directory }}/dashboards:/etc/dashboards:ro" - ports: - - "{{ stats_grafana_port }}:3000" - env: - GF_PLUGINS_ENABLE_ALPHA: "true" - GF_UNIFIED_ALERTING_ENABLED: "true" - restart_policy: unless-stopped - memory: 1g - labels: - traefik.enable: "{{ stats_grafana_available_externally | string }}" - traefik.http.routers.grafana.rule: "Host(`grafana.{{ ansible_nas_domain }}`) " - traefik.http.routers.grafana.tls.certresolver: "letsencrypt" - traefik.http.routers.grafana.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.grafana.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.grafana.loadbalancer.server.port: "3000" + - name: Grafana Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ stats_grafana_container_name }}" + image: "{{ stats_grafana_image_name }}:{{ stats_grafana_image_version }}" + pull: true + volumes: + - "{{ stats_grafana_data_directory }}:/var/lib/grafana:rw" + - "{{ stats_grafana_config_directory }}/provisioning:/etc/grafana/provisioning:ro" + - "{{ stats_grafana_config_directory }}/dashboards:/etc/dashboards:ro" + ports: + - "{{ stats_grafana_port }}:3000" + env: + GF_PLUGINS_ENABLE_ALPHA: "true" + GF_UNIFIED_ALERTING_ENABLED: "true" + restart_policy: unless-stopped + memory: 1g + labels: + traefik.enable: "{{ stats_grafana_available_externally | string }}" + traefik.http.routers.grafana.rule: "Host(`grafana.{{ ansible_nas_domain }}`) " + traefik.http.routers.grafana.tls.certresolver: "letsencrypt" + traefik.http.routers.grafana.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.grafana.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.grafana.loadbalancer.server.port: "3000" + when: stats_enabled is true + +- name: Stop Grafana + block: + - name: Stop Grafana + community.docker.docker_container: + name: "{{ stats_grafana_container_name }}" + state: absent + when: stats_enabled is false diff --git a/roles/stats/tasks/prometheus.yml b/roles/stats/tasks/prometheus.yml index f4a8c062..e3ac25ae 100644 --- a/roles/stats/tasks/prometheus.yml +++ b/roles/stats/tasks/prometheus.yml @@ -1,46 +1,58 @@ --- -- name: Create Prometheus Config Directory - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ stats_prometheus_data_directory }}" - - "{{ stats_prometheus_config_directory }}" +- name: Start Prometheus + block: + - name: Create Prometheus Config Directory + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ stats_prometheus_data_directory }}" + - "{{ stats_prometheus_config_directory }}" -- name: Create Prometheus Data Directory - file: - path: "{{ item }}" - state: directory - mode: 0777 - with_items: - - "{{ stats_prometheus_data_directory }}" - - "{{ stats_prometheus_config_directory }}" + - name: Create Prometheus Data Directory + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: 0777 + with_items: + - "{{ stats_prometheus_data_directory }}" + - "{{ stats_prometheus_config_directory }}" -- name: Template Prometheus config - template: - src: prometheus.yml - dest: "{{ stats_prometheus_config_directory }}/prometheus.yml" - register: prometheus_config + - name: Template Prometheus config + ansible.builtin.template: + src: prometheus.yml + dest: "{{ stats_prometheus_config_directory }}/prometheus.yml" + register: prometheus_config -- name: Prometheus Docker Container - docker_container: - name: stats-prometheus - image: prom/prometheus - pull: true - volumes: - - "{{ stats_prometheus_config_directory }}/prometheus.yml:/etc/prometheus/prometheus.yml:ro" - - "{{ stats_prometheus_data_directory }}:/prometheus:rw" - - "/etc/timezone:/etc/timezone:ro" - ports: - - "{{ stats_prometheus_port }}:9090" - restart_policy: unless-stopped - memory: "{{ stats_prometheus_memory }}" - restart: "{{ prometheus_config is changed }}" - command: "--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.retention.size={{ stats_prometheus_retention_size }} --storage.tsdb.retention.time={{ stats_prometheus_retention_time }}" - labels: - traefik.enable: "{{ stats_prometheus_available_externally | string }}" - traefik.http.routers.prometheus.rule: "Host(`{{ stats_prometheus_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.prometheus.tls.certresolver: "letsencrypt" - traefik.http.routers.prometheus.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.prometheus.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.prometheus.loadbalancer.server.port: "9090" + - name: Prometheus Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ stats_prometheus_container_name }}" + image: "{{ stats_prometheus_image_name }}:{{ stats_prometheus_image_version }}" + pull: true + volumes: + - "{{ stats_prometheus_config_directory }}/prometheus.yml:/etc/prometheus/prometheus.yml:ro" + - "{{ stats_prometheus_data_directory }}:/prometheus:rw" + - "/etc/timezone:/etc/timezone:ro" + ports: + - "{{ stats_prometheus_port }}:9090" + restart_policy: unless-stopped + memory: "{{ stats_prometheus_memory }}" + restart: "{{ prometheus_config is changed }}" + command: "--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.retention.size={{ stats_prometheus_retention_size }} --storage.tsdb.retention.time={{ stats_prometheus_retention_time }}" + labels: + traefik.enable: "{{ stats_prometheus_available_externally | string }}" + traefik.http.routers.prometheus.rule: "Host(`{{ stats_prometheus_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.prometheus.tls.certresolver: "letsencrypt" + traefik.http.routers.prometheus.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.prometheus.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.prometheus.loadbalancer.server.port: "9090" + when: stats_enabled is true + +- name: Stop Prometheus + block: + - name: Stop Prometheus + community.docker.docker_container: + name: "{{ stats_prometheus_container_name }}" + state: absent + when: stats_enabled is false diff --git a/roles/stats/tasks/telegraf.yml b/roles/stats/tasks/telegraf.yml index 0f087957..7d0bc716 100644 --- a/roles/stats/tasks/telegraf.yml +++ b/roles/stats/tasks/telegraf.yml @@ -1,49 +1,61 @@ --- -- name: Create Telegraf Directory - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ stats_telegraf_config_directory }}" +- name: Start Telegraf + block: + - name: Create Telegraf Directory + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ stats_telegraf_config_directory }}" -- name: Template telegraf.conf - template: - src: telegraf.conf.j2 - dest: "{{ stats_telegraf_config_directory }}/telegraf.conf" - register: telegraf_config + - name: Template telegraf.conf + ansible.builtin.template: + src: telegraf.conf.j2 + dest: "{{ stats_telegraf_config_directory }}/telegraf.conf" + register: telegraf_config -- name: Get Docker daemon uid - command: stat -c '%g' /var/run/docker.sock - register: docker_uid - changed_when: false + - name: Get Docker daemon uid + ansible.builtin.command: stat -c '%g' /var/run/docker.sock + register: docker_uid + changed_when: false -- name: Telegraf Docker Container - docker_container: - name: stats-telegraf - image: telegraf - pull: true - privileged: true - ipc_mode: host - ports: - - "{{ stats_telegraf_influxdb_port }}:8086" - - "{{ stats_telegraf_port }}:9273" - user: "telegraf:{{ docker_uid.stdout }}" - volumes: - - "{{ stats_telegraf_config_directory }}/telegraf.conf:/etc/telegraf/telegraf.conf:ro" - - "/var/run/docker.sock:/var/run/docker.sock:ro" - - "/:/hostfs:ro" - - "/etc:/hostfs/etc:ro" - - "/proc:/hostfs/proc:ro" - - "/sys:/hostfs/sys:ro" - - "/var:/hostfs/var:ro" - - "/run:/hostfs/run:ro" - env: - HOST_ETC: "/hostfs/etc" - HOST_PROC: "/hostfs/proc" - HOST_SYS: "/hostfs/sys" - HOST_VAR: "/hostfs/var" - HOST_RUN: "/hostfs/run" - HOST_MOUNT_PREFIX: "/hostfs" - restart_policy: unless-stopped - memory: 1g - restart: "{{ telegraf_config is changed }}" + - name: Telegraf Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ stats_telegraf_container_name }}" + image: "{{ stats_telegraf_image_name }}:{{ stats_telegraf_image_version }}" + pull: true + privileged: true + ipc_mode: host + ports: + - "{{ stats_telegraf_influxdb_port }}:8086" + - "{{ stats_telegraf_port }}:9273" + user: "telegraf:{{ docker_uid.stdout }}" + volumes: + - "{{ stats_telegraf_config_directory }}:/etc/telegraf/:ro" + - "/var/run/docker.sock:/var/run/docker.sock:ro" + - "/:/hostfs:ro" + - "/etc:/hostfs/etc:ro" + - "/proc:/hostfs/proc:ro" + - "/sys:/hostfs/sys:ro" + - "/var:/hostfs/var:ro" + - "/run:/hostfs/run:ro" + env: + HOST_ETC: "/hostfs/etc" + HOST_PROC: "/hostfs/proc" + HOST_SYS: "/hostfs/sys" + HOST_VAR: "/hostfs/var" + HOST_RUN: "/hostfs/run" + HOST_MOUNT_PREFIX: "/hostfs" + restart_policy: unless-stopped + memory: 1g + restart: "{{ telegraf_config is changed }}" + when: stats_enabled is true + +- name: Stop Telegraf + block: + - name: Stop stats_telegraf + community.docker.docker_container: + name: "{{ stats_telegraf_container_name }}" + state: absent + when: stats_enabled is false diff --git a/roles/syncthing/defaults/main.yml b/roles/syncthing/defaults/main.yml index 1d139a0c..de977b96 100644 --- a/roles/syncthing/defaults/main.yml +++ b/roles/syncthing/defaults/main.yml @@ -19,5 +19,10 @@ syncthing_group_id: "0" syncthing_port: 8384 syncthing_hostname: syncthing +# docker +syncthing_container_name: "syncthing" +syncthing_image_name: "syncthing/syncthing" +syncthing_image_version: "latest" + # specs syncthing_memory: 1g diff --git a/roles/syncthing/docs/syncthing.md b/roles/syncthing/docs/syncthing.md new file mode 100644 index 00000000..27d0ad9e --- /dev/null +++ b/roles/syncthing/docs/syncthing.md @@ -0,0 +1,27 @@ +# Syncthing + +Homepage: + +Github: + +Docker: + +Syncthing is a continuous file synchronization program. It synchronizes files +between two or more computers. It strives to fulfill the goals below in summary. +Syncthing should be: + +1. Safe From Data Loss +2. Secure Against Attackers +3. Easy to Use +4. Automatic +5. Universally Available +6. For Individuals +7. For eveything else see the goals document + +## Usage + +Set `syncthing_enabled: true` in your `\inventories\[my inventory]\group_vars\nas.yml` file. + +## Specific Configuration + +Open the web interface at :8384 to configure. diff --git a/roles/syncthing/molecule/default/molecule.yml b/roles/syncthing/molecule/default/molecule.yml new file mode 100644 index 00000000..488a27b0 --- /dev/null +++ b/roles/syncthing/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + syncthing_enabled: true diff --git a/roles/syncthing/molecule/default/side_effect.yml b/roles/syncthing/molecule/default/side_effect.yml new file mode 100644 index 00000000..f34fce7e --- /dev/null +++ b/roles/syncthing/molecule/default/side_effect.yml @@ -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: + syncthing_enabled: false diff --git a/roles/syncthing/molecule/default/verify.yml b/roles/syncthing/molecule/default/verify.yml new file mode 100644 index 00000000..09439f5d --- /dev/null +++ b/roles/syncthing/molecule/default/verify.yml @@ -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 syncthing container state + community.docker.docker_container: + name: "{{ syncthing_container_name }}" + register: result + + - name: Check if syncthing containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/syncthing/molecule/default/verify_stopped.yml b/roles/syncthing/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..e7511873 --- /dev/null +++ b/roles/syncthing/molecule/default/verify_stopped.yml @@ -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 syncthing + community.docker.docker_container: + name: "{{ syncthing_container_name }}" + state: absent + register: result + + - name: Check if syncthing is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/syncthing/tasks/main.yml b/roles/syncthing/tasks/main.yml index da7f69fa..b3ce9c6c 100644 --- a/roles/syncthing/tasks/main.yml +++ b/roles/syncthing/tasks/main.yml @@ -1,30 +1,42 @@ --- -- name: Create Syncthing Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ syncthing_data_directory }}" +- name: Start Syncthing + block: + - name: Create Syncthing Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ syncthing_data_directory }}" -- name: Syncthing Docker Container - docker_container: - name: syncthing - image: syncthing/syncthing:latest - pull: true - ports: - - "{{ syncthing_port }}:8384" - - "22000:22000/tcp" - - "22000:22000/udp" - env: - PUID: "{{ syncthing_user_id }}" - PGID: "{{ syncthing_group_id }}" - volumes: "{{ syncthing_volumes }}" - restart_policy: unless-stopped - memory: "{{ syncthing_memory }}" - labels: - traefik.enable: "{{ syncthing_available_externally | string }}" - traefik.http.routers.syncthing.rule: "Host(`{{ syncthing_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.syncthing.tls.certresolver: "letsencrypt" - traefik.http.routers.syncthing.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.syncthing.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.syncthing.loadbalancer.server.port: "8384" + - name: Syncthing Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ syncthing_container_name }}" + image: "{{ syncthing_image_name }}:{{ syncthing_image_version }}" + pull: true + ports: + - "{{ syncthing_port }}:8384" + - "22000:22000/tcp" + - "22000:22000/udp" + env: + PUID: "{{ syncthing_user_id }}" + PGID: "{{ syncthing_group_id }}" + volumes: "{{ syncthing_volumes }}" + restart_policy: unless-stopped + memory: "{{ syncthing_memory }}" + labels: + traefik.enable: "{{ syncthing_available_externally | string }}" + traefik.http.routers.syncthing.rule: "Host(`{{ syncthing_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.syncthing.tls.certresolver: "letsencrypt" + traefik.http.routers.syncthing.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.syncthing.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.syncthing.loadbalancer.server.port: "8384" + when: syncthing_enabled is true + +- name: Stop Syncthing + block: + - name: Stop Syncthing + community.docker.docker_container: + name: "{{ syncthing_container_name }}" + state: absent + when: syncthing_enabled is false diff --git a/roles/tautulli/defaults/main.yml b/roles/tautulli/defaults/main.yml index b908d1be..35ab1ac0 100644 --- a/roles/tautulli/defaults/main.yml +++ b/roles/tautulli/defaults/main.yml @@ -13,5 +13,10 @@ tautulli_group_id: "0" tautulli_hostname: "tautulli" tautulli_port: "8185" +# docker +tautulli_container_name: "tautulli" +tautulli_image_name: "linuxserver/tautulli" +tautulli_image_version: "latest" + # specs tautulli_memory: "1g" diff --git a/roles/tautulli/docs/tautulli.md b/roles/tautulli/docs/tautulli.md new file mode 100644 index 00000000..3f1ce59f --- /dev/null +++ b/roles/tautulli/docs/tautulli.md @@ -0,0 +1,11 @@ +# Tautulli + +Homepage: + +Tautulli allows you to monitor your Plex Media Server. + +## Usage + +Set `tautulli_enabled: true` in your `inventories//nas.yml` file. + +The Tautulli web interface can be found at . diff --git a/roles/tautulli/molecule/default/molecule.yml b/roles/tautulli/molecule/default/molecule.yml new file mode 100644 index 00000000..00030527 --- /dev/null +++ b/roles/tautulli/molecule/default/molecule.yml @@ -0,0 +1,7 @@ +--- +provisioner: + inventory: + group_vars: + all: + tautulli_enabled: true + plex_logs: "/tmp/log" \ No newline at end of file diff --git a/roles/tautulli/molecule/default/side_effect.yml b/roles/tautulli/molecule/default/side_effect.yml new file mode 100644 index 00000000..5d26b19a --- /dev/null +++ b/roles/tautulli/molecule/default/side_effect.yml @@ -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: + tautulli_enabled: false diff --git a/roles/tautulli/molecule/default/verify.yml b/roles/tautulli/molecule/default/verify.yml new file mode 100644 index 00000000..7fe57d05 --- /dev/null +++ b/roles/tautulli/molecule/default/verify.yml @@ -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 tautulli container state + community.docker.docker_container: + name: "{{ tautulli_container_name }}" + register: result + + - name: Check if tautulli containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/tautulli/molecule/default/verify_stopped.yml b/roles/tautulli/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..c47aaab9 --- /dev/null +++ b/roles/tautulli/molecule/default/verify_stopped.yml @@ -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 tautulli + community.docker.docker_container: + name: "{{ tautulli_container_name }}" + state: absent + register: result + + - name: Check if tautulli is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/tautulli/tasks/main.yml b/roles/tautulli/tasks/main.yml index ae986bcf..66e293f0 100644 --- a/roles/tautulli/tasks/main.yml +++ b/roles/tautulli/tasks/main.yml @@ -1,33 +1,45 @@ --- -- name: Create Tautulli Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ tautulli_config_directory }}" - - "{{ plex_logs }}" +- name: Start Tautulli + block: + - name: Create Tautulli Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ tautulli_config_directory }}" + - "{{ plex_logs }}" -- name: Tautulli Docker Container - docker_container: - name: tautulli - image: linuxserver/tautulli - pull: true - volumes: - - "{{ tautulli_config_directory }}:/config:rw" - - "{{ plex_logs }}:/logs:ro" - ports: - - "{{ tautulli_port }}:8181" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ tautulli_user_id }}" - PGID: "{{ tautulli_group_id }}" - restart_policy: unless-stopped - memory: "{{ tautulli_memory }}" - labels: - traefik.enable: "{{ tautulli_available_externally | string }}" - traefik.http.routers.tautulli.rule: "Host(`{{ tautulli_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.tautulli.tls.certresolver: "letsencrypt" - traefik.http.routers.tautulli.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.tautulli.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.tautulli.loadbalancer.server.port: "8181" + - name: Tautulli Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ tautulli_container_name }}" + image: "{{ tautulli_image_name }}:{{ tautulli_image_version }}" + pull: true + volumes: + - "{{ tautulli_config_directory }}:/config:rw" + - "{{ plex_logs }}:/logs:ro" + ports: + - "{{ tautulli_port }}:8181" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ tautulli_user_id }}" + PGID: "{{ tautulli_group_id }}" + restart_policy: unless-stopped + memory: "{{ tautulli_memory }}" + labels: + traefik.enable: "{{ tautulli_available_externally | string }}" + traefik.http.routers.tautulli.rule: "Host(`{{ tautulli_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.tautulli.tls.certresolver: "letsencrypt" + traefik.http.routers.tautulli.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.tautulli.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.tautulli.loadbalancer.server.port: "8181" + when: tautulli_enabled is true + +- name: Stop Tautulli + block: + - name: Stop Tautulli + community.docker.docker_container: + name: "{{ tautulli_container_name }}" + state: absent + when: tautulli_enabled is false diff --git a/roles/thelounge/defaults/main.yml b/roles/thelounge/defaults/main.yml index 96b91dbf..50b74fe7 100644 --- a/roles/thelounge/defaults/main.yml +++ b/roles/thelounge/defaults/main.yml @@ -12,3 +12,6 @@ thelounge_hostname: thelounge # Container thelounge_memory: 1g +thelounge_container_name: "thelounge" +thelounge_image_name: "thelounge/thelounge" +thelounge_image_version: "latest" diff --git a/roles/thelounge/docs/thelounge.md b/roles/thelounge/docs/thelounge.md new file mode 100644 index 00000000..2dadc212 --- /dev/null +++ b/roles/thelounge/docs/thelounge.md @@ -0,0 +1,16 @@ +# The Lounge" + + +Homepage: + +The Lounge is a self-hosted web IRC client. + +## Usage + +Set `thelounge_enabled: true` in your `inventories//nas.yml` file. + +The Lounge web interface can be found at . + +## Specific Configuration + +The default username and password is `admin`. Change this once you've logged in! diff --git a/roles/thelounge/molecule/default/molecule.yml b/roles/thelounge/molecule/default/molecule.yml new file mode 100644 index 00000000..417212a1 --- /dev/null +++ b/roles/thelounge/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + thelounge_enabled: true diff --git a/roles/thelounge/molecule/default/side_effect.yml b/roles/thelounge/molecule/default/side_effect.yml new file mode 100644 index 00000000..7aa48bcc --- /dev/null +++ b/roles/thelounge/molecule/default/side_effect.yml @@ -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: + thelounge_enabled: false diff --git a/roles/thelounge/molecule/default/verify.yml b/roles/thelounge/molecule/default/verify.yml new file mode 100644 index 00000000..ad0b83cc --- /dev/null +++ b/roles/thelounge/molecule/default/verify.yml @@ -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 thelounge container state + community.docker.docker_container: + name: "{{ thelounge_container_name }}" + register: result + + - name: Check if thelounge containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/thelounge/molecule/default/verify_stopped.yml b/roles/thelounge/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..8dbdaa1d --- /dev/null +++ b/roles/thelounge/molecule/default/verify_stopped.yml @@ -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 thelounge + community.docker.docker_container: + name: "{{ thelounge_container_name }}" + state: absent + register: result + + - name: Check if thelounge is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/thelounge/tasks/main.yml b/roles/thelounge/tasks/main.yml index b7cd3d05..3f32a4b9 100644 --- a/roles/thelounge/tasks/main.yml +++ b/roles/thelounge/tasks/main.yml @@ -1,35 +1,47 @@ --- -- name: The Lounge Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ thelounge_data_directory }}" - - "{{ thelounge_data_directory }}/users" +- name: Start The Lounge + block: + - name: The Lounge Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ thelounge_data_directory }}" + - "{{ thelounge_data_directory }}/users" -- name: Set up admin user - copy: - src: admin.json - dest: "{{ thelounge_data_directory }}/users/admin.json" - mode: 0777 + - name: Set up admin user + ansible.builtin.copy: + src: admin.json + dest: "{{ thelounge_data_directory }}/users/admin.json" + mode: 0777 -- name: The Lounge Docker Container - docker_container: - name: thelounge - image: thelounge/thelounge:latest - pull: true - ports: - - "{{ thelounge_port_one }}:9001" - - "{{ thelounge_port_two }}:9000" - volumes: - - "{{ thelounge_data_directory }}:/var/opt/thelounge" - - "/var/run/dbus:/var/run/dbus" - restart_policy: unless-stopped - memory: "{{ thelounge_memory }}" - labels: - traefik.enable: "{{ thelounge_available_externally | string }}" - traefik.http.routers.thelounge.rule: "Host(`{{ thelounge_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.thelounge.tls.certresolver: "letsencrypt" - traefik.http.routers.thelounge.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.thelounge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.thelounge.loadbalancer.server.port: "9000" + - name: The Lounge Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ thelounge_container_name }}" + image: "{{ thelounge_image_name }}:{{ thelounge_image_version }}" + pull: true + ports: + - "{{ thelounge_port_one }}:9001" + - "{{ thelounge_port_two }}:9000" + volumes: + - "{{ thelounge_data_directory }}:/var/opt/thelounge" + - "/var/run/dbus:/var/run/dbus" + restart_policy: unless-stopped + memory: "{{ thelounge_memory }}" + labels: + traefik.enable: "{{ thelounge_available_externally | string }}" + traefik.http.routers.thelounge.rule: "Host(`{{ thelounge_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.thelounge.tls.certresolver: "letsencrypt" + traefik.http.routers.thelounge.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.thelounge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.thelounge.loadbalancer.server.port: "9000" + when: thelounge_enabled is true + +- name: Stop The Lounge + block: + - name: Stop The Lounge + community.docker.docker_container: + name: "{{ thelounge_container_name }}" + state: absent + when: thelounge_enabled is false diff --git a/roles/tiddlywiki/defaults/main.yml b/roles/tiddlywiki/defaults/main.yml index 9b4b69f1..c5ef7468 100644 --- a/roles/tiddlywiki/defaults/main.yml +++ b/roles/tiddlywiki/defaults/main.yml @@ -21,3 +21,6 @@ tiddlywiki_hostname: tiddlywiki # Container tiddlywiki_memory: 512MB +tiddlywiki_container_name: "tiddlywiki" +tiddlywiki_image_name: "wmudge/tiddlywiki" +tiddlywiki_image_version: "latest" diff --git a/roles/tiddlywiki/docs/tiddlywiki.md b/roles/tiddlywiki/docs/tiddlywiki.md new file mode 100644 index 00000000..cb161d5d --- /dev/null +++ b/roles/tiddlywiki/docs/tiddlywiki.md @@ -0,0 +1,34 @@ +# TiddlyWiki + +Homepage: + +TiddlyWiki is a unique non-linear notebook for capturing, organizing, and sharing complex information. Use it to keep your to-do list, to plan an essay or novel, or to organise your wedding. Record every thought that crosses your brain, or build a flexible and responsive website. Unlike conventional online services, TiddlyWiki lets you choose where to keep your data, guaranteeing that in the decades to come you will still be able to use the notes you take today. + +## Usage + +Set `tiddlywiki_enabled: true` in your `inventories//nas.yml` file. + +If you want to access TiddlyWiki externally, set `tiddlywiki_available_externally: true` in your `inventories//nas.yml` file. + +The TiddlyWiki web interface can be found at . + +## Specific Configuration + +The TiddlyWiki role has several configuration parameters. All parameters are optional. + +### Data and Networking + +| Parameter | Description | +|---------------------------|-------------------------------| +| tiddlywiki_data_directory | Host location to store data | +| tiddlywiki_port | Host port for internal access | +| tiddlywiki_hostname | Subdomain for external access | + +### Server Configuration + +| Parameter | Description | +|------------------------|--------------------------| +| tiddlywiki_username | Basic Auth username | +| tiddlywiki_password | Basic Auth password | +| tiddlywiki_node_memory | NodeJS memory allocation | +| tiddlywiki_debug_level | Service debugging | diff --git a/roles/tiddlywiki/molecule/default/molecule.yml b/roles/tiddlywiki/molecule/default/molecule.yml new file mode 100644 index 00000000..42fbe1c5 --- /dev/null +++ b/roles/tiddlywiki/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + tiddlywiki_enabled: true diff --git a/roles/tiddlywiki/molecule/default/side_effect.yml b/roles/tiddlywiki/molecule/default/side_effect.yml new file mode 100644 index 00000000..78c74abf --- /dev/null +++ b/roles/tiddlywiki/molecule/default/side_effect.yml @@ -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: + tiddlywiki_enabled: false diff --git a/roles/tiddlywiki/molecule/default/verify.yml b/roles/tiddlywiki/molecule/default/verify.yml new file mode 100644 index 00000000..cefc8177 --- /dev/null +++ b/roles/tiddlywiki/molecule/default/verify.yml @@ -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 tiddlywiki container state + community.docker.docker_container: + name: "{{ tiddlywiki_container_name }}" + register: result + + - name: Check if tiddlywiki containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/tiddlywiki/molecule/default/verify_stopped.yml b/roles/tiddlywiki/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..debf551c --- /dev/null +++ b/roles/tiddlywiki/molecule/default/verify_stopped.yml @@ -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 tiddlywiki + community.docker.docker_container: + name: "{{ tiddlywiki_container_name }}" + state: absent + register: result + + - name: Check if tiddlywiki is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/tiddlywiki/tasks/main.yml b/roles/tiddlywiki/tasks/main.yml index 220d1f22..4be056a5 100644 --- a/roles/tiddlywiki/tasks/main.yml +++ b/roles/tiddlywiki/tasks/main.yml @@ -1,29 +1,41 @@ --- -- name: Create Tiddlywiki Directory - file: - path: "{{ tiddlywiki_data_directory }}" - state: directory +- name: Start Tiddlywiki + block: + - name: Create Tiddlywiki Directory + ansible.builtin.file: + path: "{{ tiddlywiki_data_directory }}" + state: directory -- name: Create Tiddlywiki Container - docker_container: - name: tiddlywiki - image: wmudge/tiddlywiki:latest - ports: - - "{{ tiddlywiki_port }}:8080" - volumes: - - "{{ tiddlywiki_data_directory }}:/var/lib/tiddlywiki" - env: - NODE_MEM: "{{ tiddlywiki_node_memory | default(omit) }}" - USERNAME: "{{ tiddlywiki_username | default(omit) }}" - PASSWORD: "{{ tiddlywiki_password | default(omit) }}" - DEBUG: "{{ tiddlywiki_debug_level | default(omit) }}" - pull: true - restart_policy: unless-stopped - memory: "{{ tiddlywiki_memory }}" - labels: - traefik.enable: "{{ tiddlywiki_available_externally | string }}" - traefik.http.routers.tiddlywiki.rule: "Host(`{{ tiddlywiki_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.tiddlywiki.tls.certresolver: "letsencrypt" - traefik.http.routers.tiddlywiki.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.tiddlywiki.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.tiddlywiki.loadbalancer.server.port: "8080" + - name: Create Tiddlywiki Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ tiddlywiki_container_name }}" + image: "{{ tiddlywiki_image_name }}:{{ tiddlywiki_image_version }}" + ports: + - "{{ tiddlywiki_port }}:8080" + volumes: + - "{{ tiddlywiki_data_directory }}:/var/lib/tiddlywiki" + env: + NODE_MEM: "{{ tiddlywiki_node_memory | default(omit) }}" + USERNAME: "{{ tiddlywiki_username | default(omit) }}" + PASSWORD: "{{ tiddlywiki_password | default(omit) }}" + DEBUG: "{{ tiddlywiki_debug_level | default(omit) }}" + pull: true + restart_policy: unless-stopped + memory: "{{ tiddlywiki_memory }}" + labels: + traefik.enable: "{{ tiddlywiki_available_externally | string }}" + traefik.http.routers.tiddlywiki.rule: "Host(`{{ tiddlywiki_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.tiddlywiki.tls.certresolver: "letsencrypt" + traefik.http.routers.tiddlywiki.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.tiddlywiki.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.tiddlywiki.loadbalancer.server.port: "8080" + when: tiddlywiki_enabled is true + +- name: Stop Tiddlywiki + block: + - name: Stop Tiddlywiki + community.docker.docker_container: + name: "{{ tiddlywiki_container_name }}" + state: absent + when: tiddlywiki_enabled is false diff --git a/roles/timemachine/defaults/main.yml b/roles/timemachine/defaults/main.yml index 9c26bf4c..87abd6fb 100644 --- a/roles/timemachine/defaults/main.yml +++ b/roles/timemachine/defaults/main.yml @@ -14,3 +14,6 @@ timemachine_port: "10445" # Container timemachine_memory: 1g +timemachine_container_name: "timemachine" +timemachine_image_name: "awlnx/samba-timemachine" +timemachine_image_version: "latest" diff --git a/roles/timemachine/docs/timemachine.md b/roles/timemachine/docs/timemachine.md new file mode 100644 index 00000000..468ca43f --- /dev/null +++ b/roles/timemachine/docs/timemachine.md @@ -0,0 +1,29 @@ +# Time Machine + + +Apple docs: + +Docker image: + +Time Machine is an application that allows you to backup files from your Mac. + +Older versions of Time Machine relied on AFP (netatalk) shares. Apple has deprecated Time Machine over AFP in favor of SMB (Samba), and current versions of Ansible-NAS use a Samba-based Time Machine share. If you are upgrading from an older version of Ansible-NAS, you will need to re-select your Time Machine back up disk by opening Time Machine Preferences and Selecting your backup disk via the "Select Disk..." option. Your Mac will find the old backups on the share and use them. + +## Usage + +Set `timemachine_enabled: true` in your `inventories//nas.yml` file. + +Enabling Time Machine will result in the installation of Avahi on the NAS system (if it is not already installed) and a Time Machine service configuration file for Avahi will be added to the system (at `/etc/avahi/services/timemachine.service`) to allow for Time Machine discovery by Macs on the local network. Avahi runs on the system, rather than in a container, as the same Avahi instance can be used to announce any number of services. + +The Samba server included in the Time Machine docker container logs to `STDOUT` and is compatible with [Docker's built-in logging infrastructure.](https://docs.docker.com/config/containers/logging/) + +## Specific Configuration + +- `timemachine_data_directory`: The absolute path on Ansible NAS where the backup files will be stored +- `timemachine_volume_size_limit`: The maximum amount of space Time Machine can use for the backups in units of MiB. Set it to 0 for no limit. +- `timemachine_share_name`: The name of the share as it will appear in the Time Machine application. Default is 'Data' +- `timemachine_password`: The password used to access the share. Default is 'timemachine' + +## Upgrading from AFP to SMB-based Time Machine + +Older versions of Time Machine included in Ansible-NAS relied on AFP (netatalk) shares. Apple has deprecated Time Machine over AFP in favor of SMB (Samba), and current versions of Ansible-NAS use a Samba-based Time Machine share. If you are upgrading from an older version of Ansible-NAS with the AFP-based Time Machine, you will need to re-select your Time Machine back up disk by opening Time Machine Preferences and Selecting your backup disk via the "Select Disk..." option. Your Mac will find the old backups on the share and use them. diff --git a/roles/timemachine/molecule/default/molecule.yml b/roles/timemachine/molecule/default/molecule.yml new file mode 100644 index 00000000..79d63655 --- /dev/null +++ b/roles/timemachine/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + timemachine_enabled: true diff --git a/roles/timemachine/molecule/default/side_effect.yml b/roles/timemachine/molecule/default/side_effect.yml new file mode 100644 index 00000000..d98cda62 --- /dev/null +++ b/roles/timemachine/molecule/default/side_effect.yml @@ -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: + timemachine_enabled: false diff --git a/roles/timemachine/molecule/default/verify.yml b/roles/timemachine/molecule/default/verify.yml new file mode 100644 index 00000000..ff6c0265 --- /dev/null +++ b/roles/timemachine/molecule/default/verify.yml @@ -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 timemachine container state + community.docker.docker_container: + name: "{{ timemachine_container_name }}" + register: result + + - name: Check if timemachine containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/timemachine/molecule/default/verify_stopped.yml b/roles/timemachine/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..e916db5f --- /dev/null +++ b/roles/timemachine/molecule/default/verify_stopped.yml @@ -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 timemachine + community.docker.docker_container: + name: "{{ timemachine_container_name }}" + state: absent + register: result + + - name: Check if timemachine is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/timemachine/tasks/main.yml b/roles/timemachine/tasks/main.yml index 284ceb62..85f735cd 100644 --- a/roles/timemachine/tasks/main.yml +++ b/roles/timemachine/tasks/main.yml @@ -1,41 +1,53 @@ --- -- name: Time Machine Directories - file: - path: "{{ timemachine_data_directory }}" - state: directory +- name: Start Time Machine + block: + - name: Time Machine Directories + ansible.builtin.file: + path: "{{ timemachine_data_directory }}" + state: directory -- name: Time Machine Docker Container - docker_container: - name: timemachine - image: awlnx/samba-timemachine:latest - pull: true - ports: - - "{{ timemachine_port }}:445" - env: - TMSIZE: "{{ timemachine_volume_size_limit }}" - PASS: "{{ timemachine_password }}" - SHARENAME: "{{ timemachine_share_name }}" - volumes: - - "{{ timemachine_data_directory }}/data:/backups" - ulimits: - - "nofile:1048576:1048576" - network_mode: bridge - restart_policy: unless-stopped - memory: "{{ timemachine_memory }}" + - name: Time Machine Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ timemachine_container_name }}" + image: "{{ timemachine_image_name }}:{{ timemachine_image_version }}" + pull: true + ports: + - "{{ timemachine_port }}:445" + env: + TMSIZE: "{{ timemachine_volume_size_limit }}" + PASS: "{{ timemachine_password }}" + SHARENAME: "{{ timemachine_share_name }}" + volumes: + - "{{ timemachine_data_directory }}/data:/backups" + ulimits: + - "nofile:1048576:1048576" + network_mode: bridge + restart_policy: unless-stopped + memory: "{{ timemachine_memory }}" -- name: Install avahi - apt: - name: "avahi-daemon" - state: present - register: result - until: result is succeeded + - name: Install avahi + ansible.builtin.apt: + name: "avahi-daemon" + state: present + register: result + until: result is succeeded -- name: Setup timemachine service for avahi - template: - src: timemachine.service - dest: "/etc/avahi/services/timemachine.service" + - name: Setup timemachine service for avahi + ansible.builtin.template: + src: timemachine.service + dest: "/etc/avahi/services/timemachine.service" -- name: Reload avahi configuration - service: - name: avahi-daemon - state: reloaded + - name: Reload avahi configuration + ansible.builtin.service: + name: avahi-daemon + state: reloaded + when: timemachine_enabled is true + +- name: Stop Time Machine + block: + - name: Stop Time Machine + community.docker.docker_container: + name: "{{ timemachine_container_name }}" + state: absent + when: timemachine_enabled is false diff --git a/roles/traefik/defaults/main.yml b/roles/traefik/defaults/main.yml index a85fd4aa..63561dd8 100644 --- a/roles/traefik/defaults/main.yml +++ b/roles/traefik/defaults/main.yml @@ -14,7 +14,9 @@ traefik_port_http: "80" traefik_port_https: "443" traefik_port_ui: "8083" -traefik_docker_image: traefik:latest +traefik_container_name: "traefik" +traefik_image_name: "traefik" +traefik_image_version: "latest" traefik_log_level: "INFO" # find the relevant name and environment variables for your DNS provider at https://go-acme.github.io/lego/dns/ diff --git a/roles/traefik/docs/traefik.md b/roles/traefik/docs/traefik.md new file mode 100644 index 00000000..8b552f28 --- /dev/null +++ b/roles/traefik/docs/traefik.md @@ -0,0 +1,20 @@ +# Traefik + +Homepage: + +Traefik is a reverse proxy used to provide external access to your Ansible-NAS box. Additionally, Traefik will automatically request and renew SSL certificates for you. + +You can configure which applications are available externally by enabling the `_available_externally` setting +for each application in the Advanced Settings section of your `all.yml`. + +See [External Access](../../getting-started/external-access.md) for more info. + +## Usage + +Set `traefik_enabled: true` in your `inventories//nas.yml` file. + +Traefik's web interface can be found at . + +## Specific Configuration + +You'll need to map port 80 and 443 from your router to your Ansible-NAS box. A quick search should reveal instruction for your model of router. diff --git a/roles/traefik/molecule/default/molecule.yml b/roles/traefik/molecule/default/molecule.yml new file mode 100644 index 00000000..c083c5c2 --- /dev/null +++ b/roles/traefik/molecule/default/molecule.yml @@ -0,0 +1,18 @@ +--- +provisioner: + inventory: + group_vars: + all: + traefik_enabled: true + ansible_nas_email: me@example.com + traefik_data_directory: "/tmp/traefik" +platforms: + - name: instance + image: geerlingguy/docker-ubuntu2204-ansible:latest + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:rw + - /var/run/docker.sock:/var/run/docker.sock + - /dev/null:/dev/null + cgroupns_mode: host + privileged: true + pre_build_image: true diff --git a/roles/traefik/molecule/default/side_effect.yml b/roles/traefik/molecule/default/side_effect.yml new file mode 100644 index 00000000..709ed0eb --- /dev/null +++ b/roles/traefik/molecule/default/side_effect.yml @@ -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: + traefik_enabled: false diff --git a/roles/traefik/molecule/default/verify.yml b/roles/traefik/molecule/default/verify.yml new file mode 100644 index 00000000..94510931 --- /dev/null +++ b/roles/traefik/molecule/default/verify.yml @@ -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 traefik container state + community.docker.docker_container: + name: "{{ traefik_container_name }}" + register: result + + - name: Check if traefik containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/traefik/molecule/default/verify_stopped.yml b/roles/traefik/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..ab920550 --- /dev/null +++ b/roles/traefik/molecule/default/verify_stopped.yml @@ -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 traefik + community.docker.docker_container: + name: "{{ traefik_container_name }}" + state: absent + register: result + + - name: Check if traefik is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/traefik/tasks/main.yml b/roles/traefik/tasks/main.yml index 451112e4..bc06b97a 100644 --- a/roles/traefik/tasks/main.yml +++ b/roles/traefik/tasks/main.yml @@ -1,29 +1,41 @@ --- -- name: Create Traefik Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ traefik_data_directory }}" - - "{{ traefik_data_directory }}/letsencrypt" +- name: Start Traefik + block: + - name: Create Traefik Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ traefik_data_directory }}" + - "{{ traefik_data_directory }}/letsencrypt" -- name: Template Traefik config.toml - template: - src: traefik.toml - dest: "{{ traefik_data_directory }}/traefik.toml" - register: template_config + - name: Template Traefik config.toml + ansible.builtin.template: + src: traefik.toml + dest: "{{ traefik_data_directory }}/traefik.toml" + register: template_config -- name: Traefik Docker Container - docker_container: - name: traefik - image: "{{ traefik_docker_image }}" - pull: true - network_mode: host - volumes: - - "{{ traefik_data_directory }}/traefik.toml:/etc/traefik/traefik.toml:ro" - - "{{ traefik_data_directory }}/letsencrypt:/letsencrypt:rw" - - "/var/run/docker.sock:/var/run/docker.sock:ro" - env: "{{ traefik_environment_variables }}" - restart_policy: unless-stopped - memory: "{{ traefik_memory }}" - recreate: "{{ template_config is changed }}" + - name: Traefik Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ traefik_container_name }}" + image: "{{ traefik_image_name }}:{{ traefik_image_version }}" + pull: true + network_mode: host + volumes: + - "{{ traefik_data_directory }}/traefik.toml:/etc/traefik/traefik.toml:ro" + - "{{ traefik_data_directory }}/letsencrypt:/letsencrypt:rw" + - "/var/run/docker.sock:/var/run/docker.sock:ro" + env: "{{ traefik_environment_variables }}" + restart_policy: unless-stopped + memory: "{{ traefik_memory }}" + recreate: "{{ template_config is changed }}" + when: traefik_enabled is true + +- name: Stop Traefik + block: + - name: Stop Traefik + community.docker.docker_container: + name: "{{ traefik_container_name }}" + state: absent + when: traefik_enabled is false diff --git a/roles/transmission-with-openvpn/defaults/main.yml b/roles/transmission-with-openvpn/defaults/main.yml index 80f33351..574f3ce2 100644 --- a/roles/transmission-with-openvpn/defaults/main.yml +++ b/roles/transmission-with-openvpn/defaults/main.yml @@ -22,6 +22,10 @@ transmission_openvpn_external_port: "51415" transmission_openvpn_proxy_port: "3128" transmission_openvpn_hostname: "transmission_openvpn" +transmission_openvpn_container_name: "transmission-openvpn" +transmission_openvpn_image_name: "haugene/transmission-openvpn" +transmission_openvpn_image_version: "latest" + # Transmission VPN Credentials # If you're using Transmission with a VPN, you'll need to set these credentials. # See https://github.com/haugene/docker-transmission-openvpn/ for supported VPN providers. diff --git a/roles/transmission-with-openvpn/docs/transmission.md b/roles/transmission-with-openvpn/docs/transmission.md new file mode 100644 index 00000000..aa79341e --- /dev/null +++ b/roles/transmission-with-openvpn/docs/transmission.md @@ -0,0 +1,26 @@ +# Transmission + + +Homepage: + +Transmission is a free BitTorrent client. Two versions are provided - one that tunnels through OpenVPN and one that connects +directly. + +## Usage + +Set `transmission_enabled: true`, or `transmission_with_openvpn_enabled: true` in your `inventories//nas.yml` file. + +Transmission's web interface can be found at (with OpenVPN) or (without OpenVPN). + +## Specific Configuration + +If you enable Transmission with OpenVPN, you'll need to add the following to your inventory `all.yml`: + +```yaml +openvpn_username: super_secret_username +openvpn_password: super_secret_password +openvpn_provider: NORDVPN +openvpn_config: uk686.nordvpn.com.udp +``` + +See for supported VPN providers. diff --git a/roles/transmission-with-openvpn/molecule/default/molecule.yml b/roles/transmission-with-openvpn/molecule/default/molecule.yml new file mode 100644 index 00000000..7cbfd317 --- /dev/null +++ b/roles/transmission-with-openvpn/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + transmission_with_openvpn_enabled: true diff --git a/roles/transmission-with-openvpn/molecule/default/side_effect.yml b/roles/transmission-with-openvpn/molecule/default/side_effect.yml new file mode 100644 index 00000000..f3aa26e1 --- /dev/null +++ b/roles/transmission-with-openvpn/molecule/default/side_effect.yml @@ -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: + transmission_with_openvpn_enabled: false diff --git a/roles/transmission-with-openvpn/molecule/default/verify.yml b/roles/transmission-with-openvpn/molecule/default/verify.yml new file mode 100644 index 00000000..748aef07 --- /dev/null +++ b/roles/transmission-with-openvpn/molecule/default/verify.yml @@ -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 transmission container state + community.docker.docker_container: + name: "{{ transmission_openvpn_container_name }}" + register: result + + - name: Check if transmission containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/transmission-with-openvpn/molecule/default/verify_stopped.yml b/roles/transmission-with-openvpn/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..fa5d60dc --- /dev/null +++ b/roles/transmission-with-openvpn/molecule/default/verify_stopped.yml @@ -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 transmission + community.docker.docker_container: + name: "{{ transmission_openvpn_container_name }}" + state: absent + register: result + + - name: Check if transmission is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/transmission-with-openvpn/tasks/main.yml b/roles/transmission-with-openvpn/tasks/main.yml index 5a67fbd9..6b9cd705 100644 --- a/roles/transmission-with-openvpn/tasks/main.yml +++ b/roles/transmission-with-openvpn/tasks/main.yml @@ -1,57 +1,69 @@ --- -- name: Create Transmission Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ transmission_config_directory }}" - - "{{ transmission_download_directory }}" - - "{{ transmission_watch_directory }}" +- name: Start Transmission with OpenVPM + block: + - name: Create Transmission Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ transmission_config_directory }}" + - "{{ transmission_download_directory }}" + - "{{ transmission_watch_directory }}" -- name: Transmission with VPN - docker_container: - name: transmission-openvpn - image: haugene/transmission-openvpn - pull: true - volumes: - - "/etc/localtime:/etc/localtime:ro" - - "{{ transmission_download_directory }}:/downloads:rw" - - "{{ transmission_config_directory }}:/config:rw" - - "{{ transmission_watch_directory }}:/watch:rw" - - "/etc/timezone:/etc/timezone:ro" - ports: - - "{{ transmission_openvpn_webui_port }}:9091" - - "{{ transmission_openvpn_external_port }}:51413" - - "{{ transmission_openvpn_external_port }}:51413/udp" - - "{{ transmission_openvpn_proxy_port }}:3128" - env: - TRANSMISSION_HOME: "/config" - TRANSMISSION_DOWNLOAD_DIR: "/downloads" - TRANSMISSION_INCOMPLETE_DIR: "/downloads/.incomplete" - TRANSMISSION_WATCH_DIR: "/watch" - TRANSMISSION_RATIO_LIMIT: "{{ transmission_openvpn_ratio_limit }}" - TRANSMISSION_RATIO_LIMIT_ENABLED: "{{ transmission_openvpn_ratio_limit_enabled | string }}" - OPENVPN_PROVIDER: "{{ openvpn_provider }}" - OPENVPN_USERNAME: "{{ openvpn_username }}" - OPENVPN_PASSWORD: "{{ openvpn_password }}" - OPENVPN_CONFIG: "{{ openvpn_config }}" - WEBPROXY_ENABLED: "true" - WEBPROXY_PORT: "3128" - PUID: "{{ transmission_openvpn_user_id }}" - PGID: "{{ transmission_openvpn_group_id }}" - LOCAL_NETWORK: "{{ transmission_openvpn_local_network }}" - ENABLE_UFW: "false" - devices: - - /dev/net/tun - capabilities: - - NET_ADMIN - restart_policy: unless-stopped - memory: "{{ transmission_openvpn_memory }}" - labels: - traefik.enable: "{{ transmission_openvpn_available_externally | string }}" - traefik.http.routers.transmission_openvpn.rule: "Host(`{{ transmission_openvpn_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.transmission_openvpn.tls.certresolver: "letsencrypt" - traefik.http.routers.transmission_openvpn.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.transmission_openvpn.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.transmission_openvpn.loadbalancer.server.port: "9091" + - name: Transmission with VPN + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ transmission_openvpn_container_name }}" + image: "{{ transmission_openvpn_image_name }}:{{ transmission_openvpn_image_version }}" + pull: true + volumes: + - "/etc/localtime:/etc/localtime:ro" + - "{{ transmission_download_directory }}:/downloads:rw" + - "{{ transmission_config_directory }}:/config:rw" + - "{{ transmission_watch_directory }}:/watch:rw" + - "/etc/timezone:/etc/timezone:ro" + ports: + - "{{ transmission_openvpn_webui_port }}:9091" + - "{{ transmission_openvpn_external_port }}:51413" + - "{{ transmission_openvpn_external_port }}:51413/udp" + - "{{ transmission_openvpn_proxy_port }}:3128" + env: + TRANSMISSION_HOME: "/config" + TRANSMISSION_DOWNLOAD_DIR: "/downloads" + TRANSMISSION_INCOMPLETE_DIR: "/downloads/.incomplete" + TRANSMISSION_WATCH_DIR: "/watch" + TRANSMISSION_RATIO_LIMIT: "{{ transmission_openvpn_ratio_limit }}" + TRANSMISSION_RATIO_LIMIT_ENABLED: "{{ transmission_openvpn_ratio_limit_enabled | string }}" + OPENVPN_PROVIDER: "{{ openvpn_provider }}" + OPENVPN_USERNAME: "{{ openvpn_username }}" + OPENVPN_PASSWORD: "{{ openvpn_password }}" + OPENVPN_CONFIG: "{{ openvpn_config }}" + WEBPROXY_ENABLED: "true" + WEBPROXY_PORT: "3128" + PUID: "{{ transmission_openvpn_user_id }}" + PGID: "{{ transmission_openvpn_group_id }}" + LOCAL_NETWORK: "{{ transmission_openvpn_local_network }}" + ENABLE_UFW: "false" + devices: + - /dev/net/tun + capabilities: + - NET_ADMIN + restart_policy: unless-stopped + memory: "{{ transmission_openvpn_memory }}" + labels: + traefik.enable: "{{ transmission_with_openvpn_available_externally | string }}" + traefik.http.routers.transmission_openvpn.rule: "Host(`{{ transmission_openvpn_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.transmission_openvpn.tls.certresolver: "letsencrypt" + traefik.http.routers.transmission_openvpn.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.transmission_openvpn.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.transmission_openvpn.loadbalancer.server.port: "9091" + when: transmission_with_openvpn_enabled is true + +- name: Stop Transmission with OpenVPM + block: + - name: Stop Transmission with OpenVPM + community.docker.docker_container: + name: "{{ transmission_openvpn_container_name }}" + state: absent + when: transmission_with_openvpn_enabled is false diff --git a/roles/transmission/defaults/main.yml b/roles/transmission/defaults/main.yml index e8721a95..dd5d2759 100644 --- a/roles/transmission/defaults/main.yml +++ b/roles/transmission/defaults/main.yml @@ -18,5 +18,9 @@ transmission_hostname: "transmission" transmission_timezone: "{{ ansible_nas_timezone }}" +transmission_container_name: "transmission" +transmission_image_name: "linuxserver/transmission" +transmission_image_version: "latest" + # specs transmission_memory: 1g diff --git a/roles/transmission/docs/transmission.md b/roles/transmission/docs/transmission.md new file mode 100644 index 00000000..aa79341e --- /dev/null +++ b/roles/transmission/docs/transmission.md @@ -0,0 +1,26 @@ +# Transmission + + +Homepage: + +Transmission is a free BitTorrent client. Two versions are provided - one that tunnels through OpenVPN and one that connects +directly. + +## Usage + +Set `transmission_enabled: true`, or `transmission_with_openvpn_enabled: true` in your `inventories//nas.yml` file. + +Transmission's web interface can be found at (with OpenVPN) or (without OpenVPN). + +## Specific Configuration + +If you enable Transmission with OpenVPN, you'll need to add the following to your inventory `all.yml`: + +```yaml +openvpn_username: super_secret_username +openvpn_password: super_secret_password +openvpn_provider: NORDVPN +openvpn_config: uk686.nordvpn.com.udp +``` + +See for supported VPN providers. diff --git a/roles/transmission/molecule/default/molecule.yml b/roles/transmission/molecule/default/molecule.yml new file mode 100644 index 00000000..84279777 --- /dev/null +++ b/roles/transmission/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + transmission_enabled: true diff --git a/roles/transmission/molecule/default/side_effect.yml b/roles/transmission/molecule/default/side_effect.yml new file mode 100644 index 00000000..29ef54a6 --- /dev/null +++ b/roles/transmission/molecule/default/side_effect.yml @@ -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: + transmission_enabled: false diff --git a/roles/transmission/molecule/default/verify.yml b/roles/transmission/molecule/default/verify.yml new file mode 100644 index 00000000..101dceb5 --- /dev/null +++ b/roles/transmission/molecule/default/verify.yml @@ -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 transmission container state + community.docker.docker_container: + name: "{{ transmission_container_name }}" + register: result + + - name: Check if transmission containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/transmission/molecule/default/verify_stopped.yml b/roles/transmission/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..bea8a2ed --- /dev/null +++ b/roles/transmission/molecule/default/verify_stopped.yml @@ -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 transmission + community.docker.docker_container: + name: "{{ transmission_container_name }}" + state: absent + register: result + + - name: Check if transmission is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/transmission/tasks/main.yml b/roles/transmission/tasks/main.yml index aeaf5e29..d8518421 100644 --- a/roles/transmission/tasks/main.yml +++ b/roles/transmission/tasks/main.yml @@ -1,37 +1,49 @@ --- -- name: Create Transmission Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ transmission_config_directory }}" - - "{{ transmission_download_directory }}" - - "{{ transmission_watch_directory }}" +- name: Start Transmission + block: + - name: Create Transmission Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ transmission_config_directory }}" + - "{{ transmission_download_directory }}" + - "{{ transmission_watch_directory }}" -- name: Transmission Docker Container - docker_container: - name: transmission - image: linuxserver/transmission - pull: true - volumes: - - "{{ transmission_config_directory }}:/config:rw" - - "{{ transmission_download_directory }}:/downloads:rw" - - "{{ transmission_watch_directory }}:/watch:rw" - ports: - - "{{ transmission_webui_port }}:9091" - - "{{ transmission_external_port }}:51413" - - "{{ transmission_external_port }}:51413/udp" - env: - TZ: "{{ transmission_timezone }}" - PUID: "{{ transmission_user_id }}" - PGID: "{{ transmission_group_id }}" - restart_policy: unless-stopped - memory: "{{ transmission_memory }}" - labels: - traefik.enable: "{{ transmission_available_externally | string }}" - traefik.http.routers.transmission.rule: "Host(`{{ transmission_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.transmission.tls.certresolver: "letsencrypt" - traefik.http.routers.transmission.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.transmission.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.transmission.loadbalancer.server.port: "9091" + - name: Transmission Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ transmission_container_name }}" + image: "{{ transmission_image_name }}:{{ transmission_image_version }}" + pull: true + volumes: + - "{{ transmission_config_directory }}:/config:rw" + - "{{ transmission_download_directory }}:/downloads:rw" + - "{{ transmission_watch_directory }}:/watch:rw" + ports: + - "{{ transmission_webui_port }}:9091" + - "{{ transmission_external_port }}:51413" + - "{{ transmission_external_port }}:51413/udp" + env: + TZ: "{{ transmission_timezone }}" + PUID: "{{ transmission_user_id }}" + PGID: "{{ transmission_group_id }}" + restart_policy: unless-stopped + memory: "{{ transmission_memory }}" + labels: + traefik.enable: "{{ transmission_available_externally | string }}" + traefik.http.routers.transmission.rule: "Host(`{{ transmission_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.transmission.tls.certresolver: "letsencrypt" + traefik.http.routers.transmission.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.transmission.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.transmission.loadbalancer.server.port: "9091" + when: transmission_enabled is true + +- name: Stop Transmission + block: + - name: Stop Transmission + community.docker.docker_container: + name: "{{ transmission_container_name }}" + state: absent + when: transmission_enabled is false diff --git a/roles/ubooquity/defaults/main.yml b/roles/ubooquity/defaults/main.yml index de447145..106917b4 100644 --- a/roles/ubooquity/defaults/main.yml +++ b/roles/ubooquity/defaults/main.yml @@ -16,3 +16,6 @@ ubooquity_hostname: ubooquity # Container ubooquity_memory: 1g +ubooquity_container_name: "ubooquity" +ubooquity_image_name: "linuxserver/ubooquity" +ubooquity_image_version: "latest" diff --git a/roles/ubooquity/docs/ubooquity.md b/roles/ubooquity/docs/ubooquity.md new file mode 100644 index 00000000..24397c09 --- /dev/null +++ b/roles/ubooquity/docs/ubooquity.md @@ -0,0 +1,25 @@ +# Ubooquity + +Homepage: + +Documentation: + +Docker Image: + +Ubooquity is a free, lightweight and easy-to-use home server for your comics and ebooks. Use it to access your files from anywhere, with a tablet, an e-reader, a phone or a computer. + +## Usage + +Set `ubooquity_enabled: true` in your `inventories//nas.yml` file. + +Access the webui at by default. See specific configuration section below for information on setting up external access. + +## Specific Configuration + +Important note: if you want to access Ubooquity externally through Traefik (at ubooquity.yourdomain.tld), you need to go to and set the reverse proxy prefix to blank under "Advanced". Otherwise you will need to append "/ubooquity" to the url in order to access. + +### Admin login + +The admin portal is not exposed through Traefik. You can access the admin portal on port 2203. + +Upon your first run, the address is . You will be able to set the admin password here. diff --git a/roles/ubooquity/molecule/default/molecule.yml b/roles/ubooquity/molecule/default/molecule.yml new file mode 100644 index 00000000..2d3b0986 --- /dev/null +++ b/roles/ubooquity/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + ubooquity_enabled: true diff --git a/roles/ubooquity/molecule/default/side_effect.yml b/roles/ubooquity/molecule/default/side_effect.yml new file mode 100644 index 00000000..da6776f5 --- /dev/null +++ b/roles/ubooquity/molecule/default/side_effect.yml @@ -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: + ubooquity_enabled: false diff --git a/roles/ubooquity/molecule/default/verify.yml b/roles/ubooquity/molecule/default/verify.yml new file mode 100644 index 00000000..4471805a --- /dev/null +++ b/roles/ubooquity/molecule/default/verify.yml @@ -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 ubooquity container state + community.docker.docker_container: + name: "{{ ubooquity_container_name }}" + register: result + + - name: Check if ubooquity containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/ubooquity/molecule/default/verify_stopped.yml b/roles/ubooquity/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..ecdd6f81 --- /dev/null +++ b/roles/ubooquity/molecule/default/verify_stopped.yml @@ -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 ubooquity + community.docker.docker_container: + name: "{{ ubooquity_container_name }}" + state: absent + register: result + + - name: Check if ubooquity is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/ubooquity/tasks/main.yml b/roles/ubooquity/tasks/main.yml index 8e254a4d..82309851 100644 --- a/roles/ubooquity/tasks/main.yml +++ b/roles/ubooquity/tasks/main.yml @@ -1,35 +1,47 @@ --- -- name: Create Ubooquity Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ ubooquity_data_directory }}" +- name: Start Ubooquity + block: + - name: Create Ubooquity Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ ubooquity_data_directory }}" -- name: Ubooquity Docker Container - docker_container: - name: ubooquity - image: linuxserver/ubooquity:latest - pull: true - volumes: - - "{{ ubooquity_data_directory }}/config:/config:rw" - - "{{ ubooquity_data_directory }}/files:/files:rw" - - "{{ comics_root }}:/comics" - - "{{ books_root }}:/books" - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ ubooquity_user_id }}" - PGID: "{{ ubooquity_group_id }}" - MAXMEM: "1024" - ports: - - "{{ ubooquity_port_webui }}:2202" - - "{{ ubooquity_port_admin }}:2203" - restart_policy: unless-stopped - memory: "{{ ubooquity_memory }}" - labels: - traefik.enable: "{{ ubooquity_available_externally | string }}" - traefik.http.routers.ubooquity.rule: "Host(`{{ ubooquity_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.ubooquity.tls.certresolver: "letsencrypt" - traefik.http.routers.ubooquity.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.ubooquity.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.ubooquity.loadbalancer.server.port: "2202" + - name: Ubooquity Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ ubooquity_container_name }}" + image: "{{ ubooquity_image_name }}:{{ ubooquity_image_version }}" + pull: true + volumes: + - "{{ ubooquity_data_directory }}/config:/config:rw" + - "{{ ubooquity_data_directory }}/files:/files:rw" + - "{{ comics_root }}:/comics" + - "{{ books_root }}:/books" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ ubooquity_user_id }}" + PGID: "{{ ubooquity_group_id }}" + MAXMEM: "1024" + ports: + - "{{ ubooquity_port_webui }}:2202" + - "{{ ubooquity_port_admin }}:2203" + restart_policy: unless-stopped + memory: "{{ ubooquity_memory }}" + labels: + traefik.enable: "{{ ubooquity_available_externally | string }}" + traefik.http.routers.ubooquity.rule: "Host(`{{ ubooquity_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.ubooquity.tls.certresolver: "letsencrypt" + traefik.http.routers.ubooquity.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.ubooquity.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.ubooquity.loadbalancer.server.port: "2202" + when: ubooquity_enabled is true + +- name: Stop Ubooquity + block: + - name: Stop Ubooquity + community.docker.docker_container: + name: "{{ ubooquity_container_name }}" + state: absent + when: ubooquity_enabled is false diff --git a/roles/utorrent/defaults/main.yml b/roles/utorrent/defaults/main.yml index aba2fe73..df3170eb 100644 --- a/roles/utorrent/defaults/main.yml +++ b/roles/utorrent/defaults/main.yml @@ -16,5 +16,10 @@ utorrent_port_http: "8111" utorrent_port_bt: "6881" utorrent_hostname: "utorrent" +# docker +utorrent_container_name: "utorrent" +utorrent_image_name: "ekho/utorrent" +utorrent_image_version: "latest" + # specs utorrent_memory: 1g diff --git a/roles/utorrent/docs/utorrent.md b/roles/utorrent/docs/utorrent.md new file mode 100644 index 00000000..18845365 --- /dev/null +++ b/roles/utorrent/docs/utorrent.md @@ -0,0 +1,15 @@ +# uTorrent + +Homepage: +Docker Container: + +## Usage + +Set `utorrent_enabled: true` in your `inventories//nas.yml` file. + +If you want to access uTorrent externally, don't forget to set `utorrent_available_externally: true` in your `inventories//nas.yml` file. + +The uTorrent web interface can be found at : + +- Username: admin +- Password: *leave blank* diff --git a/roles/utorrent/molecule/default/molecule.yml b/roles/utorrent/molecule/default/molecule.yml new file mode 100644 index 00000000..f4fa84ef --- /dev/null +++ b/roles/utorrent/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + utorrent_enabled: true diff --git a/roles/utorrent/molecule/default/side_effect.yml b/roles/utorrent/molecule/default/side_effect.yml new file mode 100644 index 00000000..d496124e --- /dev/null +++ b/roles/utorrent/molecule/default/side_effect.yml @@ -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: + utorrent_enabled: false diff --git a/roles/utorrent/molecule/default/verify.yml b/roles/utorrent/molecule/default/verify.yml new file mode 100644 index 00000000..b2f6d3ec --- /dev/null +++ b/roles/utorrent/molecule/default/verify.yml @@ -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 utorrent container state + community.docker.docker_container: + name: "{{ utorrent_container_name }}" + register: result + + - name: Check if utorrent containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/utorrent/molecule/default/verify_stopped.yml b/roles/utorrent/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..76d5347d --- /dev/null +++ b/roles/utorrent/molecule/default/verify_stopped.yml @@ -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 utorrent + community.docker.docker_container: + name: "{{ utorrent_container_name }}" + state: absent + register: result + + - name: Check if utorrent is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/utorrent/tasks/main.yml b/roles/utorrent/tasks/main.yml index 5aa5a8ed..1a7c99e0 100644 --- a/roles/utorrent/tasks/main.yml +++ b/roles/utorrent/tasks/main.yml @@ -1,39 +1,51 @@ --- -- name: Create uTorrent Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ utorrent_config_directory }}" - - "{{ utorrent_download_directory }}" - - "{{ utorrent_download_directory_active }}" +- name: Start uTorrent + block: + - name: Create uTorrent Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ utorrent_config_directory }}" + - "{{ utorrent_download_directory }}" + - "{{ utorrent_download_directory_active }}" -- name: Create uTorrent Docker Container - docker_container: - name: utorrent - image: ekho/utorrent:latest - pull: true - volumes: - - "{{ utorrent_download_directory }}:/data:rw" - - "{{ utorrent_config_directory }}:/utorrent/settings:rw" - - "{{ torrents_root }}:/utorrent/torrents:rw" - ports: - - "{{ utorrent_port_http }}:8080" - - "{{ utorrent_port_bt }}:6881" - - "{{ utorrent_port_bt }}:6881/udp" - env: - TZ: "{{ ansible_nas_timezone }}" - UID: "{{ utorrent_user_id }}" - GID: "{{ utorrent_group_id }}" - webui: "ng" - dir_active: "/data/.incomplete" - dir_completed: "/data" - restart_policy: unless-stopped - memory: "{{ utorrent_memory }}" - labels: - traefik.enable: "{{ utorrent_available_externally | string }}" - traefik.http.routers.utorrent.rule: "Host(`{{ utorrent_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.utorrent.tls.certresolver: "letsencrypt" - traefik.http.routers.utorrent.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.utorrent.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.utorrent.loadbalancer.server.port: "8080" + - name: Create uTorrent Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ utorrent_container_name }}" + image: "{{ utorrent_image_name }}:{{ utorrent_image_version }}" + pull: true + volumes: + - "{{ utorrent_download_directory }}:/data:rw" + - "{{ utorrent_config_directory }}:/utorrent/settings:rw" + - "{{ torrents_root }}:/utorrent/torrents:rw" + ports: + - "{{ utorrent_port_http }}:8080" + - "{{ utorrent_port_bt }}:6881" + - "{{ utorrent_port_bt }}:6881/udp" + env: + TZ: "{{ ansible_nas_timezone }}" + UID: "{{ utorrent_user_id }}" + GID: "{{ utorrent_group_id }}" + webui: "ng" + dir_active: "/data/.incomplete" + dir_completed: "/data" + restart_policy: unless-stopped + memory: "{{ utorrent_memory }}" + labels: + traefik.enable: "{{ utorrent_available_externally | string }}" + traefik.http.routers.utorrent.rule: "Host(`{{ utorrent_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.utorrent.tls.certresolver: "letsencrypt" + traefik.http.routers.utorrent.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.utorrent.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.utorrent.loadbalancer.server.port: "8080" + when: utorrent_enabled is true + +- name: Stop uTorrent + block: + - name: Stop uTorrent + community.docker.docker_container: + name: "{{ utorrent_container_name }}" + state: absent + when: utorrent_enabled is false diff --git a/roles/virtual_desktop/defaults/main.yml b/roles/virtual_desktop/defaults/main.yml index 0cd61c79..effb7b3f 100644 --- a/roles/virtual_desktop/defaults/main.yml +++ b/roles/virtual_desktop/defaults/main.yml @@ -1,8 +1,6 @@ --- virtual_desktop_enabled: false -virtual_desktop_docker_image: "rattydave/docker-ubuntu-xrdp-mate-custom:20.04-tools" - virtual_desktop_users: - username: "{{ ansible_nas_user }}" password: "topsecret" @@ -20,3 +18,6 @@ virtual_desktop_rdp_port: 3389 # Container virtual_desktop_memory: 2g +virtual_desktop_container_name: "virtual_desktop" +virtual_desktop_image_name: "rattydave/docker-ubuntu-xrdp-mate-custom" +virtual_desktop_image_version: "20.04-tools" diff --git a/roles/virtual_desktop/docs/virtual_desktop.md b/roles/virtual_desktop/docs/virtual_desktop.md new file mode 100644 index 00000000..0b84170d --- /dev/null +++ b/roles/virtual_desktop/docs/virtual_desktop.md @@ -0,0 +1,30 @@ +# Virtual Desktop + +It's possible to run a cut down desktop within a Docker container. We use [RattyDAVE's custom Ubuntu Mate image](https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom). + +## Usage + +Set `virtual_desktop_enabled: true` in your `inventories//nas.yml` file. + +## Specific Configuration + +By default `ansible_nas_user` will be granted access with a password of `topsecret` with sudo rights. To change or add additional users override `vd_users` in your `nas.yml`: + +```yaml +vd_users: + - username: "{{ ansible_nas_user }}" + password: "topsecret" + sudo: "Y" + - username: "larrylaffer" + password: "kensentme" + sudo: "Y" +``` + +## Mounts + +`samba_shares_root` is mounted to `/samba`. +`docker_home` is mounted to `/docker`. + +## Remote Access + +It's possible to access your virtual desktop through a web browser! Check out [Guacamole](guacamole.md). diff --git a/roles/virtual_desktop/molecule/default/molecule.yml b/roles/virtual_desktop/molecule/default/molecule.yml new file mode 100644 index 00000000..b9f24f26 --- /dev/null +++ b/roles/virtual_desktop/molecule/default/molecule.yml @@ -0,0 +1,7 @@ +--- +provisioner: + inventory: + group_vars: + all: + virtual_desktop_enabled: true + ansible_nas_user: ansible-nas diff --git a/roles/virtual_desktop/molecule/default/side_effect.yml b/roles/virtual_desktop/molecule/default/side_effect.yml new file mode 100644 index 00000000..b73186e1 --- /dev/null +++ b/roles/virtual_desktop/molecule/default/side_effect.yml @@ -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: + virtual_desktop_enabled: false diff --git a/roles/virtual_desktop/molecule/default/verify.yml b/roles/virtual_desktop/molecule/default/verify.yml new file mode 100644 index 00000000..0058aa98 --- /dev/null +++ b/roles/virtual_desktop/molecule/default/verify.yml @@ -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 virtual_desktop container state + community.docker.docker_container: + name: "{{ virtual_desktop_container_name }}" + register: result + + - name: Check if virtual_desktop containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/virtual_desktop/molecule/default/verify_stopped.yml b/roles/virtual_desktop/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..0d846858 --- /dev/null +++ b/roles/virtual_desktop/molecule/default/verify_stopped.yml @@ -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 virtual_desktop + community.docker.docker_container: + name: "{{ virtual_desktop_container_name }}" + state: absent + register: result + + - name: Check if virtual_desktop is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/virtual_desktop/tasks/main.yml b/roles/virtual_desktop/tasks/main.yml index 167dd08a..90ccb1c2 100644 --- a/roles/virtual_desktop/tasks/main.yml +++ b/roles/virtual_desktop/tasks/main.yml @@ -1,30 +1,42 @@ --- -- name: Create Virtual Desktop Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ virtual_desktop_data_directory }}" - - "{{ virtual_desktop_data_directory }}/home" +- name: Start Virtual Desktop + block: + - name: Create Virtual Desktop Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ virtual_desktop_data_directory }}" + - "{{ virtual_desktop_data_directory }}/home" -- name: Create users file - template: - src: "users.txt.j2" - dest: "{{ virtual_desktop_data_directory }}/users.txt" + - name: Create users file + ansible.builtin.template: + src: "users.txt.j2" + dest: "{{ virtual_desktop_data_directory }}/users.txt" -- name: Virtual Desktop Container - docker_container: - name: virtual_desktop - image: "{{ virtual_desktop_docker_image }}" - pull: true - volumes: - - "{{ virtual_desktop_data_directory }}/users.txt:/root/createusers.txt:ro" - - "{{ virtual_desktop_data_directory }}/home:/home:rw" - - "{{ samba_shares_root }}:/samba:rw" - - "{{ docker_home }}:/docker:rw" - - "/etc/timezone:/etc/timezone:ro" - ports: - - "{{ virtual_desktop_rdp_port }}:3389" - privileged: true - restart_policy: unless-stopped - memory: "{{ virtual_desktop_memory }}" + - name: Virtual Desktop Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ virtual_desktop_container_name }}" + image: "{{ virtual_desktop_image_name }}:{{ virtual_desktop_image_version }}" + pull: true + volumes: + - "{{ virtual_desktop_data_directory }}/users.txt:/root/createusers.txt:ro" + - "{{ virtual_desktop_data_directory }}/home:/home:rw" + - "{{ samba_shares_root }}:/samba:rw" + - "{{ docker_home }}:/docker:rw" + - "/etc/timezone:/etc/timezone:ro" + ports: + - "{{ virtual_desktop_rdp_port }}:3389" + privileged: true + restart_policy: unless-stopped + memory: "{{ virtual_desktop_memory }}" + when: virtual_desktop_enabled is true + +- name: Stop Virtual Desktop + block: + - name: Stop Virtual Desktop + community.docker.docker_container: + name: "{{ virtual_desktop_container_name }}" + state: absent + when: virtual_desktop_enabled is false diff --git a/roles/wallabag/defaults/main.yml b/roles/wallabag/defaults/main.yml index b96f280b..fd5a5488 100644 --- a/roles/wallabag/defaults/main.yml +++ b/roles/wallabag/defaults/main.yml @@ -11,3 +11,6 @@ wallabag_hostname: wallabag # Container wallabag_memory: 1g +wallabag_container_name: "wallabag" +wallabag_image_name: "wallabag/wallabag" +wallabag_image_version: "latest" diff --git a/roles/wallabag/docs/wallabag.md b/roles/wallabag/docs/wallabag.md new file mode 100644 index 00000000..e5ffd3a3 --- /dev/null +++ b/roles/wallabag/docs/wallabag.md @@ -0,0 +1,17 @@ +# Wallabag + +Homepage: + +wallabag is a self-hostable PHP application allowing you to not miss any content anymore. Click, save and read it when you can. It extracts content so that you can read it when you have time. + +## Usage + +Set `wallabag_enabled: true` in your `inventories//nas.yml` file. + +If you want to access wallabag externally, don't forget to set `wallabag_available_externally: true` in your `inventories//nas.yml` file. + +I recommend using the mobile app, which will sync with this installation so you have access to your saved articles even if you don't have signal or wifi access. + +The default credentials are wallabag:wallabag + +The wallabag web interface can be found at . diff --git a/roles/wallabag/molecule/default/molecule.yml b/roles/wallabag/molecule/default/molecule.yml new file mode 100644 index 00000000..3e2adc75 --- /dev/null +++ b/roles/wallabag/molecule/default/molecule.yml @@ -0,0 +1,17 @@ +--- +provisioner: + inventory: + group_vars: + all: + wallabag_enabled: true + wallabag_data_directory: "/tmp/wallabag" +platforms: + - name: instance + image: geerlingguy/docker-ubuntu2204-ansible:latest + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:rw + - /var/run/docker.sock:/var/run/docker.sock + - /tmp:/tmp + cgroupns_mode: host + privileged: true + pre_build_image: true diff --git a/roles/wallabag/molecule/default/side_effect.yml b/roles/wallabag/molecule/default/side_effect.yml new file mode 100644 index 00000000..7bd20b86 --- /dev/null +++ b/roles/wallabag/molecule/default/side_effect.yml @@ -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: + wallabag_enabled: false diff --git a/roles/wallabag/molecule/default/verify.yml b/roles/wallabag/molecule/default/verify.yml new file mode 100644 index 00000000..b710d9f5 --- /dev/null +++ b/roles/wallabag/molecule/default/verify.yml @@ -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 wallabag container state + community.docker.docker_container: + name: "{{ wallabag_container_name }}" + register: result + + - name: Check if wallabag containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/wallabag/molecule/default/verify_stopped.yml b/roles/wallabag/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..2fdd59b8 --- /dev/null +++ b/roles/wallabag/molecule/default/verify_stopped.yml @@ -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 wallabag + community.docker.docker_container: + name: "{{ wallabag_container_name }}" + state: absent + register: result + + - name: Check if wallabag is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/wallabag/tasks/main.yml b/roles/wallabag/tasks/main.yml index eb1e67e7..a296c2c3 100644 --- a/roles/wallabag/tasks/main.yml +++ b/roles/wallabag/tasks/main.yml @@ -1,30 +1,45 @@ --- -- name: Create Wallabag Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ wallabag_data_directory }}/data" - - "{{ wallabag_data_directory }}/images" +- name: Start Wallabag + block: + - name: Create Wallabag Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + owner: 65534 + group: 65534 + with_items: + - "{{ wallabag_data_directory }}/data" + - "{{ wallabag_data_directory }}/data/db" + - "{{ wallabag_data_directory }}/images" -- name: Wallabag Docker Container - docker_container: - name: wallabag - image: wallabag/wallabag:latest - pull: true - volumes: - - "{{ wallabag_data_directory }}/data:/var/www/wallabag/data:rw" - - "{{ wallabag_data_directory }}/images:/var/www/wallabag/web/assets/images:rw" - ports: - - "{{ wallabag_port }}:80" - env: - SYMFONY__ENV__DOMAIN_NAME: "https://wallabag.{{ ansible_nas_domain }}" - restart_policy: unless-stopped - memory: "{{ wallabag_memory }}" - labels: - traefik.enable: "{{ wallabag_available_externally | string }}" - traefik.http.routers.wallabag.rule: "Host(`{{ wallabag_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.wallabag.tls.certresolver: "letsencrypt" - traefik.http.routers.wallabag.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.wallabag.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.wallabag.loadbalancer.server.port: "80" + - name: Wallabag Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ wallabag_container_name }}" + image: "{{ wallabag_image_name }}:{{ wallabag_image_version }}" + pull: true + volumes: + - "{{ wallabag_data_directory }}/data:/var/www/wallabag/data:rw" + - "{{ wallabag_data_directory }}/images:/var/www/wallabag/web/assets/images:rw" + ports: + - "{{ wallabag_port }}:80" + env: + SYMFONY__ENV__DOMAIN_NAME: "https://wallabag.{{ ansible_nas_domain }}" + restart_policy: unless-stopped + memory: "{{ wallabag_memory }}" + labels: + traefik.enable: "{{ wallabag_available_externally | string }}" + traefik.http.routers.wallabag.rule: "Host(`{{ wallabag_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.wallabag.tls.certresolver: "letsencrypt" + traefik.http.routers.wallabag.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.wallabag.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.wallabag.loadbalancer.server.port: "80" + when: wallabag_enabled is true + +- name: Stop Wallabag + block: + - name: Stop Wallabag + community.docker.docker_container: + name: "{{ wallabag_container_name }}" + state: absent + when: wallabag_enabled is false diff --git a/roles/watchtower/defaults/main.yml b/roles/watchtower/defaults/main.yml index cdb8bcd9..4fe8816b 100644 --- a/roles/watchtower/defaults/main.yml +++ b/roles/watchtower/defaults/main.yml @@ -18,3 +18,7 @@ watchtower_command: "--schedule '{{ watchtower_cron_schedule }}'" # specs watchtower_memory: 1g + +watchtower_container_name: "watchtower" +watchtower_image_name: "containrrr/watchtower" +watchtower_image_version: "latest" diff --git a/roles/watchtower/docs/watchtower.md b/roles/watchtower/docs/watchtower.md new file mode 100644 index 00000000..283bc72f --- /dev/null +++ b/roles/watchtower/docs/watchtower.md @@ -0,0 +1,15 @@ +# Watchtower + +Homepage: + +A process for watching your Docker containers and automatically updating and restarting them whenever their base image is refreshed. + +## Usage + +Set `watchtower_enabled: true` in your `inventories//nas.yml` file. + +## Specific Configuration + +By default Watchtower is configured to check daily at 5am for updates. + +Various notification options are available, and can be configured by updating `watchtower_command` in your `inventories//nas.yml` file. A few examples are provided. The full set of options can be found at the [Watchtower GitHub project page](https://github.com/v2tec/watchtower). diff --git a/roles/watchtower/molecule/default/molecule.yml b/roles/watchtower/molecule/default/molecule.yml new file mode 100644 index 00000000..74e78e02 --- /dev/null +++ b/roles/watchtower/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + watchtower_enabled: true diff --git a/roles/watchtower/molecule/default/side_effect.yml b/roles/watchtower/molecule/default/side_effect.yml new file mode 100644 index 00000000..754cd6fb --- /dev/null +++ b/roles/watchtower/molecule/default/side_effect.yml @@ -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: + watchtower_enabled: false diff --git a/roles/watchtower/molecule/default/verify.yml b/roles/watchtower/molecule/default/verify.yml new file mode 100644 index 00000000..11e56dd0 --- /dev/null +++ b/roles/watchtower/molecule/default/verify.yml @@ -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 watchtower container state + community.docker.docker_container: + name: "{{ watchtower_container_name }}" + register: result + + - name: Check if watchtower containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/watchtower/molecule/default/verify_stopped.yml b/roles/watchtower/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..d9355580 --- /dev/null +++ b/roles/watchtower/molecule/default/verify_stopped.yml @@ -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 watchtower + community.docker.docker_container: + name: "{{ watchtower_container_name }}" + state: absent + register: result + + - name: Check if watchtower is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/watchtower/tasks/main.yml b/roles/watchtower/tasks/main.yml index 7b8f1a16..0e0212b1 100644 --- a/roles/watchtower/tasks/main.yml +++ b/roles/watchtower/tasks/main.yml @@ -1,13 +1,25 @@ --- -- name: Watchtower Docker Container - docker_container: - name: watchtower - image: containrrr/watchtower - pull: true - volumes: - - "/var/run/docker.sock:/var/run/docker.sock" - env: - TZ: "{{ ansible_nas_timezone }}" - command: "{{ watchtower_command }}" - restart_policy: unless-stopped - memory: "{{ watchtower_memory }}" +- name: Start Watchtower + block: + - name: Watchtower Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ watchtower_container_name }}" + image: "{{ watchtower_image_name }}:{{ watchtower_image_version }}" + pull: true + volumes: + - "/var/run/docker.sock:/var/run/docker.sock" + env: + TZ: "{{ ansible_nas_timezone }}" + command: "{{ watchtower_command }}" + restart_policy: unless-stopped + memory: "{{ watchtower_memory }}" + when: watchtower_enabled is true + +- name: Stop Watchtower + block: + - name: Stop Watchtower + community.docker.docker_container: + name: "{{ watchtower_container_name }}" + state: absent + when: watchtower_enabled is false diff --git a/roles/wireshark/defaults/main.yml b/roles/wireshark/defaults/main.yml index 30e729ec..0a3ea1cf 100644 --- a/roles/wireshark/defaults/main.yml +++ b/roles/wireshark/defaults/main.yml @@ -13,5 +13,10 @@ wireshark_group_id: "1000" # network wireshark_hostname: "wireshark" +# docker +wireshark_container_name: "wireshark" +wireshark_image_name: "linuxserver/wireshark" +wireshark_image_version: "latest" + # specs wireshark_memory: "512m" diff --git a/roles/wireshark/docs/wireshark.md b/roles/wireshark/docs/wireshark.md new file mode 100644 index 00000000..34442ab1 --- /dev/null +++ b/roles/wireshark/docs/wireshark.md @@ -0,0 +1,11 @@ +# Wireshark + +Homepage: + +Wireshark is the world’s foremost and widely-used network protocol analyzer. It lets you see what’s happening on your network at a microscopic level and is the de facto (and often de jure) standard across many commercial and non-profit enterprises, government agencies, and educational institutions. Wireshark development thrives thanks to the volunteer contributions of networking experts around the globe and is the continuation of a project started by Gerald Combs in 1998. + +## Usage + +Set `wireshark_enabled: true` in your `inventories//nas.yml` file. + +The Wireshark web interface can be found at . diff --git a/roles/wireshark/molecule/default/molecule.yml b/roles/wireshark/molecule/default/molecule.yml new file mode 100644 index 00000000..840106ce --- /dev/null +++ b/roles/wireshark/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + wireshark_enabled: true diff --git a/roles/wireshark/molecule/default/side_effect.yml b/roles/wireshark/molecule/default/side_effect.yml new file mode 100644 index 00000000..98514c9a --- /dev/null +++ b/roles/wireshark/molecule/default/side_effect.yml @@ -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: + wireshark_enabled: false diff --git a/roles/wireshark/molecule/default/verify.yml b/roles/wireshark/molecule/default/verify.yml new file mode 100644 index 00000000..5595dbd4 --- /dev/null +++ b/roles/wireshark/molecule/default/verify.yml @@ -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 wireshark container state + community.docker.docker_container: + name: "{{ wireshark_container_name }}" + register: result + + - name: Check if wireshark containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/wireshark/molecule/default/verify_stopped.yml b/roles/wireshark/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..572d11d1 --- /dev/null +++ b/roles/wireshark/molecule/default/verify_stopped.yml @@ -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 wireshark + community.docker.docker_container: + name: "{{ wireshark_container_name }}" + state: absent + register: result + + - name: Check if wireshark is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/wireshark/tasks/main.yml b/roles/wireshark/tasks/main.yml index 318ecaae..e094a8e1 100644 --- a/roles/wireshark/tasks/main.yml +++ b/roles/wireshark/tasks/main.yml @@ -1,32 +1,44 @@ --- -- name: Create Wireshark Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ wireshark_data_directory }}" - - "{{ wireshark_data_directory }}/config" +- name: Start Wireshark + block: + - name: Create Wireshark Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ wireshark_data_directory }}" + - "{{ wireshark_data_directory }}/config" -- name: Create Wireshark Docker Container - docker_container: - name: wireshark - image: linuxserver/wireshark:latest - pull: true - volumes: - - "{{ wireshark_data_directory }}/config:/config:rw" - network_mode: host - env: - TZ: "{{ ansible_nas_timezone }}" - PUID: "{{ wireshark_user_id }}" - PGID: "{{ wireshark_group_id }}" - capabilities: - - NET_ADMIN - restart_policy: unless-stopped - memory: "{{ wireshark_memory }}" - labels: - traefik.enable: "{{ wireshark_available_externally | string }}" - traefik.http.routers.wireshark.rule: "Host(`{{ wireshark_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.wireshark.tls.certresolver: "letsencrypt" - traefik.http.routers.wireshark.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.wireshark.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.wireshark.loadbalancer.server.port: "3000" + - name: Create Wireshark Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ wireshark_container_name }}" + image: "{{ wireshark_image_name }}:{{ wireshark_image_version }}" + pull: true + volumes: + - "{{ wireshark_data_directory }}/config:/config:rw" + network_mode: host + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ wireshark_user_id }}" + PGID: "{{ wireshark_group_id }}" + capabilities: + - NET_ADMIN + restart_policy: unless-stopped + memory: "{{ wireshark_memory }}" + labels: + traefik.enable: "{{ wireshark_available_externally | string }}" + traefik.http.routers.wireshark.rule: "Host(`{{ wireshark_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.wireshark.tls.certresolver: "letsencrypt" + traefik.http.routers.wireshark.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.wireshark.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.wireshark.loadbalancer.server.port: "3000" + when: wireshark_enabled is true + +- name: Stop Wireshark + block: + - name: Stop Wireshark + community.docker.docker_container: + name: "{{ wireshark_container_name }}" + state: absent + when: wireshark_enabled is false diff --git a/roles/woodpecker-ci/defaults/main.yml b/roles/woodpecker-ci/defaults/main.yml index 75252387..1616d778 100644 --- a/roles/woodpecker-ci/defaults/main.yml +++ b/roles/woodpecker-ci/defaults/main.yml @@ -11,6 +11,15 @@ woodpecker_ci_port_grpc: 9000 woodpecker_ci_address: "http://{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:{{ woodpecker_ci_port_ui }}" woodpecker_ci_hostname: woodpecker-ci +# docker +woodpecker_ci_container_name: "woodpecker-ci" +woodpecker_ci_image_name: "woodpeckerci/woodpecker-server" +woodpecker_ci_image_version: "latest" + +woodpecker_ci_agent_container_name: "woodpecker-ci-agent" +woodpecker_ci_agent_image_name: "woodpeckerci/woodpecker-agent" +woodpecker_ci_agent_image_version: "latest" + # memory woodpecker_ci_memory: 1g woodpecker_ci_agent_memory: 1g diff --git a/roles/woodpecker-ci/docs/woodpecker_ci.md b/roles/woodpecker-ci/docs/woodpecker_ci.md new file mode 100644 index 00000000..216b4f53 --- /dev/null +++ b/roles/woodpecker-ci/docs/woodpecker_ci.md @@ -0,0 +1,17 @@ +# Woodpecker CI + +Woodpecker is a simple CI engine with great extensibility. + +Check it out at . + +## Usage + +Set `woodpecker_ci_enabled: true` in your `inventories//nas.yml` file. + +Gitea (`gitea_enabled: true`) must be set up and running before attempting to set up Woodpecker CI. + +## Setup Tasks + +An Oauth2 application must be set up in Gitea. Visit for more info, then set `woodpecker_ci_gitea_client` and `woodpecker_ci_gitea_secret` accordingly. + +Set `woodpecker_ci_admin_user` to the same username as your user in Gitea. diff --git a/roles/woodpecker-ci/molecule/default/molecule.yml b/roles/woodpecker-ci/molecule/default/molecule.yml new file mode 100644 index 00000000..b1140484 --- /dev/null +++ b/roles/woodpecker-ci/molecule/default/molecule.yml @@ -0,0 +1,22 @@ +--- +provisioner: + inventory: + group_vars: + all: + woodpecker_ci_enabled: true + gitea_enabled: true + woodpecker_ci_gitea_client: "test" + gitea_port_http: "8080" + gitea_data_directory: "/tmp/gitea" + playbooks: + prepare: prepare.yml +platforms: + - name: instance + image: geerlingguy/docker-ubuntu2204-ansible:latest + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:rw + - /var/run/docker.sock:/var/run/docker.sock + - /tmp:/tmp + cgroupns_mode: host + privileged: true + pre_build_image: true diff --git a/roles/woodpecker-ci/molecule/default/prepare.yml b/roles/woodpecker-ci/molecule/default/prepare.yml new file mode 100644 index 00000000..2ada4b06 --- /dev/null +++ b/roles/woodpecker-ci/molecule/default/prepare.yml @@ -0,0 +1,20 @@ +--- +- name: Prepare + hosts: all + tasks: + - name: Install docker python module + ansible.builtin.pip: + name: docker + + - name: Create a dummy gitea config directory + ansible.builtin.file: + path: "{{ item }}" + state: directory + recurse: yes + with_items: + - "{{ gitea_data_directory }}/gitea/gitea/conf" + + - name: Create a dummy gitea config file + ansible.builtin.file: + path: "{{ gitea_data_directory }}/gitea/gitea/conf/app.ini" + state: touch diff --git a/roles/woodpecker-ci/molecule/default/side_effect.yml b/roles/woodpecker-ci/molecule/default/side_effect.yml new file mode 100644 index 00000000..61d1c23c --- /dev/null +++ b/roles/woodpecker-ci/molecule/default/side_effect.yml @@ -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: + woodpecker_ci_enabled: false diff --git a/roles/woodpecker-ci/molecule/default/verify.yml b/roles/woodpecker-ci/molecule/default/verify.yml new file mode 100644 index 00000000..7d01d15c --- /dev/null +++ b/roles/woodpecker-ci/molecule/default/verify.yml @@ -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 woodpecker_ci container state + community.docker.docker_container: + name: "{{ woodpecker_ci_container_name }}" + register: result + + - name: Check if woodpecker_ci containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/woodpecker-ci/molecule/default/verify_stopped.yml b/roles/woodpecker-ci/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..887373bd --- /dev/null +++ b/roles/woodpecker-ci/molecule/default/verify_stopped.yml @@ -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 woodpecker_ci + community.docker.docker_container: + name: "{{ woodpecker_ci_container_name }}" + state: absent + register: result + + - name: Check if woodpecker_ci is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/woodpecker-ci/tasks/main.yml b/roles/woodpecker-ci/tasks/main.yml index 8e9d2270..9b0dbb86 100644 --- a/roles/woodpecker-ci/tasks/main.yml +++ b/roles/woodpecker-ci/tasks/main.yml @@ -1,70 +1,84 @@ --- -- name: Check for Gitea installation - fail: - msg: "Woodpecker-CI requires Gitea enabled and running for authentication, please set that up first." - when: gitea_enabled is false +- name: Start Woodpecker-CI + block: + - name: Check for Gitea installation + ansible.builtin.fail: + msg: "Woodpecker-CI requires Gitea enabled and running for authentication, please set that up first." + when: gitea_enabled is false -- name: Check for Gitea config - fail: - msg: "Missing Gitea Oauth2 config! Read https://woodpecker-ci.org/docs/administration/forges/gitea and set woodpecker_ci_gitea_client and woodpecker_ci_gitea_secret." - when: woodpecker_ci_gitea_client == "notset" + - name: Check for Gitea config + ansible.builtin.fail: + msg: "Missing Gitea Oauth2 config! Read https://woodpecker-ci.org/docs/administration/forges/gitea and set woodpecker_ci_gitea_client and woodpecker_ci_gitea_secret." + when: woodpecker_ci_gitea_client == "notset" -- name: Create Woodpecker-CI Directories - file: - path: "{{ item }}" - state: directory - with_items: - - "{{ woodpecker_ci_data_directory }}" + - name: Create Woodpecker-CI Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + with_items: + - "{{ woodpecker_ci_data_directory }}" -- name: Create Woodpecker-CI container - docker_container: - name: woodpecker-ci - image: woodpeckerci/woodpecker-server:latest - pull: true - volumes: - - "{{ woodpecker_ci_data_directory }}:/var/lib/woodpecker:rw" - ports: - - "{{ woodpecker_ci_port_ui }}:8000" - - "{{ woodpecker_ci_port_grpc }}:9000" - env: - WOODPECKER_ADMIN: "{{ woodpecker_ci_admin_user }}" - WOODPECKER_OPEN: "true" - WOODPECKER_HOST: "{{ woodpecker_ci_address }}" - WOODPECKER_AGENT_SECRET: "{{ woodpecker_ci_agent_secret }}" - WOODPECKER_GITEA: "true" - WOODPECKER_GITEA_URL: "{{ woodpecker_ci_gitea_url }}" - WOODPECKER_GITEA_CLIENT: "{{ woodpecker_ci_gitea_client }}" - WOODPECKER_GITEA_SECRET: "{{ woodpecker_ci_gitea_secret }}" - WOODPECKER_LOG_LEVEL: "{{ woodpecker_ci_log_level }}" - restart_policy: unless-stopped - memory: "{{ woodpecker_ci_memory }}" - labels: - traefik.enable: "{{ woodpecker_ci_available_externally | string }}" - traefik.http.routers.woodpecker_ci.rule: "Host(`{{ woodpecker_ci_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.woodpecker_ci.tls.certresolver: "letsencrypt" - traefik.http.routers.woodpecker_ci.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.woodpecker_ci.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.woodpecker_ci.loadbalancer.server.port: "8000" + - name: Create Woodpecker-CI container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ woodpecker_ci_container_name }}" + image: "{{ woodpecker_ci_image_name }}:{{ woodpecker_ci_image_version }}" + pull: true + volumes: + - "{{ woodpecker_ci_data_directory }}:/var/lib/woodpecker:rw" + ports: + - "{{ woodpecker_ci_port_ui }}:8000" + - "{{ woodpecker_ci_port_grpc }}:9000" + env: + WOODPECKER_ADMIN: "{{ woodpecker_ci_admin_user }}" + WOODPECKER_OPEN: "true" + WOODPECKER_HOST: "{{ woodpecker_ci_address }}" + WOODPECKER_AGENT_SECRET: "{{ woodpecker_ci_agent_secret }}" + WOODPECKER_GITEA: "true" + WOODPECKER_GITEA_URL: "{{ woodpecker_ci_gitea_url }}" + WOODPECKER_GITEA_CLIENT: "{{ woodpecker_ci_gitea_client }}" + WOODPECKER_GITEA_SECRET: "{{ woodpecker_ci_gitea_secret }}" + WOODPECKER_LOG_LEVEL: "{{ woodpecker_ci_log_level }}" + restart_policy: unless-stopped + memory: "{{ woodpecker_ci_memory }}" + labels: + traefik.enable: "{{ woodpecker_ci_available_externally | string }}" + traefik.http.routers.woodpecker_ci.rule: "Host(`{{ woodpecker_ci_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.woodpecker_ci.tls.certresolver: "letsencrypt" + traefik.http.routers.woodpecker_ci.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.woodpecker_ci.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.woodpecker_ci.loadbalancer.server.port: "8000" -- name: Create Woodpecker-CI agent container - docker_container: - name: woodpecker-ci-agent - image: woodpeckerci/woodpecker-agent:latest - pull: true - volumes: - - "/var/run/docker.sock:/var/run/docker.sock:rw" - env: - WOODPECKER_SERVER: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:{{ woodpecker_ci_port_grpc }}" - WOODPECKER_AGENT_SECRET: "{{ woodpecker_ci_agent_secret }}" - WOODPECKER_LOG_LEVEL: "{{ woodpecker_ci_log_level }}" - restart_policy: unless-stopped - memory: "{{ woodpecker_ci_agent_memory }}" + - name: Create Woodpecker-CI agent container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ woodpecker_ci_agent_container_name }}" + image: "{{ woodpecker_ci_agent_image_name }}:{{ woodpecker_ci_agent_image_version }}" + pull: true + volumes: + - "/var/run/docker.sock:/var/run/docker.sock:rw" + env: + WOODPECKER_SERVER: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:{{ woodpecker_ci_port_grpc }}" + WOODPECKER_AGENT_SECRET: "{{ woodpecker_ci_agent_secret }}" + WOODPECKER_LOG_LEVEL: "{{ woodpecker_ci_log_level }}" + restart_policy: unless-stopped + memory: "{{ woodpecker_ci_agent_memory }}" -- name: Add webhook allowed hosts to Gitea - blockinfile: - path: "{{ gitea_data_directory }}/gitea/gitea/conf/app.ini" - block: | - [webhook] - ALLOWED_HOST_LIST=private - SKIP_TLS_VERIFY=true - notify: restart gitea + - name: Add webhook allowed hosts to Gitea + ansible.builtin.blockinfile: + path: "{{ gitea_data_directory }}/gitea/gitea/conf/app.ini" + block: | + [webhook] + ALLOWED_HOST_LIST=private + SKIP_TLS_VERIFY=true + notify: restart + tags: molecule-notest + when: woodpecker_ci_enabled is true + +- name: Stop Woodpecker-CI + block: + - name: Stop Woodpecker-CI + community.docker.docker_container: + name: "{{ woodpecker_ci_container_name }}" + state: absent + when: woodpecker_ci_enabled is false diff --git a/roles/youtubedlmaterial/defaults/main.yml b/roles/youtubedlmaterial/defaults/main.yml index d62a73b0..bb1fe73c 100644 --- a/roles/youtubedlmaterial/defaults/main.yml +++ b/roles/youtubedlmaterial/defaults/main.yml @@ -13,5 +13,10 @@ youtubedlmaterial_dl_subscriptions_directory: "{{ downloads_root }}/youtube/subs youtubedlmaterial_hostname: "youtubedlmaterial" youtubedlmaterial_port_http: "8998" +# docker +youtubedlmaterial_container_name: "youtubedlmaterial" +youtubedlmaterial_image_name: "tzahi12345/youtubedl-material" +youtubedlmaterial_image_version: "latest" + # specs youtubedlmaterial_memory: "1g" diff --git a/roles/youtubedlmaterial/docs/youtubedlmaterial.md b/roles/youtubedlmaterial/docs/youtubedlmaterial.md new file mode 100644 index 00000000..cea68c42 --- /dev/null +++ b/roles/youtubedlmaterial/docs/youtubedlmaterial.md @@ -0,0 +1,17 @@ +# YouTubeDL-Material + +Homepage: +Docker Container: + +YoutubeDL-Material is a Material Design frontend for youtube-dl. It's coded using Angular 9 for the frontend, and Node.js on the backend. + +## Usage + +Set `youtubedlmaterial_enabled: true` in your `inventories//nas.yml` file. + +The YouTubeDL-Material web interface can be found at . + +## Specific Configuration + +A YouTube directory will be created in your configured downloads spot. YouTubeDL-Material downloads will be placed there. +You can change the download location via `inventories//nas.yml` file. diff --git a/roles/youtubedlmaterial/molecule/default/molecule.yml b/roles/youtubedlmaterial/molecule/default/molecule.yml new file mode 100644 index 00000000..cc425dbf --- /dev/null +++ b/roles/youtubedlmaterial/molecule/default/molecule.yml @@ -0,0 +1,6 @@ +--- +provisioner: + inventory: + group_vars: + all: + youtubedlmaterial_enabled: true diff --git a/roles/youtubedlmaterial/molecule/default/side_effect.yml b/roles/youtubedlmaterial/molecule/default/side_effect.yml new file mode 100644 index 00000000..3e097c11 --- /dev/null +++ b/roles/youtubedlmaterial/molecule/default/side_effect.yml @@ -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: + youtubedlmaterial_enabled: false diff --git a/roles/youtubedlmaterial/molecule/default/verify.yml b/roles/youtubedlmaterial/molecule/default/verify.yml new file mode 100644 index 00000000..274e3501 --- /dev/null +++ b/roles/youtubedlmaterial/molecule/default/verify.yml @@ -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 youtubedlmaterial container state + community.docker.docker_container: + name: "{{ youtubedlmaterial_container_name }}" + register: result + + - name: Check if youtubedlmaterial containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/youtubedlmaterial/molecule/default/verify_stopped.yml b/roles/youtubedlmaterial/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..c033588d --- /dev/null +++ b/roles/youtubedlmaterial/molecule/default/verify_stopped.yml @@ -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 youtubedlmaterial + community.docker.docker_container: + name: "{{ youtubedlmaterial_container_name }}" + state: absent + register: result + + - name: Check if youtubedlmaterial is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/youtubedlmaterial/tasks/main.yml b/roles/youtubedlmaterial/tasks/main.yml index 48a174b0..941838a0 100644 --- a/roles/youtubedlmaterial/tasks/main.yml +++ b/roles/youtubedlmaterial/tasks/main.yml @@ -1,40 +1,52 @@ --- -- name: Create Youtubedlmaterial Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ youtubedlmaterial_data_directory }}/appdata" - - "{{ youtubedlmaterial_data_directory }}/audio" - - "{{ youtubedlmaterial_data_directory }}/video" - - "{{ youtubedlmaterial_data_directory }}/subscriptions" - - "{{ youtubedlmaterial_dl_audio_directory }}" - - "{{ youtubedlmaterial_dl_video_directory }}" - - "{{ youtubedlmaterial_dl_subscriptions_directory }}" +- name: Start Youtubedlmaterial + block: + - name: Create Youtubedlmaterial Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ youtubedlmaterial_data_directory }}/appdata" + - "{{ youtubedlmaterial_data_directory }}/audio" + - "{{ youtubedlmaterial_data_directory }}/video" + - "{{ youtubedlmaterial_data_directory }}/subscriptions" + - "{{ youtubedlmaterial_dl_audio_directory }}" + - "{{ youtubedlmaterial_dl_video_directory }}" + - "{{ youtubedlmaterial_dl_subscriptions_directory }}" -- name: Create Youtubedlmaterial Docker Container - docker_container: - name: youtubedlmaterial - image: tzahi12345/youtubedl-material:latest - pull: true - volumes: - - "{{ youtubedlmaterial_data_directory }}/appdata:/app/appdata:rw" - - "{{ youtubedlmaterial_dl_audio_directory }}:/app/audio:rw" - - "{{ youtubedlmaterial_dl_video_directory }}:/app/video:rw" - - "{{ youtubedlmaterial_dl_subscriptions_directory }}:/app/subscriptions:rw" - network_mode: "bridge" - ports: - - "{{ youtubedlmaterial_port_http }}:17442" - env: - ALLOW_CONFIG_MUTATIONS: "true" - TZ: "{{ ansible_nas_timezone }}" - restart_policy: unless-stopped - memory: "{{ youtubedlmaterial_memory }}" - labels: - traefik.enable: "{{ youtubedlmaterial_available_externally | string }}" - traefik.http.routers.youtubedlmaterial.rule: "Host(`{{ youtubedlmaterial_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.youtubedlmaterial.tls.certresolver: "letsencrypt" - traefik.http.routers.youtubedlmaterial.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.youtubedlmaterial.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.youtubedlmaterial.loadbalancer.server.port: "17442" + - name: Create Youtubedlmaterial Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ youtubedlmaterial_container_name }}" + image: "{{ youtubedlmaterial_image_name }}:{{ youtubedlmaterial_image_version }}" + pull: true + volumes: + - "{{ youtubedlmaterial_data_directory }}/appdata:/app/appdata:rw" + - "{{ youtubedlmaterial_dl_audio_directory }}:/app/audio:rw" + - "{{ youtubedlmaterial_dl_video_directory }}:/app/video:rw" + - "{{ youtubedlmaterial_dl_subscriptions_directory }}:/app/subscriptions:rw" + network_mode: "bridge" + ports: + - "{{ youtubedlmaterial_port_http }}:17442" + env: + ALLOW_CONFIG_MUTATIONS: "true" + TZ: "{{ ansible_nas_timezone }}" + restart_policy: unless-stopped + memory: "{{ youtubedlmaterial_memory }}" + labels: + traefik.enable: "{{ youtubedlmaterial_available_externally | string }}" + traefik.http.routers.youtubedlmaterial.rule: "Host(`{{ youtubedlmaterial_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.youtubedlmaterial.tls.certresolver: "letsencrypt" + traefik.http.routers.youtubedlmaterial.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.youtubedlmaterial.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.youtubedlmaterial.loadbalancer.server.port: "17442" + when: youtubedlmaterial_enabled is true + +- name: Stop Youtubedlmaterial + block: + - name: Stop Youtubedlmaterial + community.docker.docker_container: + name: "{{ youtubedlmaterial_container_name }}" + state: absent + when: youtubedlmaterial_enabled is false diff --git a/roles/znc/defaults/main.yml b/roles/znc/defaults/main.yml index 3c4b5fbf..09666202 100644 --- a/roles/znc/defaults/main.yml +++ b/roles/znc/defaults/main.yml @@ -14,5 +14,17 @@ znc_group_id: "0" znc_hostname: "znc" znc_port: "6677" +# docker +znc_container_name: "znc" +znc_image_name: "znc" +znc_image_version: "latest" + # specs znc_memory: "1g" + +# znc +znc_user_password: "password" +znc_user_nick: "user" +znc_user_altnick: "user_" +znc_user_ident: "user" +znc_user_real_name: "User Name" diff --git a/roles/znc/docs/znc.md b/roles/znc/docs/znc.md new file mode 100644 index 00000000..bbcb5b54 --- /dev/null +++ b/roles/znc/docs/znc.md @@ -0,0 +1,11 @@ +# Znc + +Homepage: + +ZNC is an IRC network bouncer or BNC. It can detach the client from the actual IRC server, and also from selected channels. Multiple clients from different locations can connect to a single ZNC account simultaneously and therefore appear under the same nickname on IRC. It supports Transport Layer Security connections and IPv6. + +## Usage + +Set `znc_enabled: true` in your `inventories//nas.yml` file. Edit `znc_*` variables to suit your needs. For more advanced needs, edit the template config file (`templates\znc.conf.j2`) directly. + +Connect to ZNC using IRC at ansible_nas_host_or_ip:6677. diff --git a/roles/znc/molecule/default/molecule.yml b/roles/znc/molecule/default/molecule.yml new file mode 100644 index 00000000..00edf7f3 --- /dev/null +++ b/roles/znc/molecule/default/molecule.yml @@ -0,0 +1,17 @@ +--- +provisioner: + inventory: + group_vars: + all: + znc_enabled: true + znc_data_directory: "/tmp/znc" +platforms: + - name: instance + image: geerlingguy/docker-ubuntu2204-ansible:latest + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:rw + - /var/run/docker.sock:/var/run/docker.sock + - /tmp:/tmp + cgroupns_mode: host + privileged: true + pre_build_image: true diff --git a/roles/znc/molecule/default/side_effect.yml b/roles/znc/molecule/default/side_effect.yml new file mode 100644 index 00000000..267eb126 --- /dev/null +++ b/roles/znc/molecule/default/side_effect.yml @@ -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: + znc_enabled: false diff --git a/roles/znc/molecule/default/verify.yml b/roles/znc/molecule/default/verify.yml new file mode 100644 index 00000000..8756c954 --- /dev/null +++ b/roles/znc/molecule/default/verify.yml @@ -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 znc container state + community.docker.docker_container: + name: "{{ znc_container_name }}" + register: result + + - name: Check if znc containers are running + ansible.builtin.assert: + that: + - result.container['State']['Status'] == "running" + - result.container['State']['Restarting'] == false diff --git a/roles/znc/molecule/default/verify_stopped.yml b/roles/znc/molecule/default/verify_stopped.yml new file mode 100644 index 00000000..8a5d3ef9 --- /dev/null +++ b/roles/znc/molecule/default/verify_stopped.yml @@ -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 znc + community.docker.docker_container: + name: "{{ znc_container_name }}" + state: absent + register: result + + - name: Check if znc is stopped + ansible.builtin.assert: + that: + - not result.changed diff --git a/roles/znc/tasks/main.yml b/roles/znc/tasks/main.yml index 9469afd8..08ccec03 100644 --- a/roles/znc/tasks/main.yml +++ b/roles/znc/tasks/main.yml @@ -1,31 +1,50 @@ --- -- name: Create ZNC Directories - file: - path: "{{ item }}" - state: directory - # mode: 0755 - with_items: - - "{{ znc_data_directory }}" +- name: Start ZNC + block: + - name: Create ZNC Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ znc_data_directory }}" + - "{{ znc_data_directory }}/configs" -- name: Create ZNC Docker Container - docker_container: - name: znc - image: znc - pull: true - volumes: - - "{{ znc_data_directory }}:/znc-data:rw" - - "/etc/timezone:/etc/timezone:ro" - ports: - - "{{ znc_port }}:6677" - env: - PUID: "{{ znc_user_id }}" - PGID: "{{ znc_group_id }}" - restart_policy: unless-stopped - memory: "{{ znc_memory }}" - labels: - traefik.enable: "{{ znc_available_externally | string }}" - traefik.http.routers.znc.rule: "Host(`{{ znc_hostname }}.{{ ansible_nas_domain }}`)" - traefik.http.routers.znc.tls.certresolver: "letsencrypt" - traefik.http.routers.znc.tls.domains[0].main: "{{ ansible_nas_domain }}" - traefik.http.routers.znc.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.znc.loadbalancer.server.port: "6677" + - name: Template Znc config + ansible.builtin.template: + src: znc.conf.j2 + dest: "{{ znc_data_directory }}/configs/znc.conf" + register: template_config + + - name: Create ZNC Docker Container + community.docker.docker_container: + container_default_behavior: no_defaults + name: "{{ znc_container_name }}" + image: "{{ znc_image_name }}:{{ znc_image_version }}" + pull: true + volumes: + - "{{ znc_data_directory }}:/znc-data:rw" + - "/etc/timezone:/etc/timezone:ro" + ports: + - "{{ znc_port }}:6677" + env: + PUID: "{{ znc_user_id }}" + PGID: "{{ znc_group_id }}" + restart_policy: unless-stopped + memory: "{{ znc_memory }}" + labels: + traefik.enable: "{{ znc_available_externally | string }}" + traefik.http.routers.znc.rule: "Host(`{{ znc_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.znc.tls.certresolver: "letsencrypt" + traefik.http.routers.znc.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.znc.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.znc.loadbalancer.server.port: "6677" + when: znc_enabled is true + +- name: Stop ZNC + block: + - name: Stop ZNC + community.docker.docker_container: + name: "{{ znc_container_name }}" + state: absent + when: znc_enabled is false diff --git a/roles/znc/templates/znc.conf.j2 b/roles/znc/templates/znc.conf.j2 new file mode 100644 index 00000000..edfb74b7 --- /dev/null +++ b/roles/znc/templates/znc.conf.j2 @@ -0,0 +1,35 @@ +// WARNING +// +// Do NOT edit this file while ZNC is running! +// Use webadmin or *controlpanel instead. +// +// Altering this file by hand will forfeit all support. +// +// But if you feel risky, you might want to read help on /znc saveconfig and /znc rehash. +// Also check https://wiki.znc.in/Configuration + +Version = 1.8.2 + + Port = 6677 + IPv4 = true + IPv6 = true + SSL = false + +LoadModule = webadmin + + + Pass = plain#{{ znc_user_password }} + Admin = true + Nick = {{ znc_user_nick }} + AltNick = {{ znc_user_altnick }} + Ident = {{ znc_user_ident }} + RealName = {{ znc_user_real_name }} + LoadModule = chansaver + LoadModule = controlpanel + LoadModule = webadmin + + + LoadModule = simple_away + Server = chat.freenode.net +6697 + + From ea989200186804b92ecdcfad4f6fd3d478b4435b Mon Sep 17 00:00:00 2001 From: Anarion Date: Fri, 10 Mar 2023 22:24:14 +0100 Subject: [PATCH 09/84] Fix lint --- roles/airsonic/molecule/default/verify.yml | 3 ++- roles/airsonic/molecule/default/verify_stopped.yml | 3 ++- roles/bazarr/molecule/default/verify.yml | 3 ++- roles/bazarr/molecule/default/verify_stopped.yml | 3 ++- roles/bitwarden/molecule/default/verify.yml | 3 ++- roles/bitwarden/molecule/default/verify_stopped.yml | 3 ++- roles/booksonic/molecule/default/verify.yml | 3 ++- roles/booksonic/molecule/default/verify_stopped.yml | 3 ++- roles/calibre/molecule/default/verify.yml | 3 ++- roles/calibre/molecule/default/verify_stopped.yml | 3 ++- roles/cloudcmd/molecule/default/verify.yml | 3 ++- roles/cloudcmd/molecule/default/verify_stopped.yml | 3 ++- roles/cloudflare_ddns/molecule/default/verify.yml | 3 ++- roles/cloudflare_ddns/molecule/default/verify_stopped.yml | 3 ++- roles/code-server/molecule/default/verify.yml | 3 ++- roles/code-server/molecule/default/verify_stopped.yml | 3 ++- roles/couchpotato/molecule/default/verify.yml | 3 ++- roles/couchpotato/molecule/default/verify_stopped.yml | 3 ++- roles/dashy/molecule/default/verify.yml | 3 ++- roles/dashy/molecule/default/verify_stopped.yml | 3 ++- roles/deluge/molecule/default/verify.yml | 3 ++- roles/deluge/molecule/default/verify_stopped.yml | 3 ++- roles/dokuwiki/molecule/default/verify.yml | 3 ++- roles/dokuwiki/molecule/default/verify_stopped.yml | 3 ++- roles/duplicacy/molecule/default/verify.yml | 3 ++- roles/duplicacy/molecule/default/verify_stopped.yml | 3 ++- roles/emby/molecule/default/verify.yml | 3 ++- roles/esphome/molecule/default/verify.yml | 3 ++- roles/esphome/molecule/default/verify_stopped.yml | 3 ++- roles/firefly/molecule/default/verify.yml | 3 ++- roles/firefly/molecule/default/verify_stopped.yml | 3 ++- roles/heimdall/molecule/default/verify.yml | 3 ++- roles/heimdall/molecule/default/verify_stopped.yml | 3 ++- roles/hello_world/molecule/default/verify.yml | 3 ++- roles/hello_world/molecule/default/verify_stopped.yml | 3 ++- roles/mealie/tasks/main.yml | 1 - roles/octoprint/molecule/default/molecule.yml | 1 - roles/tautulli/molecule/default/molecule.yml | 2 +- 38 files changed, 71 insertions(+), 38 deletions(-) diff --git a/roles/airsonic/molecule/default/verify.yml b/roles/airsonic/molecule/default/verify.yml index 5dc0a7c4..4b3472e7 100644 --- a/roles/airsonic/molecule/default/verify.yml +++ b/roles/airsonic/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/airsonic/molecule/default/verify_stopped.yml b/roles/airsonic/molecule/default/verify_stopped.yml index a6420557..2a42b6dd 100644 --- a/roles/airsonic/molecule/default/verify_stopped.yml +++ b/roles/airsonic/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Airsonic diff --git a/roles/bazarr/molecule/default/verify.yml b/roles/bazarr/molecule/default/verify.yml index b2924408..65df9389 100644 --- a/roles/bazarr/molecule/default/verify.yml +++ b/roles/bazarr/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/bazarr/molecule/default/verify_stopped.yml b/roles/bazarr/molecule/default/verify_stopped.yml index 7b316fdb..a82a3746 100644 --- a/roles/bazarr/molecule/default/verify_stopped.yml +++ b/roles/bazarr/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Bazarr diff --git a/roles/bitwarden/molecule/default/verify.yml b/roles/bitwarden/molecule/default/verify.yml index c62702be..797499d0 100644 --- a/roles/bitwarden/molecule/default/verify.yml +++ b/roles/bitwarden/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/bitwarden/molecule/default/verify_stopped.yml b/roles/bitwarden/molecule/default/verify_stopped.yml index debe8358..ca08d064 100644 --- a/roles/bitwarden/molecule/default/verify_stopped.yml +++ b/roles/bitwarden/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Bitwarden diff --git a/roles/booksonic/molecule/default/verify.yml b/roles/booksonic/molecule/default/verify.yml index 98400317..145ab469 100644 --- a/roles/booksonic/molecule/default/verify.yml +++ b/roles/booksonic/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/booksonic/molecule/default/verify_stopped.yml b/roles/booksonic/molecule/default/verify_stopped.yml index 7b68fe98..aa5ad018 100644 --- a/roles/booksonic/molecule/default/verify_stopped.yml +++ b/roles/booksonic/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Booksonic diff --git a/roles/calibre/molecule/default/verify.yml b/roles/calibre/molecule/default/verify.yml index 77267b9d..b911fb66 100644 --- a/roles/calibre/molecule/default/verify.yml +++ b/roles/calibre/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/calibre/molecule/default/verify_stopped.yml b/roles/calibre/molecule/default/verify_stopped.yml index bd3ccf6e..3ee9c51f 100644 --- a/roles/calibre/molecule/default/verify_stopped.yml +++ b/roles/calibre/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Calibre diff --git a/roles/cloudcmd/molecule/default/verify.yml b/roles/cloudcmd/molecule/default/verify.yml index abef5b4a..14dd662a 100644 --- a/roles/cloudcmd/molecule/default/verify.yml +++ b/roles/cloudcmd/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/cloudcmd/molecule/default/verify_stopped.yml b/roles/cloudcmd/molecule/default/verify_stopped.yml index 68ad0d3b..b5beda38 100644 --- a/roles/cloudcmd/molecule/default/verify_stopped.yml +++ b/roles/cloudcmd/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Cloudcmd diff --git a/roles/cloudflare_ddns/molecule/default/verify.yml b/roles/cloudflare_ddns/molecule/default/verify.yml index 0e92e82e..bbcff3a6 100644 --- a/roles/cloudflare_ddns/molecule/default/verify.yml +++ b/roles/cloudflare_ddns/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/cloudflare_ddns/molecule/default/verify_stopped.yml b/roles/cloudflare_ddns/molecule/default/verify_stopped.yml index e2273930..ea05fd75 100644 --- a/roles/cloudflare_ddns/molecule/default/verify_stopped.yml +++ b/roles/cloudflare_ddns/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Cloudflare DDNS diff --git a/roles/code-server/molecule/default/verify.yml b/roles/code-server/molecule/default/verify.yml index 970070c6..0abf9488 100644 --- a/roles/code-server/molecule/default/verify.yml +++ b/roles/code-server/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/code-server/molecule/default/verify_stopped.yml b/roles/code-server/molecule/default/verify_stopped.yml index 5cba43cc..87973991 100644 --- a/roles/code-server/molecule/default/verify_stopped.yml +++ b/roles/code-server/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Code Server diff --git a/roles/couchpotato/molecule/default/verify.yml b/roles/couchpotato/molecule/default/verify.yml index 3031e902..c4acee8c 100644 --- a/roles/couchpotato/molecule/default/verify.yml +++ b/roles/couchpotato/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/couchpotato/molecule/default/verify_stopped.yml b/roles/couchpotato/molecule/default/verify_stopped.yml index 213afef4..f9546dfe 100644 --- a/roles/couchpotato/molecule/default/verify_stopped.yml +++ b/roles/couchpotato/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Couchpotato diff --git a/roles/dashy/molecule/default/verify.yml b/roles/dashy/molecule/default/verify.yml index 6c1bc594..dd68450b 100644 --- a/roles/dashy/molecule/default/verify.yml +++ b/roles/dashy/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/dashy/molecule/default/verify_stopped.yml b/roles/dashy/molecule/default/verify_stopped.yml index 1748897f..872ba4f4 100644 --- a/roles/dashy/molecule/default/verify_stopped.yml +++ b/roles/dashy/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Dashy diff --git a/roles/deluge/molecule/default/verify.yml b/roles/deluge/molecule/default/verify.yml index 6d815a89..021229fa 100644 --- a/roles/deluge/molecule/default/verify.yml +++ b/roles/deluge/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/deluge/molecule/default/verify_stopped.yml b/roles/deluge/molecule/default/verify_stopped.yml index 9d4abcbe..daa3bbe7 100644 --- a/roles/deluge/molecule/default/verify_stopped.yml +++ b/roles/deluge/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Deluge diff --git a/roles/dokuwiki/molecule/default/verify.yml b/roles/dokuwiki/molecule/default/verify.yml index 676a5e79..d5e4fd9a 100644 --- a/roles/dokuwiki/molecule/default/verify.yml +++ b/roles/dokuwiki/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/dokuwiki/molecule/default/verify_stopped.yml b/roles/dokuwiki/molecule/default/verify_stopped.yml index 60151b02..e8101a35 100644 --- a/roles/dokuwiki/molecule/default/verify_stopped.yml +++ b/roles/dokuwiki/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Dokuwiki diff --git a/roles/duplicacy/molecule/default/verify.yml b/roles/duplicacy/molecule/default/verify.yml index 7eaee192..e1421406 100644 --- a/roles/duplicacy/molecule/default/verify.yml +++ b/roles/duplicacy/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/duplicacy/molecule/default/verify_stopped.yml b/roles/duplicacy/molecule/default/verify_stopped.yml index 487edf70..bf7c63aa 100644 --- a/roles/duplicacy/molecule/default/verify_stopped.yml +++ b/roles/duplicacy/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Duplicacy diff --git a/roles/emby/molecule/default/verify.yml b/roles/emby/molecule/default/verify.yml index ce3037bf..49fb3836 100644 --- a/roles/emby/molecule/default/verify.yml +++ b/roles/emby/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/esphome/molecule/default/verify.yml b/roles/esphome/molecule/default/verify.yml index a80b5867..12154f92 100644 --- a/roles/esphome/molecule/default/verify.yml +++ b/roles/esphome/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/esphome/molecule/default/verify_stopped.yml b/roles/esphome/molecule/default/verify_stopped.yml index dad14d09..b92cbdd0 100644 --- a/roles/esphome/molecule/default/verify_stopped.yml +++ b/roles/esphome/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove EspHome diff --git a/roles/firefly/molecule/default/verify.yml b/roles/firefly/molecule/default/verify.yml index 7da64ee7..aa387705 100644 --- a/roles/firefly/molecule/default/verify.yml +++ b/roles/firefly/molecule/default/verify.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/firefly/molecule/default/verify_stopped.yml b/roles/firefly/molecule/default/verify_stopped.yml index eecb6203..831693bf 100644 --- a/roles/firefly/molecule/default/verify_stopped.yml +++ b/roles/firefly/molecule/default/verify_stopped.yml @@ -3,7 +3,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Firefly diff --git a/roles/heimdall/molecule/default/verify.yml b/roles/heimdall/molecule/default/verify.yml index fbeb6021..e812328e 100644 --- a/roles/heimdall/molecule/default/verify.yml +++ b/roles/heimdall/molecule/default/verify.yml @@ -5,7 +5,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/heimdall/molecule/default/verify_stopped.yml b/roles/heimdall/molecule/default/verify_stopped.yml index 2be7a52d..1181dd36 100644 --- a/roles/heimdall/molecule/default/verify_stopped.yml +++ b/roles/heimdall/molecule/default/verify_stopped.yml @@ -5,7 +5,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Heimdall diff --git a/roles/hello_world/molecule/default/verify.yml b/roles/hello_world/molecule/default/verify.yml index 1cf221a3..d0345f30 100644 --- a/roles/hello_world/molecule/default/verify.yml +++ b/roles/hello_world/molecule/default/verify.yml @@ -5,7 +5,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Get container state diff --git a/roles/hello_world/molecule/default/verify_stopped.yml b/roles/hello_world/molecule/default/verify_stopped.yml index 4f4cc4dd..1360f1a4 100644 --- a/roles/hello_world/molecule/default/verify_stopped.yml +++ b/roles/hello_world/molecule/default/verify_stopped.yml @@ -5,7 +5,8 @@ hosts: all gather_facts: false tasks: - - include_vars: + - name: Include vars + include_vars: file: ../../defaults/main.yml - name: Try and stop and remove Hello World diff --git a/roles/mealie/tasks/main.yml b/roles/mealie/tasks/main.yml index 9978441c..7683d4f7 100644 --- a/roles/mealie/tasks/main.yml +++ b/roles/mealie/tasks/main.yml @@ -47,4 +47,3 @@ name: "{{ mealie_container_name }}" state: absent when: mealie_enabled is false - diff --git a/roles/octoprint/molecule/default/molecule.yml b/roles/octoprint/molecule/default/molecule.yml index 7d54b88f..3589c73f 100644 --- a/roles/octoprint/molecule/default/molecule.yml +++ b/roles/octoprint/molecule/default/molecule.yml @@ -16,4 +16,3 @@ platforms: cgroupns_mode: host privileged: true pre_build_image: true - diff --git a/roles/tautulli/molecule/default/molecule.yml b/roles/tautulli/molecule/default/molecule.yml index 00030527..e21b67ba 100644 --- a/roles/tautulli/molecule/default/molecule.yml +++ b/roles/tautulli/molecule/default/molecule.yml @@ -4,4 +4,4 @@ provisioner: group_vars: all: tautulli_enabled: true - plex_logs: "/tmp/log" \ No newline at end of file + plex_logs: "/tmp/log" From 5409640a1244778b0622cb2d0cb1a09f7ac96380 Mon Sep 17 00:00:00 2001 From: Anarion Date: Fri, 10 Mar 2023 22:36:46 +0100 Subject: [PATCH 10/84] Fix timemachine and its tests --- roles/timemachine/handlers/main.yml | 6 ++++++ roles/timemachine/molecule/default/molecule.yml | 10 ++++++++++ roles/timemachine/tasks/main.yml | 7 ++----- 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 roles/timemachine/handlers/main.yml diff --git a/roles/timemachine/handlers/main.yml b/roles/timemachine/handlers/main.yml new file mode 100644 index 00000000..4e1a1ff1 --- /dev/null +++ b/roles/timemachine/handlers/main.yml @@ -0,0 +1,6 @@ +--- +- name: Reload Avahi Configuration + ansible.builtin.service: + name: avahi-daemon + state: reloaded + listen: "reload avahi configuration" diff --git a/roles/timemachine/molecule/default/molecule.yml b/roles/timemachine/molecule/default/molecule.yml index 79d63655..4beec808 100644 --- a/roles/timemachine/molecule/default/molecule.yml +++ b/roles/timemachine/molecule/default/molecule.yml @@ -4,3 +4,13 @@ provisioner: group_vars: all: timemachine_enabled: true +platforms: + - name: instance + image: geerlingguy/docker-ubuntu2204-ansible:latest + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:rw + - /var/run/docker.sock:/var/run/docker.sock + cgroupns_mode: host + command: "/usr/sbin/init" + privileged: true + pre_build_image: true diff --git a/roles/timemachine/tasks/main.yml b/roles/timemachine/tasks/main.yml index 85f735cd..a05bd01f 100644 --- a/roles/timemachine/tasks/main.yml +++ b/roles/timemachine/tasks/main.yml @@ -30,6 +30,7 @@ ansible.builtin.apt: name: "avahi-daemon" state: present + update_cache: yes register: result until: result is succeeded @@ -37,11 +38,7 @@ ansible.builtin.template: src: timemachine.service dest: "/etc/avahi/services/timemachine.service" - - - name: Reload avahi configuration - ansible.builtin.service: - name: avahi-daemon - state: reloaded + notify: reload avahi configuration when: timemachine_enabled is true - name: Stop Time Machine From 7e1149beaac8659c52acfeda9919a494c658f7cb Mon Sep 17 00:00:00 2001 From: Anarion Date: Sat, 11 Mar 2023 13:21:09 +0100 Subject: [PATCH 11/84] Fix grafana test idempotence --- roles/stats/tasks/grafana.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/stats/tasks/grafana.yml b/roles/stats/tasks/grafana.yml index 7d6b8b67..cb0a5492 100644 --- a/roles/stats/tasks/grafana.yml +++ b/roles/stats/tasks/grafana.yml @@ -7,6 +7,7 @@ state: directory owner: "472" recurse: yes + changed_when: false with_items: - "{{ stats_grafana_data_directory }}" - "{{ stats_grafana_config_directory }}" From 59958915aab05fb775f0fda668d67b7e98f60e17 Mon Sep 17 00:00:00 2001 From: Anarion Date: Sat, 11 Mar 2023 13:58:05 +0100 Subject: [PATCH 12/84] Fix traefik test --- roles/traefik/molecule/default/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/traefik/molecule/default/molecule.yml b/roles/traefik/molecule/default/molecule.yml index c083c5c2..9e1a5958 100644 --- a/roles/traefik/molecule/default/molecule.yml +++ b/roles/traefik/molecule/default/molecule.yml @@ -12,7 +12,7 @@ platforms: volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw - /var/run/docker.sock:/var/run/docker.sock - - /dev/null:/dev/null + - /tmp:/tmp cgroupns_mode: host privileged: true pre_build_image: true From 4b70a087dac3292e7aebd512b2146666a515911a Mon Sep 17 00:00:00 2001 From: Anarion Date: Sat, 11 Mar 2023 14:14:51 +0100 Subject: [PATCH 13/84] Remove .code-workspace --- ansible-nas.code-workspace | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 ansible-nas.code-workspace diff --git a/ansible-nas.code-workspace b/ansible-nas.code-workspace deleted file mode 100644 index cec4ab85..00000000 --- a/ansible-nas.code-workspace +++ /dev/null @@ -1,15 +0,0 @@ -{ - "folders": [ - { - "path": "." - } - ], - "settings": { - "yaml.schemas": { - "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/tasks": "file:///c%3A/Users/anarion/Documents/repos/ansible-nas/roles/immich/tasks/main.yml" - }, - "files.associations": { - "*.yaml": "home-assistant" - } - }, -} \ No newline at end of file From 4b5218986193f45490b6c5bbfe6e54b280fda36e Mon Sep 17 00:00:00 2001 From: Anarion Date: Sat, 11 Mar 2023 14:31:35 +0100 Subject: [PATCH 14/84] Add network to miniflux --- roles/miniflux/defaults/main.yml | 1 + roles/miniflux/tasks/main.yml | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/roles/miniflux/defaults/main.yml b/roles/miniflux/defaults/main.yml index 010223fd..b89a8fc4 100644 --- a/roles/miniflux/defaults/main.yml +++ b/roles/miniflux/defaults/main.yml @@ -12,6 +12,7 @@ miniflux_admin_password: supersecure # network miniflux_hostname: "miniflux" +miniflux_network_name: "miniflux" miniflux_port: "8070" # docker diff --git a/roles/miniflux/tasks/main.yml b/roles/miniflux/tasks/main.yml index 664813df..f70b1c91 100644 --- a/roles/miniflux/tasks/main.yml +++ b/roles/miniflux/tasks/main.yml @@ -8,12 +8,19 @@ with_items: - "{{ miniflux_data_directory }}/postgres" + - name: Create Miniflux network + community.docker.docker_network: + name: "{{ miniflux_network_name }}" + - name: Create Postgres for Miniflux 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 + networks: + - name: "{{ miniflux_network_name }}" + network_mode: "{{ miniflux_network_name }}" volumes: - "{{ miniflux_data_directory }}/postgres:/var/lib/postgresql/data:rw" env: @@ -28,12 +35,13 @@ name: "{{ miniflux_container_name }}" image: "{{ miniflux_image_name }}:{{ miniflux_image_version }}" pull: true - links: - - miniflux-postgres:db + networks: + - name: "{{ miniflux_network_name }}" + network_mode: "{{ miniflux_network_name }}" ports: - "{{ miniflux_port }}:8080" env: - DATABASE_URL: "postgres://miniflux:supersecure@db/miniflux?sslmode=disable" + DATABASE_URL: "postgres://miniflux:supersecure@{{ miniflux_db_container_name }}/miniflux?sslmode=disable" RUN_MIGRATIONS: "1" CREATE_ADMIN: "1" ADMIN_USERNAME: "{{ miniflux_admin_username }}" From 150f90ad61bc3a3311723dda1658a3aa2b3c2503 Mon Sep 17 00:00:00 2001 From: Anarion Date: Sat, 11 Mar 2023 14:35:56 +0100 Subject: [PATCH 15/84] Remove comments --- roles/nomad/tasks/main.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/roles/nomad/tasks/main.yml b/roles/nomad/tasks/main.yml index f0ea6b28..2b19bf72 100644 --- a/roles/nomad/tasks/main.yml +++ b/roles/nomad/tasks/main.yml @@ -5,18 +5,12 @@ ansible.builtin.get_url: url: https://apt.releases.hashicorp.com/gpg dest: /etc/apt/trusted.gpg.d/hashicorp.asc - # dest: /usr/share/keyrings/hashicorp-nomad-keyring.gpg mode: '0644' force: true - # - name: Add Hashicorp GPG key - # ansible.builtin.apt_key: - # url: https://apt.releases.hashicorp.com/gpg - # state: present - name: Add Hashicorp apt repository ansible.builtin.apt_repository: repo: "deb https://apt.releases.hashicorp.com {{ ansible_facts['lsb']['codename'] }} main" - # repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/hashicorp-nomad-keyring.gpg] https://apt.releases.hashicorp.com {{ ansible_facts['lsb']['codename'] }} main" state: present filename: hashicorp From 12461c1d63048456701f6a66acd55af3b7489fa6 Mon Sep 17 00:00:00 2001 From: Anarion Date: Sat, 11 Mar 2023 14:52:30 +0100 Subject: [PATCH 16/84] Fix website docs lint --- roles/thelounge/docs/thelounge.md | 1 - roles/timemachine/docs/timemachine.md | 1 - roles/transmission-with-openvpn/docs/transmission.md | 1 - roles/transmission/docs/transmission.md | 1 - 4 files changed, 4 deletions(-) diff --git a/roles/thelounge/docs/thelounge.md b/roles/thelounge/docs/thelounge.md index 2dadc212..1b15ea70 100644 --- a/roles/thelounge/docs/thelounge.md +++ b/roles/thelounge/docs/thelounge.md @@ -1,6 +1,5 @@ # The Lounge" - Homepage: The Lounge is a self-hosted web IRC client. diff --git a/roles/timemachine/docs/timemachine.md b/roles/timemachine/docs/timemachine.md index 468ca43f..37c2cbc7 100644 --- a/roles/timemachine/docs/timemachine.md +++ b/roles/timemachine/docs/timemachine.md @@ -1,6 +1,5 @@ # Time Machine - Apple docs: Docker image: diff --git a/roles/transmission-with-openvpn/docs/transmission.md b/roles/transmission-with-openvpn/docs/transmission.md index aa79341e..456e741d 100644 --- a/roles/transmission-with-openvpn/docs/transmission.md +++ b/roles/transmission-with-openvpn/docs/transmission.md @@ -1,6 +1,5 @@ # Transmission - Homepage: Transmission is a free BitTorrent client. Two versions are provided - one that tunnels through OpenVPN and one that connects diff --git a/roles/transmission/docs/transmission.md b/roles/transmission/docs/transmission.md index aa79341e..456e741d 100644 --- a/roles/transmission/docs/transmission.md +++ b/roles/transmission/docs/transmission.md @@ -1,6 +1,5 @@ # Transmission - Homepage: Transmission is a free BitTorrent client. Two versions are provided - one that tunnels through OpenVPN and one that connects From 9f3f684d01ed65080c1974d835434c7f8753f017 Mon Sep 17 00:00:00 2001 From: Anarion Date: Tue, 28 Mar 2023 13:09:42 +0200 Subject: [PATCH 17/84] =?UTF-8?q?=E2=9C=85=20Update=20Nomad=20test=20to=20?= =?UTF-8?q?check=20variable=20service=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/nomad/molecule/default/verify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nomad/molecule/default/verify.yml b/roles/nomad/molecule/default/verify.yml index 717a7d47..2efc7cd6 100644 --- a/roles/nomad/molecule/default/verify.yml +++ b/roles/nomad/molecule/default/verify.yml @@ -9,7 +9,7 @@ - name: Get Nomad service state ansible.builtin.systemd: - name: nomad + name: "{{ nomad_service_name }}" state: started register: service_result From d0b6fcbb9fac89edc03f5aa4bc8df97e7c8529c5 Mon Sep 17 00:00:00 2001 From: Anarion Date: Tue, 28 Mar 2023 13:19:33 +0200 Subject: [PATCH 18/84] =?UTF-8?q?=F0=9F=93=9D=20Remove=20docs=20in=20prepa?= =?UTF-8?q?ration=20to=20git=20cp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/freshrss/docs/freshrss.md | 21 ------ roles/get_iplayer/docs/get_iplayer.md | 11 ---- roles/gitea/docs/gitea.md | 11 ---- roles/gitlab/docs/gitlab.md | 13 ---- roles/glances/docs/glances.md | 15 ----- roles/gotify/docs/gotify.md | 16 ----- roles/guacamole/docs/guacamole.md | 17 ----- roles/healthchecks.io/docs/healthchecks.io.md | 11 ---- roles/heimdall/docs/heimdall.md | 15 ----- roles/homeassistant/docs/homeassistant.md | 13 ---- roles/homebridge/docs/homebridge.md | 11 ---- roles/jackett/docs/jackett.md | 11 ---- roles/jellyfin/docs/jellyfin.md | 65 ------------------- roles/joomla/docs/joomla.md | 23 ------- roles/komga/docs/komga.md | 13 ---- roles/krusader/docs/krusader.md | 13 ---- roles/lidarr/docs/lidarr.md | 9 --- roles/mealie/docs/mealie.md | 11 ---- .../minecraft-server/docs/minecraft-server.md | 13 ---- roles/minidlna/docs/minidlna.md | 11 ---- roles/miniflux/docs/miniflux.md | 15 ----- roles/mosquitto/docs/mosquitto.md | 9 --- roles/mylar/docs/mylar.md | 15 ----- roles/mymediaforalexa/docs/mymediaforalexa.md | 11 ---- roles/n8n/docs/n8n.md | 18 ----- roles/navidrome/docs/navidrome.md | 11 ---- roles/netbootxyz/docs/netbootxyz.md | 15 ----- roles/netdata/docs/netdata.md | 11 ---- roles/nextcloud/docs/nextcloud.md | 25 ------- roles/nomad/docs/nomad.md | 11 ---- roles/nzbget/docs/nzbget.md | 11 ---- roles/octoprint/docs/octoprint.md | 11 ---- roles/ombi/docs/ombi.md | 9 --- roles/openhab/docs/openhab.md | 15 ----- roles/organizr/docs/organizr.md | 15 ----- roles/overseerr/docs/overseerr.md | 13 ---- roles/paperless_ng/docs/paperless_ng.md | 23 ------- roles/piwigo/docs/piwigo.md | 28 -------- roles/plex/docs/plex.md | 16 ----- roles/portainer/docs/portainer.md | 9 --- roles/prowlarr/docs/prowlarr.md | 15 ----- roles/pyload/docs/pyload.md | 16 ----- roles/pytivo/docs/pytivo.md | 30 --------- roles/radarr/docs/radarr.md | 22 ------- roles/route53_ddns/docs/route53_ddns.md | 40 ------------ roles/rssbridge/docs/rssbridge.md | 13 ---- roles/sabnzbd/docs/sabnzbd.md | 11 ---- roles/sickchill/docs/sickchill.md | 12 ---- roles/sonarr/docs/sonarr.md | 22 ------- roles/speedtest-tracker/docs/speedtest.md | 15 ----- roles/stats/docs/stats.md | 13 ---- roles/syncthing/docs/syncthing.md | 27 -------- roles/tautulli/docs/tautulli.md | 11 ---- roles/thelounge/docs/thelounge.md | 15 ----- roles/tiddlywiki/docs/tiddlywiki.md | 34 ---------- roles/timemachine/docs/timemachine.md | 28 -------- roles/traefik/docs/traefik.md | 20 ------ .../docs/transmission.md | 25 ------- roles/transmission/docs/transmission.md | 25 ------- roles/ubooquity/docs/ubooquity.md | 25 ------- roles/utorrent/docs/utorrent.md | 15 ----- roles/virtual_desktop/docs/virtual_desktop.md | 30 --------- roles/wallabag/docs/wallabag.md | 17 ----- roles/watchtower/docs/watchtower.md | 15 ----- roles/wireshark/docs/wireshark.md | 11 ---- roles/woodpecker-ci/docs/woodpecker_ci.md | 17 ----- .../docs/youtubedlmaterial.md | 17 ----- roles/znc/docs/znc.md | 11 ---- 68 files changed, 1166 deletions(-) delete mode 100644 roles/freshrss/docs/freshrss.md delete mode 100644 roles/get_iplayer/docs/get_iplayer.md delete mode 100644 roles/gitea/docs/gitea.md delete mode 100644 roles/gitlab/docs/gitlab.md delete mode 100644 roles/glances/docs/glances.md delete mode 100644 roles/gotify/docs/gotify.md delete mode 100644 roles/guacamole/docs/guacamole.md delete mode 100644 roles/healthchecks.io/docs/healthchecks.io.md delete mode 100644 roles/heimdall/docs/heimdall.md delete mode 100644 roles/homeassistant/docs/homeassistant.md delete mode 100644 roles/homebridge/docs/homebridge.md delete mode 100644 roles/jackett/docs/jackett.md delete mode 100644 roles/jellyfin/docs/jellyfin.md delete mode 100644 roles/joomla/docs/joomla.md delete mode 100644 roles/komga/docs/komga.md delete mode 100644 roles/krusader/docs/krusader.md delete mode 100644 roles/lidarr/docs/lidarr.md delete mode 100644 roles/mealie/docs/mealie.md delete mode 100644 roles/minecraft-server/docs/minecraft-server.md delete mode 100644 roles/minidlna/docs/minidlna.md delete mode 100644 roles/miniflux/docs/miniflux.md delete mode 100644 roles/mosquitto/docs/mosquitto.md delete mode 100644 roles/mylar/docs/mylar.md delete mode 100644 roles/mymediaforalexa/docs/mymediaforalexa.md delete mode 100644 roles/n8n/docs/n8n.md delete mode 100644 roles/navidrome/docs/navidrome.md delete mode 100644 roles/netbootxyz/docs/netbootxyz.md delete mode 100644 roles/netdata/docs/netdata.md delete mode 100644 roles/nextcloud/docs/nextcloud.md delete mode 100644 roles/nomad/docs/nomad.md delete mode 100644 roles/nzbget/docs/nzbget.md delete mode 100644 roles/octoprint/docs/octoprint.md delete mode 100644 roles/ombi/docs/ombi.md delete mode 100644 roles/openhab/docs/openhab.md delete mode 100644 roles/organizr/docs/organizr.md delete mode 100644 roles/overseerr/docs/overseerr.md delete mode 100644 roles/paperless_ng/docs/paperless_ng.md delete mode 100644 roles/piwigo/docs/piwigo.md delete mode 100644 roles/plex/docs/plex.md delete mode 100644 roles/portainer/docs/portainer.md delete mode 100644 roles/prowlarr/docs/prowlarr.md delete mode 100644 roles/pyload/docs/pyload.md delete mode 100644 roles/pytivo/docs/pytivo.md delete mode 100644 roles/radarr/docs/radarr.md delete mode 100644 roles/route53_ddns/docs/route53_ddns.md delete mode 100644 roles/rssbridge/docs/rssbridge.md delete mode 100644 roles/sabnzbd/docs/sabnzbd.md delete mode 100644 roles/sickchill/docs/sickchill.md delete mode 100644 roles/sonarr/docs/sonarr.md delete mode 100644 roles/speedtest-tracker/docs/speedtest.md delete mode 100644 roles/stats/docs/stats.md delete mode 100644 roles/syncthing/docs/syncthing.md delete mode 100644 roles/tautulli/docs/tautulli.md delete mode 100644 roles/thelounge/docs/thelounge.md delete mode 100644 roles/tiddlywiki/docs/tiddlywiki.md delete mode 100644 roles/timemachine/docs/timemachine.md delete mode 100644 roles/traefik/docs/traefik.md delete mode 100644 roles/transmission-with-openvpn/docs/transmission.md delete mode 100644 roles/transmission/docs/transmission.md delete mode 100644 roles/ubooquity/docs/ubooquity.md delete mode 100644 roles/utorrent/docs/utorrent.md delete mode 100644 roles/virtual_desktop/docs/virtual_desktop.md delete mode 100644 roles/wallabag/docs/wallabag.md delete mode 100644 roles/watchtower/docs/watchtower.md delete mode 100644 roles/wireshark/docs/wireshark.md delete mode 100644 roles/woodpecker-ci/docs/woodpecker_ci.md delete mode 100644 roles/youtubedlmaterial/docs/youtubedlmaterial.md delete mode 100644 roles/znc/docs/znc.md diff --git a/roles/freshrss/docs/freshrss.md b/roles/freshrss/docs/freshrss.md deleted file mode 100644 index d9cc30c9..00000000 --- a/roles/freshrss/docs/freshrss.md +++ /dev/null @@ -1,21 +0,0 @@ -# Freshrss - -Homepage: - -FreshRSS is a self-hosted RSS feed aggregator like Leed or Kriss Feed. - -It is lightweight, easy to work with, powerful, and customizable. - -It is a multi-user application with an anonymous reading mode. It supports custom tags. There is an API for (mobile) clients, and a Command-Line Interface. - -Thanks to the WebSub standard (formerly PubSubHubbub), FreshRSS is able to receive instant push notifications from compatible sources, such as Mastodon, Friendica, WordPress, Blogger, FeedBurner, etc. - -FreshRSS natively supports basic Web scraping, based on XPath, for Web sites not providing any RSS / Atom feed. - -Finally, it supports extensions for further tuning. - -## Usage - -Set `freshrss_enabled: true` in your `inventories//nas.yml` file. - -The FreshRSS web interface can be found at . diff --git a/roles/get_iplayer/docs/get_iplayer.md b/roles/get_iplayer/docs/get_iplayer.md deleted file mode 100644 index 48173c24..00000000 --- a/roles/get_iplayer/docs/get_iplayer.md +++ /dev/null @@ -1,11 +0,0 @@ -# Get_iPlayer - -Homepage: - -Downloads TV and radio programmes from BBC iPlayer. - -## Usage - -Set `get_iplayer_enabled: true` in your `inventories//nas.yml` file. - -The get_iplayer web interface can be found at . diff --git a/roles/gitea/docs/gitea.md b/roles/gitea/docs/gitea.md deleted file mode 100644 index ed2a2014..00000000 --- a/roles/gitea/docs/gitea.md +++ /dev/null @@ -1,11 +0,0 @@ -# Gitea - -Homepage: - -Gitea is a painless self-hosted Git service. - -## Usage - -Set `gitea_enabled: true` in your `inventories//nas.yml` file. - -The Gitea web interface can be found at . diff --git a/roles/gitlab/docs/gitlab.md b/roles/gitlab/docs/gitlab.md deleted file mode 100644 index f1b6873f..00000000 --- a/roles/gitlab/docs/gitlab.md +++ /dev/null @@ -1,13 +0,0 @@ -# GitLab - -Homepage: - -If Gitea isn't powerful enough for you then consider GitLab. It's a much more powerful (and consequently bigger) Git repository solution that includes a suite of code analytics. On the other hand it requires more RAM. - -## Usage - -Set `gitlab_enabled: true` in your `inventories//nas.yml` file. - -To make GitLab available externally via Traefik set `gitlab_available_externally: true` in your `inventories//nas.yml` file. - -The first time you run GitLab you'll be prompted for an account's password. The password is for GitLab's `root` administrator account. From there you can log in to create additional users and further configure the application. diff --git a/roles/glances/docs/glances.md b/roles/glances/docs/glances.md deleted file mode 100644 index 382a5490..00000000 --- a/roles/glances/docs/glances.md +++ /dev/null @@ -1,15 +0,0 @@ -# Glances - -Homepage: - -Glances is a cross-platform system monitoring tool written in Python. - -## Usage - -Set `glances_enabled: true` in your `inventories//nas.yml` file. - -The Glances web interface can be found at . - -## Specific Configuration - -Glances can be integrated with InfluxDB and Grafana. diff --git a/roles/gotify/docs/gotify.md b/roles/gotify/docs/gotify.md deleted file mode 100644 index a440b5df..00000000 --- a/roles/gotify/docs/gotify.md +++ /dev/null @@ -1,16 +0,0 @@ -# Gotify - -Homepage: - -A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui) - -## Usage - -Set `gotify_enabled: true` in your `inventories//nas.yml` file. - -The Gotify web interface can be found at . - -Android client: [https://play.google.com/store/apps/details?id=com.github.gotify](https://play.google.com/store/apps/details?id=com.github.gotify) -iOS client: n/a -Chrome extension: n/a -Firefox extension: diff --git a/roles/guacamole/docs/guacamole.md b/roles/guacamole/docs/guacamole.md deleted file mode 100644 index 11e022e3..00000000 --- a/roles/guacamole/docs/guacamole.md +++ /dev/null @@ -1,17 +0,0 @@ -# Guacamole - -Homepage: - -Apache Guacamole is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH. - -## Usage - -Set `guacamole_enabled: true` in your `inventories//nas.yml` file. - -## Specific Configuration - -The default username and password is `guacadmin`. Change it! - -## What to connect to? - -You can run a virtual desktop from your Ansible-NAS box, check out the [Virtual Desktop docs](virtual_desktop.md). diff --git a/roles/healthchecks.io/docs/healthchecks.io.md b/roles/healthchecks.io/docs/healthchecks.io.md deleted file mode 100644 index 3c9db8eb..00000000 --- a/roles/healthchecks.io/docs/healthchecks.io.md +++ /dev/null @@ -1,11 +0,0 @@ -# Healthchecks.io - -Homepage: - -A simple cronjob that uses `curl` to ping a given endpoint on the `healthchecks.io` servers. You can choose how often it should ping the endpoint, and what happens when it doesn't. Email/Slack/Telegram and many more services can be integrated. - -## Usage - -Create your own project on , and set both the time between pings and the grace time. Set your prefered integration such as email. - -Set `healthchecks_enabled: true` in your `inventories//nas.yml` file, and if your time between pings is different than the default `healthchecks_ping_minutes`, change it. Finally, set your ping url in the `healthchecks_url` variable. diff --git a/roles/heimdall/docs/heimdall.md b/roles/heimdall/docs/heimdall.md deleted file mode 100644 index ff2417dd..00000000 --- a/roles/heimdall/docs/heimdall.md +++ /dev/null @@ -1,15 +0,0 @@ -# Heimdall - -Homepage: - -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//nas.yml` file. - -The Heimdall web interface can be found at . - -## Specific Configuration - -Heimdall defaults to port 10080 - some browsers block this port. Override `heimdall_port_http` to move it somewhere else. diff --git a/roles/homeassistant/docs/homeassistant.md b/roles/homeassistant/docs/homeassistant.md deleted file mode 100644 index f7163cb2..00000000 --- a/roles/homeassistant/docs/homeassistant.md +++ /dev/null @@ -1,13 +0,0 @@ -# Home Assistant - -Homepage: - -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//nas.yml` file. - -If you want to access Home Assistant externally, don't forget to set `homeassistant_available_externally: true` in your `inventories//nas.yml` file. - -The Home Assistant web interface can be found at . diff --git a/roles/homebridge/docs/homebridge.md b/roles/homebridge/docs/homebridge.md deleted file mode 100644 index cbb9b329..00000000 --- a/roles/homebridge/docs/homebridge.md +++ /dev/null @@ -1,11 +0,0 @@ -# Homebridge - -Homepage: - -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//nas.yml` file. - -The Homebridge web interface can be found at . The default username and password is 'admin' - change this after your first login! diff --git a/roles/jackett/docs/jackett.md b/roles/jackett/docs/jackett.md deleted file mode 100644 index 919d8daa..00000000 --- a/roles/jackett/docs/jackett.md +++ /dev/null @@ -1,11 +0,0 @@ -# Jackett - -Homepage: - -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//nas.yml` file. - -The Jackett web interface can be found at . diff --git a/roles/jellyfin/docs/jellyfin.md b/roles/jellyfin/docs/jellyfin.md deleted file mode 100644 index dfe89533..00000000 --- a/roles/jellyfin/docs/jellyfin.md +++ /dev/null @@ -1,65 +0,0 @@ -# Jellyfin - -Homepage: - -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//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. diff --git a/roles/joomla/docs/joomla.md b/roles/joomla/docs/joomla.md deleted file mode 100644 index e0ad95a4..00000000 --- a/roles/joomla/docs/joomla.md +++ /dev/null @@ -1,23 +0,0 @@ -# Joomla - -Homepage: - -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//nas.yml` file. - -If you want to access Joomla externally, set `joomla_available_externally: true` in your `inventories//nas.yml` file. - -The Joomla web interface can be found at . - -## 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`. diff --git a/roles/komga/docs/komga.md b/roles/komga/docs/komga.md deleted file mode 100644 index 3c0b3c7d..00000000 --- a/roles/komga/docs/komga.md +++ /dev/null @@ -1,13 +0,0 @@ -# Komga - -Homepage: - -Docker Image: - -Komga is a media server for your comics, mangas, BDs and magazines. - -## Usage - -Set `komga_enabled: true` in your `inventories//nas.yml` file. - -Access the webui at by default. diff --git a/roles/krusader/docs/krusader.md b/roles/krusader/docs/krusader.md deleted file mode 100644 index fc020a10..00000000 --- a/roles/krusader/docs/krusader.md +++ /dev/null @@ -1,13 +0,0 @@ -# Krusader - -Homepage: - -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//nas.yml` file. - -The Krusader web interface can be found at . diff --git a/roles/lidarr/docs/lidarr.md b/roles/lidarr/docs/lidarr.md deleted file mode 100644 index 39564454..00000000 --- a/roles/lidarr/docs/lidarr.md +++ /dev/null @@ -1,9 +0,0 @@ -# Lidarr - -Homepage: - -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//nas.yml` file. diff --git a/roles/mealie/docs/mealie.md b/roles/mealie/docs/mealie.md deleted file mode 100644 index 6e6a1c26..00000000 --- a/roles/mealie/docs/mealie.md +++ /dev/null @@ -1,11 +0,0 @@ -# Mealie - -Homepage: - -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//nas.yml` file. - -The Mealie web interface can be found at . diff --git a/roles/minecraft-server/docs/minecraft-server.md b/roles/minecraft-server/docs/minecraft-server.md deleted file mode 100644 index e2ac52f8..00000000 --- a/roles/minecraft-server/docs/minecraft-server.md +++ /dev/null @@ -1,13 +0,0 @@ -# Minecraft Server - -Homepage: - -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//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. diff --git a/roles/minidlna/docs/minidlna.md b/roles/minidlna/docs/minidlna.md deleted file mode 100644 index 1f030d3d..00000000 --- a/roles/minidlna/docs/minidlna.md +++ /dev/null @@ -1,11 +0,0 @@ -# MiniDLNA - -Homepage: - -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//nas.yml` file. - -The very basic MiniDLNA web interface can be found at . diff --git a/roles/miniflux/docs/miniflux.md b/roles/miniflux/docs/miniflux.md deleted file mode 100644 index 92890158..00000000 --- a/roles/miniflux/docs/miniflux.md +++ /dev/null @@ -1,15 +0,0 @@ -# Miniflux - -Homepage: - -Miniflux is a minimalist and opinionated feed reader. - -## Usage - -Set `miniflux_enabled: true` in your `inventories//nas.yml` file. - -The Miniflux web interface can be found at , 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`. diff --git a/roles/mosquitto/docs/mosquitto.md b/roles/mosquitto/docs/mosquitto.md deleted file mode 100644 index 4015613e..00000000 --- a/roles/mosquitto/docs/mosquitto.md +++ /dev/null @@ -1,9 +0,0 @@ -# Mosquitto - -Homepage: - -Mosquitto is a lightweight open source MQTT message broker. - -## Usage - -Set `mosquitto_enabled: true` in your `inventories//nas.yml` file. diff --git a/roles/mylar/docs/mylar.md b/roles/mylar/docs/mylar.md deleted file mode 100644 index 0ddf2e91..00000000 --- a/roles/mylar/docs/mylar.md +++ /dev/null @@ -1,15 +0,0 @@ -# Mylar - -Homepage: - -Docker Container: - -An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents - -## Usage - -Set `mylar_enabled: true` in your `inventories//nas.yml` file. - -If you want to access Mylar externally, don't forget to set `mylar_available_externally: true` in your `inventories//nas.yml` file. - -The Mylar web interface can be found at . diff --git a/roles/mymediaforalexa/docs/mymediaforalexa.md b/roles/mymediaforalexa/docs/mymediaforalexa.md deleted file mode 100644 index 174f19d7..00000000 --- a/roles/mymediaforalexa/docs/mymediaforalexa.md +++ /dev/null @@ -1,11 +0,0 @@ -# My Media for Alexa - -Homepage: - -My Media lets you stream your music collection to your Amazon Echo or Amazon Dot without having to upload all your music collection to the Cloud. This keeps your music under your control. - -## Usage - -Set `mymediaforalexa_enabled: true` in your `inventories//nas.yml` file. - -The My Media for Alexa web interface can be found at . diff --git a/roles/n8n/docs/n8n.md b/roles/n8n/docs/n8n.md deleted file mode 100644 index 5f531246..00000000 --- a/roles/n8n/docs/n8n.md +++ /dev/null @@ -1,18 +0,0 @@ -# Nodemation (n8n) - -Homepage: - -Extendable workflow automation tool that enables you to connect anything to everything. More pragrmatically, it helps you interconnect API with each other to build your own information / work flows. - -## Usage - -Set `n8n_enabled: true` in your `inventories//nas.yml` file. - -n8n is secured by default, he user and password can be set with: - -```yaml - n8n_basic_auth_user: "" - n8n_basic_auth_password: "" -``` - -The default for these is "n8n_user" and "n8n_change_me" respectively, it is recommended to change these. diff --git a/roles/navidrome/docs/navidrome.md b/roles/navidrome/docs/navidrome.md deleted file mode 100644 index bd8bb180..00000000 --- a/roles/navidrome/docs/navidrome.md +++ /dev/null @@ -1,11 +0,0 @@ -# Navidrome - -Homepage: - -Navidrome is an open source web-based music collection server and streamer that is compatible with Subsonic/Airsonic. It gives you freedom to listen to your music collection from any browser or mobile device. It's like your personal Spotify! - -## Usage - -Set `navidrome_enabled: true` in your `inventories//nas.yml` file. - -The Navidrome web interface can be found at . diff --git a/roles/netbootxyz/docs/netbootxyz.md b/roles/netbootxyz/docs/netbootxyz.md deleted file mode 100644 index cff9c1d4..00000000 --- a/roles/netbootxyz/docs/netbootxyz.md +++ /dev/null @@ -1,15 +0,0 @@ -# netboot.xyz - -Homepage: - -Docker Container: - -netboot.xyz is a way to PXE boot various operating system installers or utilities from one place within the BIOS without the need of having to go retrieve the media to run the tool. [iPXE](https://ipxe.org/) is used to provide a user friendly menu from within the BIOS that lets you easily choose the operating system you want along with any specific types of versions or bootable flags. - -You can remote attach the ISO to servers, set it up as a rescue option in Grub, or even set up your home network to boot to it by default so that it's always available. - -## Usage - -Set `netbootxyz_enabled: true` in your `inventories//nas.yml` file. - -The netbooxyz web interface can be found at . diff --git a/roles/netdata/docs/netdata.md b/roles/netdata/docs/netdata.md deleted file mode 100644 index e8ef6884..00000000 --- a/roles/netdata/docs/netdata.md +++ /dev/null @@ -1,11 +0,0 @@ -# Netdata - -Homepage: - -An extremely comprehensive system monitoring solution. - -## Usage - -Set `netdata_enabled: true` in your `inventories//nas.yml` file. - -Netdata web interface can be found at . diff --git a/roles/nextcloud/docs/nextcloud.md b/roles/nextcloud/docs/nextcloud.md deleted file mode 100644 index 842839af..00000000 --- a/roles/nextcloud/docs/nextcloud.md +++ /dev/null @@ -1,25 +0,0 @@ -# Nextcloud - -Homepage: - -## Usage - -Set `nextcloud_enabled: true` in your `inventories//nas.yml` file. - -Tread carefully. - -External access may require that you manually configure your Fully Qualified Domain Name (FQDN) as a trusted domain within the application. There is an environment variable set up for this in the "nextcloud task" which will most likely make manual configuration unnecessary. If you get the following [screenshot](https://docs.nextcloud.com/server/14/admin_manual/installation/installation_wizard.html#trusted-domains) warning when trying to access nextcloud externally you'll need to manually set it up. - -This can be accomplished in two commands. - -```bash -# On the server where the docker containers are running -$ docker exec -it --user www-data nextcloud /bin/bash -$ php occ config:system:set trusted_domains INDEX_FOR_NEW_ENTRY_SEE_DOCS_LINK_BELOW --value=YOUR_FQDN_HERE --update-only -``` - -The above commands are documented in the administration guide for Nextcloud: - -* [set array values](https://docs.nextcloud.com/server/14/admin_manual/configuration_server/occ_command.html#setting-an-array-configuration-value) - -* [docker container docs, references environment variables](https://github.com/nextcloud/docker) diff --git a/roles/nomad/docs/nomad.md b/roles/nomad/docs/nomad.md deleted file mode 100644 index 17e9569b..00000000 --- a/roles/nomad/docs/nomad.md +++ /dev/null @@ -1,11 +0,0 @@ -# Nomad - -Homepage: - -A simple and flexible scheduler and orchestrator to deploy and manage containers and non-containerised applications across on-prem and clouds at scale. - -## Usage - -Set `nomad_enabled: true` in your `inventories//nas.yml` file. - -Nomad's web interface can be found at diff --git a/roles/nzbget/docs/nzbget.md b/roles/nzbget/docs/nzbget.md deleted file mode 100644 index a0d82adc..00000000 --- a/roles/nzbget/docs/nzbget.md +++ /dev/null @@ -1,11 +0,0 @@ -# NZBGet - -Homepage: - -The most efficient Usenet downloader. NZBGet is written in C++ and designed with performance in mind to achieve maximum download speed by using very little system resources. - -## Usage - -Set `nzbget_enabled: true` in your `inventories//nas.yml` file. - -The NZBget web interface can be found at , the default username is `nzbget` and password `tegbzn6789`. Change this once you've logged in! diff --git a/roles/octoprint/docs/octoprint.md b/roles/octoprint/docs/octoprint.md deleted file mode 100644 index 75450645..00000000 --- a/roles/octoprint/docs/octoprint.md +++ /dev/null @@ -1,11 +0,0 @@ -# Octoprint - -Homepage: - -Octoprint is a control and monitoring application for your 3D printer. You can start and stop print jobs, view your webcam feed, move the print head and extruder manually and check your gcode files, all from a single web interface. Octoprint doesn't require modifications on the printer firmware, just make sure your NAS is phisically connected to it with a usb cable. - -## Usage - -Connect the printer to your NAS, and take note of where the serial interface is mounted (usually it's automounted in `/dev/ttyUSB0`). Set `octoprint_enabled: true` in your `inventories//nas.yml` file, as well as the `octoprint_printer_mountpoint` variable if your printer doesn't mount to the default location. - -If you want to also have a webcam feed, attach one to your NAS and take note of its mountpoint as well (usually `/dev/video0`). Set `octoprint_enable_webcam: true` and add a `octoprint_webcam_mountpoint` variable if the webcam doesn't mount to the default location. diff --git a/roles/ombi/docs/ombi.md b/roles/ombi/docs/ombi.md deleted file mode 100644 index e4ba8884..00000000 --- a/roles/ombi/docs/ombi.md +++ /dev/null @@ -1,9 +0,0 @@ -# Ombi - -Homepage: - -Ombi is a self-hosted web application that automatically gives your shared Plex or Emby users the ability to request content by themselves! Ombi can be linked to multiple TV Show and Movie DVR tools to create a seamless end-to-end experience for your users. - -## Usage - -Set `ombi_enabled: true` in your `inventories//nas.yml` file. diff --git a/roles/openhab/docs/openhab.md b/roles/openhab/docs/openhab.md deleted file mode 100644 index 2ea46ddf..00000000 --- a/roles/openhab/docs/openhab.md +++ /dev/null @@ -1,15 +0,0 @@ -# openHAB - -Homepage: - -OpenHab is a vendor and technology agnostic open source automation software for your home. -It allows you to connect many different IoT-Devices (which in this case means "Intranet of Things") using custom bindings made by the community. - -## Usage - -Set `openhab_enabled: true` in your `inventories//nas.yml` file. - -## Specific Configuration - -The openHAB Webinterface is available at port 7777 (HTTP) and 7778 (HTTPS). -Visit the webinterface and follow the setup instructions found in the [openHAB Documentation](https://www.openhab.org/docs/tutorial/1sttimesetup.html) diff --git a/roles/organizr/docs/organizr.md b/roles/organizr/docs/organizr.md deleted file mode 100644 index df1b293f..00000000 --- a/roles/organizr/docs/organizr.md +++ /dev/null @@ -1,15 +0,0 @@ -# Organizr - -Homepage: - -ORGANIZR aims to be your one stop shop for your Servers Frontend. - -Do you have quite a bit of services running on your computer or server? Do you have a lot of bookmarks or have to memor$ - -TODO: finish this truncated description - -## Usage - -Set `organizr_enabled: true` in your `inventories//nas.yml` file. - -The Organizr web interface can be found at . diff --git a/roles/overseerr/docs/overseerr.md b/roles/overseerr/docs/overseerr.md deleted file mode 100644 index 8a017edb..00000000 --- a/roles/overseerr/docs/overseerr.md +++ /dev/null @@ -1,13 +0,0 @@ -# Overseerr - - Homepage: - - Docker Container: - - Overseerr is a free and open source software application for managing requests for your media library. It integrates with your existing services, such as Sonarr, Radarr, and Plex! - -## Usage - - Using overseerr: Set `overseerr_enabled: true` in your `inventories//nas.yml` file. - - The overseerr web interface can be found at . diff --git a/roles/paperless_ng/docs/paperless_ng.md b/roles/paperless_ng/docs/paperless_ng.md deleted file mode 100644 index 5adabc31..00000000 --- a/roles/paperless_ng/docs/paperless_ng.md +++ /dev/null @@ -1,23 +0,0 @@ -# Paperless-ng - -Homepage: - -Paperless is an application by Daniel Quinn and contributors that indexes your scanned documents and allows you to easily search for documents and store metadata alongside your documents. - -Paperless-ng is a fork of the original project, adding a new interface and many other changes under the hood - -## Usage - -Set `paperless_ng_enabled: true` in your `inventories//nas.yml` file. - -The paperless-ng web interface can be found at . - -### Create the superuser - -To be able to login, you will need a super user. To create it, execute the following command: - -```bash -docker exec -it paperless_ng_uiserver python manage.py createsuperuser -``` - -This will prompt you to set a username, an optional e-mail address and finally a password (at least 8 characters). diff --git a/roles/piwigo/docs/piwigo.md b/roles/piwigo/docs/piwigo.md deleted file mode 100644 index f691ba27..00000000 --- a/roles/piwigo/docs/piwigo.md +++ /dev/null @@ -1,28 +0,0 @@ -# Piwigo - -Homepage: [Piwigo.org](https://piwigo.org) - -Piwigo is open source photo gallery software for the web. Designed for organisations, teams and individuals. - -## Usage - -Set `piwigo_enabled: true` in your `inventories//nas.yml` file. - -If you want to access Piwigo externally, set `piwigo_available_externally: true` in your `inventories//nas.yml` file. - -The Piwigo web interface can be found at . - -## Specific Configuration - -Optional configurations: - -- Set `piwigo_mysql_user` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". -- Set `piwigo_mysql_password` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". -- Set `piwigo_mysql_root_password` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". - -- On first run you'll need to enter database details: - - Host: `db:3306` - - Username: the value of piwigo_mysql_user, defaults to "piwigo" - - Password: the value of piwigo_password, defaults to "piwigo" - - Database Name: `piwigo` - - Database tables prefix: should be prefilled with `piwigo_` diff --git a/roles/plex/docs/plex.md b/roles/plex/docs/plex.md deleted file mode 100644 index be9a37e0..00000000 --- a/roles/plex/docs/plex.md +++ /dev/null @@ -1,16 +0,0 @@ -# Plex - -Homepage: - -Plex is a personal media server that also provides access to several external movie, web show, and podcast services. Allows you to stream music too. Apps for many devices, including e.g. chromecast integration. - -## Usage - -Set `plex_enabled: true` in your `inventories//nas.yml` file. - -The Plex web interface can be found at . - -## Specific Configuration - -You'll need to log in with a plex account, (or possibly claim your server). -You'll need to set up your local file store - go to settings > Manage > Libraries, and add your libraries. These are mounted in the root directory by default. diff --git a/roles/portainer/docs/portainer.md b/roles/portainer/docs/portainer.md deleted file mode 100644 index d9d9fe77..00000000 --- a/roles/portainer/docs/portainer.md +++ /dev/null @@ -1,9 +0,0 @@ -# Portainer - -Homepage: - -## Usage - -Set `portainer_enabled: true` in your `inventories//nas.yml` file. - -The Portainer web interface can be found at . diff --git a/roles/prowlarr/docs/prowlarr.md b/roles/prowlarr/docs/prowlarr.md deleted file mode 100644 index 1d5e871e..00000000 --- a/roles/prowlarr/docs/prowlarr.md +++ /dev/null @@ -1,15 +0,0 @@ -# Prowlarr" - -Homepages: [prowlarr](https://github.com/Prowlarr/Prowlarr) - -**Prowlarr** is a indexer manager/proxy built on the popular arr .net/reactjs base stack to integrate with your various PVR apps. Prowlarr supports both Torrent Trackers and Usenet Indexers. It integrates seamlessly with Sonarr, Radarr, Lidarr, and Readarr offering complete management of your indexers with no per app Indexer setup required (we do it all). - -## Usage - -Set `prowlarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. - -The Prowlarr web interface can be found at `http://ansible_nas_host_or_ip:9696` by default - -## Specific Configuration - -For comprehensive configuration instructions see the [Prowlarr wiki](https://wiki.servarr.com/prowlarr) or [Prowlarr Github page](https://github.com/Prowlarr/Prowlarr) diff --git a/roles/pyload/docs/pyload.md b/roles/pyload/docs/pyload.md deleted file mode 100644 index 5d0911c5..00000000 --- a/roles/pyload/docs/pyload.md +++ /dev/null @@ -1,16 +0,0 @@ -# pyLoad - -Homepage: [https://pyload.net/](https://pyload.net/) - -Free and Open Source download manager written in Python and designed to be extremely lightweight, easily extensible and fully manageable via web. - -## Usage - -Set `pyload_enabled: true` in your `inventories//nas.yml` file. - -pyLoad's web interface can be found at . - -## Specific Configuration - -Default username is `pyload` and default password is `pyload` -In order to add or remove users, you will need to access the container from an interactive shell (can easily be done from portainer, if installed) and enter pyLoad's home directory `/opt/pyload` and using the command `python pyLoadCore.py -u` and follow the on-screen prompts. More commands to configure and customize pyLoad can be found on it's website. diff --git a/roles/pytivo/docs/pytivo.md b/roles/pytivo/docs/pytivo.md deleted file mode 100644 index fda6fa9c..00000000 --- a/roles/pytivo/docs/pytivo.md +++ /dev/null @@ -1,30 +0,0 @@ -# PyTivo - -Project Homepage: - - -Docker Homepage: - - -PyTivo is both an HMO and GoBack server. Similar to TiVo Desktop pyTivo -loads many standard video compression codecs and outputs mpeg2 video to -the TiVo. However, pyTivo is able to load MANY more file types than TiVo -Desktop. - -## Usage - -Set `pytivo_enabled: true` in your `group_vars/all.yml` file. The PyTivo -web interface can be found at . - -## Specific Configuration - -PyTivo needs to be configured for use. Your ansible-nas media is -available to share via: - -* /movies - Where your movies are stored -* /music - Where your music is stored -* /photos - Where your photos are stored -* /podcasts - Where your podcasts are stored -* /tv - Where your TV episodes are stored - -Configuration help for PyTivo settings can be found at [Configure_pyTivo](https://pytivo.sourceforge.io/wiki/index.php/Configure_pyTivo). diff --git a/roles/radarr/docs/radarr.md b/roles/radarr/docs/radarr.md deleted file mode 100644 index 141bbebb..00000000 --- a/roles/radarr/docs/radarr.md +++ /dev/null @@ -1,22 +0,0 @@ -# Radarr - -Homepage: [radarr](https://radarr.video/) - -**Radarr** is an independent fork of Sonarr reworked for automatically downloading movies via Usenet and BitTorrent. - -## Usage - -Set `radarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. - -The Radarr web interface can be found at `http://ansible_nas_host_or_ip:7878` by default - -## Specific Configuration - -**First make sure Radarr has permissions to write and read the `/download`, and `/movies` folders**. Do this by ensuring the `radarr_movies_directory:` and `radarr_download_directory` settings are correct. - -Radarr will get the file path from the Download client. On default settings with Transmission the path is `/storage/downloads/complete`. You will need to create a path mapping in the **Remote Path Mappings** settings under **Download Client** to point to your internal path that is by default `/downloads`. *If you have difficulties with the path mapping you could also just add a new volume path for the Transmission container and use `/downloads` as the download directory.* - -For Radarr to understand that the `/movies` folder is a folder, you'll need to add a new subfolder into it. -You can also do this by adding a random movie to the folder. Keep in mind to have the internal setting **Create empty movie folders** on **yes** - -Comprehensive setup information can be found on the [Radarr GitHub wiki](https://github.com/Radarr/Radarr/wiki/Setup-Guide) diff --git a/roles/route53_ddns/docs/route53_ddns.md b/roles/route53_ddns/docs/route53_ddns.md deleted file mode 100644 index c0b261d4..00000000 --- a/roles/route53_ddns/docs/route53_ddns.md +++ /dev/null @@ -1,40 +0,0 @@ -# AWS Route53 Dynamic DNS Updater - -ddns-route53: - -AWS Route53: - -If you want your Ansible-NAS accessible externally then you need a domain name. You will also need to set a wildcard host `A` record to point to your static IP, or enable this container to automatically update AWS Route53 with your dynamic IP address. - -## Usage - -Set `route53_ddns_enabled: true` in your `inventories//nas.yml` file. - -Set required AWS access credentials from the AWS Console. (See below.) - -## Specific Configuration - -Make sure you set your domain (if different than the `ansible-nas` default) and access details within your `inventories//nas.yml` file. - -To set up Route53 to work with the service, please review the [Prerequisites](https://crazymax.dev/ddns-route53/usage/prerequisites/) page. In short, you will need to set up a Route53 [Hosted Zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html), an [IAM Policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html), and an [IAM User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html) with API credentials. - -### AWS Access Credentials - -| Parameter | Description | Status | -|--------------------|-------------------|-----------| -| route53_key_id | AWS access key ID | mandatory | -| route53_secret_key | AWS secret key | mandatory | - -### Networking - -| Parameter | Description | Status | -|------------------------|--------------------------------|-----------| -| route53_hosted_zone_id | Route53 hosted zone ID | mandatory | -| route53_ttl | Time-to-live for the DNS entry | | -| route53_host | Wildcard domain to update | | - -### Application - -| Parameter | Description | Status | -|------------------|-----------------------------------------------------|-----------| -| route53_schedule | [CRON](https://pkg.go.dev/github.com/robfig/cron?utm_source=godoc#hdr-CRON_Expression_Format) schedule for checking and updating DNS entry | | diff --git a/roles/rssbridge/docs/rssbridge.md b/roles/rssbridge/docs/rssbridge.md deleted file mode 100644 index 517e5bef..00000000 --- a/roles/rssbridge/docs/rssbridge.md +++ /dev/null @@ -1,13 +0,0 @@ -# RSS-Bridge - -Homepage: - -RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one. It can be used on webservers or as a stand-alone application in CLI mode. - -Important: RSS-Bridge is not a feed reader or feed aggregator, but a tool to generate feeds that are consumed by feed readers and feed aggregators. - -## Usage - -Set `rssbridge_enabled: true` in your `inventories//nas.yml` file. - -The RSS-Bridge web interface can be found at . diff --git a/roles/sabnzbd/docs/sabnzbd.md b/roles/sabnzbd/docs/sabnzbd.md deleted file mode 100644 index a4ed13d1..00000000 --- a/roles/sabnzbd/docs/sabnzbd.md +++ /dev/null @@ -1,11 +0,0 @@ -# Sabnzbd - -Homepage: - -The time tested Usenet downloader provided with FreeNAS. It just works for those migrating from FreeNAS. - -## Usage - -Set `sabnzbd_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. - -The Sabnzbd web interface can be found at . Use this interface to configure the software upon first connection. diff --git a/roles/sickchill/docs/sickchill.md b/roles/sickchill/docs/sickchill.md deleted file mode 100644 index 8fe2b75a..00000000 --- a/roles/sickchill/docs/sickchill.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sickchill - -Homepage: [Sickchill](https://sickchill.github.io/) - -SickChill is an automatic Video Library Manager for TV Shows. -It watches for new episodes of your favorite shows, and when they are posted it does its magic: automatic torrent/nzb searching, downloading, and processing at the qualities you want. - -## Usage - -Set `sickchill_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. - -The sickchill web interface can be found at `http://ansible_nas_host_or_ip:8081` by default diff --git a/roles/sonarr/docs/sonarr.md b/roles/sonarr/docs/sonarr.md deleted file mode 100644 index f856f75a..00000000 --- a/roles/sonarr/docs/sonarr.md +++ /dev/null @@ -1,22 +0,0 @@ -# Sonarr - -Homepage: - -**Sonarr** is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows 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 `sonarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. - -The Sonarr web interface can be found at `http://ansible_nas_host_or_ip:8989` by default - -## Specific Configuration - -**First make sure Sonarr has permissions to write and read the `/download` and `/tv` folders**. Do this by ensuring the `sonarr_movies_directory:` and `sonarr_download_directory` settings are correct. - -Sonarr will get the file path from the Download client. On default settings with Transmission the path is `/storage/downloads/complete`. You will need to create a path mapping in the **Remote Path Mappings** settings under **Download Client** to point to your internal path that is by default `/downloads`. *If you have difficulties with the path mapping you could also just add a new volume path for the Transmission container and use `/downloads` as the download directory.* - -For Sonarr to understand that the `/tv` folder is a folder, you'll need to add a folder into it. -You can also do this by adding a random series to the folder. Keep in mind to have the setting **Create empty movie folders** on **yes** - -For comprehensive configuration instructions see the [Sonarr GitHub wiki](https://github.com/Sonarr/Sonarr/wiki) diff --git a/roles/speedtest-tracker/docs/speedtest.md b/roles/speedtest-tracker/docs/speedtest.md deleted file mode 100644 index e88eb51f..00000000 --- a/roles/speedtest-tracker/docs/speedtest.md +++ /dev/null @@ -1,15 +0,0 @@ -# Speedtest-Tracker - -Homepage: - -Docker Container: - -Continuously track your internet speed - -## Usage - -Set `speedtest_tracker_enabled: true` in your `inventories//nas.yml` file. - -If you want to access Speedtest-Tracker externally, don't forget to set `speedtest_tracker_available_externally: true` in your `inventories//nas.yml` file. - -The Speedtest-Tracker interface can be found at . diff --git a/roles/stats/docs/stats.md b/roles/stats/docs/stats.md deleted file mode 100644 index 25620959..00000000 --- a/roles/stats/docs/stats.md +++ /dev/null @@ -1,13 +0,0 @@ -# Stats - -The stats role uses Prometheus, Grafana, Telegraf and a number of metrics exporters to collect and record lots of metrics about your NAS. - -Telegraf also exposes an InfluxDB endpoint for applications that require it. - -## Usage - -Set `stats_enabled: true` in your `inventories//nas.yml` file. If you want to gather metrics on your internet connection, enable `stats_internet_speed_test_enabled` too. - -If you want to access Grafana externally, set `stats_grafana_available_externally: true` in your `inventories//nas.yml` file. If you want to access Promethehus externally, set `stats_prometheus_available_externally: true` in your `inventories//nas.yml` file. - -The Grafana web interface can be found at , Prometheus can be found at diff --git a/roles/syncthing/docs/syncthing.md b/roles/syncthing/docs/syncthing.md deleted file mode 100644 index 27d0ad9e..00000000 --- a/roles/syncthing/docs/syncthing.md +++ /dev/null @@ -1,27 +0,0 @@ -# Syncthing - -Homepage: - -Github: - -Docker: - -Syncthing is a continuous file synchronization program. It synchronizes files -between two or more computers. It strives to fulfill the goals below in summary. -Syncthing should be: - -1. Safe From Data Loss -2. Secure Against Attackers -3. Easy to Use -4. Automatic -5. Universally Available -6. For Individuals -7. For eveything else see the goals document - -## Usage - -Set `syncthing_enabled: true` in your `\inventories\[my inventory]\group_vars\nas.yml` file. - -## Specific Configuration - -Open the web interface at :8384 to configure. diff --git a/roles/tautulli/docs/tautulli.md b/roles/tautulli/docs/tautulli.md deleted file mode 100644 index 3f1ce59f..00000000 --- a/roles/tautulli/docs/tautulli.md +++ /dev/null @@ -1,11 +0,0 @@ -# Tautulli - -Homepage: - -Tautulli allows you to monitor your Plex Media Server. - -## Usage - -Set `tautulli_enabled: true` in your `inventories//nas.yml` file. - -The Tautulli web interface can be found at . diff --git a/roles/thelounge/docs/thelounge.md b/roles/thelounge/docs/thelounge.md deleted file mode 100644 index 1b15ea70..00000000 --- a/roles/thelounge/docs/thelounge.md +++ /dev/null @@ -1,15 +0,0 @@ -# The Lounge" - -Homepage: - -The Lounge is a self-hosted web IRC client. - -## Usage - -Set `thelounge_enabled: true` in your `inventories//nas.yml` file. - -The Lounge web interface can be found at . - -## Specific Configuration - -The default username and password is `admin`. Change this once you've logged in! diff --git a/roles/tiddlywiki/docs/tiddlywiki.md b/roles/tiddlywiki/docs/tiddlywiki.md deleted file mode 100644 index cb161d5d..00000000 --- a/roles/tiddlywiki/docs/tiddlywiki.md +++ /dev/null @@ -1,34 +0,0 @@ -# TiddlyWiki - -Homepage: - -TiddlyWiki is a unique non-linear notebook for capturing, organizing, and sharing complex information. Use it to keep your to-do list, to plan an essay or novel, or to organise your wedding. Record every thought that crosses your brain, or build a flexible and responsive website. Unlike conventional online services, TiddlyWiki lets you choose where to keep your data, guaranteeing that in the decades to come you will still be able to use the notes you take today. - -## Usage - -Set `tiddlywiki_enabled: true` in your `inventories//nas.yml` file. - -If you want to access TiddlyWiki externally, set `tiddlywiki_available_externally: true` in your `inventories//nas.yml` file. - -The TiddlyWiki web interface can be found at . - -## Specific Configuration - -The TiddlyWiki role has several configuration parameters. All parameters are optional. - -### Data and Networking - -| Parameter | Description | -|---------------------------|-------------------------------| -| tiddlywiki_data_directory | Host location to store data | -| tiddlywiki_port | Host port for internal access | -| tiddlywiki_hostname | Subdomain for external access | - -### Server Configuration - -| Parameter | Description | -|------------------------|--------------------------| -| tiddlywiki_username | Basic Auth username | -| tiddlywiki_password | Basic Auth password | -| tiddlywiki_node_memory | NodeJS memory allocation | -| tiddlywiki_debug_level | Service debugging | diff --git a/roles/timemachine/docs/timemachine.md b/roles/timemachine/docs/timemachine.md deleted file mode 100644 index 37c2cbc7..00000000 --- a/roles/timemachine/docs/timemachine.md +++ /dev/null @@ -1,28 +0,0 @@ -# Time Machine - -Apple docs: - -Docker image: - -Time Machine is an application that allows you to backup files from your Mac. - -Older versions of Time Machine relied on AFP (netatalk) shares. Apple has deprecated Time Machine over AFP in favor of SMB (Samba), and current versions of Ansible-NAS use a Samba-based Time Machine share. If you are upgrading from an older version of Ansible-NAS, you will need to re-select your Time Machine back up disk by opening Time Machine Preferences and Selecting your backup disk via the "Select Disk..." option. Your Mac will find the old backups on the share and use them. - -## Usage - -Set `timemachine_enabled: true` in your `inventories//nas.yml` file. - -Enabling Time Machine will result in the installation of Avahi on the NAS system (if it is not already installed) and a Time Machine service configuration file for Avahi will be added to the system (at `/etc/avahi/services/timemachine.service`) to allow for Time Machine discovery by Macs on the local network. Avahi runs on the system, rather than in a container, as the same Avahi instance can be used to announce any number of services. - -The Samba server included in the Time Machine docker container logs to `STDOUT` and is compatible with [Docker's built-in logging infrastructure.](https://docs.docker.com/config/containers/logging/) - -## Specific Configuration - -- `timemachine_data_directory`: The absolute path on Ansible NAS where the backup files will be stored -- `timemachine_volume_size_limit`: The maximum amount of space Time Machine can use for the backups in units of MiB. Set it to 0 for no limit. -- `timemachine_share_name`: The name of the share as it will appear in the Time Machine application. Default is 'Data' -- `timemachine_password`: The password used to access the share. Default is 'timemachine' - -## Upgrading from AFP to SMB-based Time Machine - -Older versions of Time Machine included in Ansible-NAS relied on AFP (netatalk) shares. Apple has deprecated Time Machine over AFP in favor of SMB (Samba), and current versions of Ansible-NAS use a Samba-based Time Machine share. If you are upgrading from an older version of Ansible-NAS with the AFP-based Time Machine, you will need to re-select your Time Machine back up disk by opening Time Machine Preferences and Selecting your backup disk via the "Select Disk..." option. Your Mac will find the old backups on the share and use them. diff --git a/roles/traefik/docs/traefik.md b/roles/traefik/docs/traefik.md deleted file mode 100644 index 8b552f28..00000000 --- a/roles/traefik/docs/traefik.md +++ /dev/null @@ -1,20 +0,0 @@ -# Traefik - -Homepage: - -Traefik is a reverse proxy used to provide external access to your Ansible-NAS box. Additionally, Traefik will automatically request and renew SSL certificates for you. - -You can configure which applications are available externally by enabling the `_available_externally` setting -for each application in the Advanced Settings section of your `all.yml`. - -See [External Access](../../getting-started/external-access.md) for more info. - -## Usage - -Set `traefik_enabled: true` in your `inventories//nas.yml` file. - -Traefik's web interface can be found at . - -## Specific Configuration - -You'll need to map port 80 and 443 from your router to your Ansible-NAS box. A quick search should reveal instruction for your model of router. diff --git a/roles/transmission-with-openvpn/docs/transmission.md b/roles/transmission-with-openvpn/docs/transmission.md deleted file mode 100644 index 456e741d..00000000 --- a/roles/transmission-with-openvpn/docs/transmission.md +++ /dev/null @@ -1,25 +0,0 @@ -# Transmission - -Homepage: - -Transmission is a free BitTorrent client. Two versions are provided - one that tunnels through OpenVPN and one that connects -directly. - -## Usage - -Set `transmission_enabled: true`, or `transmission_with_openvpn_enabled: true` in your `inventories//nas.yml` file. - -Transmission's web interface can be found at (with OpenVPN) or (without OpenVPN). - -## Specific Configuration - -If you enable Transmission with OpenVPN, you'll need to add the following to your inventory `all.yml`: - -```yaml -openvpn_username: super_secret_username -openvpn_password: super_secret_password -openvpn_provider: NORDVPN -openvpn_config: uk686.nordvpn.com.udp -``` - -See for supported VPN providers. diff --git a/roles/transmission/docs/transmission.md b/roles/transmission/docs/transmission.md deleted file mode 100644 index 456e741d..00000000 --- a/roles/transmission/docs/transmission.md +++ /dev/null @@ -1,25 +0,0 @@ -# Transmission - -Homepage: - -Transmission is a free BitTorrent client. Two versions are provided - one that tunnels through OpenVPN and one that connects -directly. - -## Usage - -Set `transmission_enabled: true`, or `transmission_with_openvpn_enabled: true` in your `inventories//nas.yml` file. - -Transmission's web interface can be found at (with OpenVPN) or (without OpenVPN). - -## Specific Configuration - -If you enable Transmission with OpenVPN, you'll need to add the following to your inventory `all.yml`: - -```yaml -openvpn_username: super_secret_username -openvpn_password: super_secret_password -openvpn_provider: NORDVPN -openvpn_config: uk686.nordvpn.com.udp -``` - -See for supported VPN providers. diff --git a/roles/ubooquity/docs/ubooquity.md b/roles/ubooquity/docs/ubooquity.md deleted file mode 100644 index 24397c09..00000000 --- a/roles/ubooquity/docs/ubooquity.md +++ /dev/null @@ -1,25 +0,0 @@ -# Ubooquity - -Homepage: - -Documentation: - -Docker Image: - -Ubooquity is a free, lightweight and easy-to-use home server for your comics and ebooks. Use it to access your files from anywhere, with a tablet, an e-reader, a phone or a computer. - -## Usage - -Set `ubooquity_enabled: true` in your `inventories//nas.yml` file. - -Access the webui at by default. See specific configuration section below for information on setting up external access. - -## Specific Configuration - -Important note: if you want to access Ubooquity externally through Traefik (at ubooquity.yourdomain.tld), you need to go to and set the reverse proxy prefix to blank under "Advanced". Otherwise you will need to append "/ubooquity" to the url in order to access. - -### Admin login - -The admin portal is not exposed through Traefik. You can access the admin portal on port 2203. - -Upon your first run, the address is . You will be able to set the admin password here. diff --git a/roles/utorrent/docs/utorrent.md b/roles/utorrent/docs/utorrent.md deleted file mode 100644 index 18845365..00000000 --- a/roles/utorrent/docs/utorrent.md +++ /dev/null @@ -1,15 +0,0 @@ -# uTorrent - -Homepage: -Docker Container: - -## Usage - -Set `utorrent_enabled: true` in your `inventories//nas.yml` file. - -If you want to access uTorrent externally, don't forget to set `utorrent_available_externally: true` in your `inventories//nas.yml` file. - -The uTorrent web interface can be found at : - -- Username: admin -- Password: *leave blank* diff --git a/roles/virtual_desktop/docs/virtual_desktop.md b/roles/virtual_desktop/docs/virtual_desktop.md deleted file mode 100644 index 0b84170d..00000000 --- a/roles/virtual_desktop/docs/virtual_desktop.md +++ /dev/null @@ -1,30 +0,0 @@ -# Virtual Desktop - -It's possible to run a cut down desktop within a Docker container. We use [RattyDAVE's custom Ubuntu Mate image](https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom). - -## Usage - -Set `virtual_desktop_enabled: true` in your `inventories//nas.yml` file. - -## Specific Configuration - -By default `ansible_nas_user` will be granted access with a password of `topsecret` with sudo rights. To change or add additional users override `vd_users` in your `nas.yml`: - -```yaml -vd_users: - - username: "{{ ansible_nas_user }}" - password: "topsecret" - sudo: "Y" - - username: "larrylaffer" - password: "kensentme" - sudo: "Y" -``` - -## Mounts - -`samba_shares_root` is mounted to `/samba`. -`docker_home` is mounted to `/docker`. - -## Remote Access - -It's possible to access your virtual desktop through a web browser! Check out [Guacamole](guacamole.md). diff --git a/roles/wallabag/docs/wallabag.md b/roles/wallabag/docs/wallabag.md deleted file mode 100644 index e5ffd3a3..00000000 --- a/roles/wallabag/docs/wallabag.md +++ /dev/null @@ -1,17 +0,0 @@ -# Wallabag - -Homepage: - -wallabag is a self-hostable PHP application allowing you to not miss any content anymore. Click, save and read it when you can. It extracts content so that you can read it when you have time. - -## Usage - -Set `wallabag_enabled: true` in your `inventories//nas.yml` file. - -If you want to access wallabag externally, don't forget to set `wallabag_available_externally: true` in your `inventories//nas.yml` file. - -I recommend using the mobile app, which will sync with this installation so you have access to your saved articles even if you don't have signal or wifi access. - -The default credentials are wallabag:wallabag - -The wallabag web interface can be found at . diff --git a/roles/watchtower/docs/watchtower.md b/roles/watchtower/docs/watchtower.md deleted file mode 100644 index 283bc72f..00000000 --- a/roles/watchtower/docs/watchtower.md +++ /dev/null @@ -1,15 +0,0 @@ -# Watchtower - -Homepage: - -A process for watching your Docker containers and automatically updating and restarting them whenever their base image is refreshed. - -## Usage - -Set `watchtower_enabled: true` in your `inventories//nas.yml` file. - -## Specific Configuration - -By default Watchtower is configured to check daily at 5am for updates. - -Various notification options are available, and can be configured by updating `watchtower_command` in your `inventories//nas.yml` file. A few examples are provided. The full set of options can be found at the [Watchtower GitHub project page](https://github.com/v2tec/watchtower). diff --git a/roles/wireshark/docs/wireshark.md b/roles/wireshark/docs/wireshark.md deleted file mode 100644 index 34442ab1..00000000 --- a/roles/wireshark/docs/wireshark.md +++ /dev/null @@ -1,11 +0,0 @@ -# Wireshark - -Homepage: - -Wireshark is the world’s foremost and widely-used network protocol analyzer. It lets you see what’s happening on your network at a microscopic level and is the de facto (and often de jure) standard across many commercial and non-profit enterprises, government agencies, and educational institutions. Wireshark development thrives thanks to the volunteer contributions of networking experts around the globe and is the continuation of a project started by Gerald Combs in 1998. - -## Usage - -Set `wireshark_enabled: true` in your `inventories//nas.yml` file. - -The Wireshark web interface can be found at . diff --git a/roles/woodpecker-ci/docs/woodpecker_ci.md b/roles/woodpecker-ci/docs/woodpecker_ci.md deleted file mode 100644 index 216b4f53..00000000 --- a/roles/woodpecker-ci/docs/woodpecker_ci.md +++ /dev/null @@ -1,17 +0,0 @@ -# Woodpecker CI - -Woodpecker is a simple CI engine with great extensibility. - -Check it out at . - -## Usage - -Set `woodpecker_ci_enabled: true` in your `inventories//nas.yml` file. - -Gitea (`gitea_enabled: true`) must be set up and running before attempting to set up Woodpecker CI. - -## Setup Tasks - -An Oauth2 application must be set up in Gitea. Visit for more info, then set `woodpecker_ci_gitea_client` and `woodpecker_ci_gitea_secret` accordingly. - -Set `woodpecker_ci_admin_user` to the same username as your user in Gitea. diff --git a/roles/youtubedlmaterial/docs/youtubedlmaterial.md b/roles/youtubedlmaterial/docs/youtubedlmaterial.md deleted file mode 100644 index cea68c42..00000000 --- a/roles/youtubedlmaterial/docs/youtubedlmaterial.md +++ /dev/null @@ -1,17 +0,0 @@ -# YouTubeDL-Material - -Homepage: -Docker Container: - -YoutubeDL-Material is a Material Design frontend for youtube-dl. It's coded using Angular 9 for the frontend, and Node.js on the backend. - -## Usage - -Set `youtubedlmaterial_enabled: true` in your `inventories//nas.yml` file. - -The YouTubeDL-Material web interface can be found at . - -## Specific Configuration - -A YouTube directory will be created in your configured downloads spot. YouTubeDL-Material downloads will be placed there. -You can change the download location via `inventories//nas.yml` file. diff --git a/roles/znc/docs/znc.md b/roles/znc/docs/znc.md deleted file mode 100644 index bbcb5b54..00000000 --- a/roles/znc/docs/znc.md +++ /dev/null @@ -1,11 +0,0 @@ -# Znc - -Homepage: - -ZNC is an IRC network bouncer or BNC. It can detach the client from the actual IRC server, and also from selected channels. Multiple clients from different locations can connect to a single ZNC account simultaneously and therefore appear under the same nickname on IRC. It supports Transport Layer Security connections and IPv6. - -## Usage - -Set `znc_enabled: true` in your `inventories//nas.yml` file. Edit `znc_*` variables to suit your needs. For more advanced needs, edit the template config file (`templates\znc.conf.j2`) directly. - -Connect to ZNC using IRC at ansible_nas_host_or_ip:6677. From 88b3aa86ca2cfcf7bf9822616c21304c7f3c5346 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:25:52 +0200 Subject: [PATCH 19/84] Duplicate website/docs/applications/news/freshrss.md history in roles/freshrss/docs/ history. --- roles/freshrss/docs/freshrss.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 roles/freshrss/docs/freshrss.md diff --git a/roles/freshrss/docs/freshrss.md b/roles/freshrss/docs/freshrss.md new file mode 100644 index 00000000..b34b3d08 --- /dev/null +++ b/roles/freshrss/docs/freshrss.md @@ -0,0 +1,23 @@ +--- +title: "FreshRSS" +--- + +Homepage: + +FreshRSS is a self-hosted RSS feed aggregator like Leed or Kriss Feed. + +It is lightweight, easy to work with, powerful, and customizable. + +It is a multi-user application with an anonymous reading mode. It supports custom tags. There is an API for (mobile) clients, and a Command-Line Interface. + +Thanks to the WebSub standard (formerly PubSubHubbub), FreshRSS is able to receive instant push notifications from compatible sources, such as Mastodon, Friendica, WordPress, Blogger, FeedBurner, etc. + +FreshRSS natively supports basic Web scraping, based on XPath, for Web sites not providing any RSS / Atom feed. + +Finally, it supports extensions for further tuning. + +## Usage + +Set `freshrss_enabled: true` in your `inventories//nas.yml` file. + +The FreshRSS web interface can be found at . From 3b4bc62892320057973cab53f058175a21095a4a Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:30:23 +0200 Subject: [PATCH 20/84] Duplicate website/docs/applications/development-tools/gitea.md history in roles/gitea/docs/ history. --- roles/gitea/docs/gitea.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/gitea/docs/gitea.md diff --git a/roles/gitea/docs/gitea.md b/roles/gitea/docs/gitea.md new file mode 100644 index 00000000..46243420 --- /dev/null +++ b/roles/gitea/docs/gitea.md @@ -0,0 +1,13 @@ +--- +title: "Gitea" +--- + +Homepage: + +Gitea is a painless self-hosted Git service. + +## Usage + +Set `gitea_enabled: true` in your `inventories//nas.yml` file. + +The Gitea web interface can be found at . From 0b6af3583ab37ec6f3c27addf8349e187f1d7221 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:33:17 +0200 Subject: [PATCH 21/84] Duplicate website/docs/applications/development-tools/gitlab.md history in roles/gitlab/ history. --- roles/gitlab/gitlab.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/gitlab/gitlab.md diff --git a/roles/gitlab/gitlab.md b/roles/gitlab/gitlab.md new file mode 100644 index 00000000..f5562d04 --- /dev/null +++ b/roles/gitlab/gitlab.md @@ -0,0 +1,15 @@ +--- +title: "GitLab" +--- + +Homepage: + +If Gitea isn't powerful enough for you then consider GitLab. It's a much more powerful (and consequently bigger) Git repository solution that includes a suite of code analytics. On the other hand it requires more RAM. + +## Usage + +Set `gitlab_enabled: true` in your `inventories//nas.yml` file. + +To make GitLab available externally via Traefik set `gitlab_available_externally: true` in your `inventories//nas.yml` file. + +The first time you run GitLab you'll be prompted for an account's password. The password is for GitLab's `root` administrator account. From there you can log in to create additional users and further configure the application. From a5399703e9a7a51888cc958d001524df885f3a5a Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:33:49 +0200 Subject: [PATCH 22/84] Duplicate website/docs/applications/monitoring/glances.md history in roles/glances/docs/ history. --- roles/glances/docs/glances.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/glances/docs/glances.md diff --git a/roles/glances/docs/glances.md b/roles/glances/docs/glances.md new file mode 100644 index 00000000..89639696 --- /dev/null +++ b/roles/glances/docs/glances.md @@ -0,0 +1,17 @@ +--- +title: "Glances" +--- + +Homepage: + +Glances is a cross-platform system monitoring tool written in Python. + +## Usage + +Set `glances_enabled: true` in your `inventories//nas.yml` file. + +The Glances web interface can be found at . + +## Specific Configuration + +Glances can be integrated with InfluxDB and Grafana. From 9dc1cc0fd3521f2487e6c8e03a7ec938d02e3d1b Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:36:17 +0200 Subject: [PATCH 23/84] Duplicate website/docs/applications/other/gotify.md history in roles/gotify/docs/ history. --- roles/gitlab/{ => docs}/gitlab.md | 0 roles/gotify/docs/gotify.md | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) rename roles/gitlab/{ => docs}/gitlab.md (100%) create mode 100644 roles/gotify/docs/gotify.md diff --git a/roles/gitlab/gitlab.md b/roles/gitlab/docs/gitlab.md similarity index 100% rename from roles/gitlab/gitlab.md rename to roles/gitlab/docs/gitlab.md diff --git a/roles/gotify/docs/gotify.md b/roles/gotify/docs/gotify.md new file mode 100644 index 00000000..3e2e4267 --- /dev/null +++ b/roles/gotify/docs/gotify.md @@ -0,0 +1,18 @@ +--- +title: "Gotify" +--- + +Homepage: + +A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui) + +## Usage + +Set `gotify_enabled: true` in your `inventories//nas.yml` file. + +The Gotify web interface can be found at . + +Android client: [https://play.google.com/store/apps/details?id=com.github.gotify](https://play.google.com/store/apps/details?id=com.github.gotify) +iOS client: n/a +Chrome extension: n/a +Firefox extension: From 06f126e064822e60908ce9f4417326bcd41414bf Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:36:54 +0200 Subject: [PATCH 24/84] Duplicate website/docs/applications/other/guacamole.md history in roles/guacamole/docs/ history. --- roles/guacamole/docs/guacamole.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 roles/guacamole/docs/guacamole.md diff --git a/roles/guacamole/docs/guacamole.md b/roles/guacamole/docs/guacamole.md new file mode 100644 index 00000000..eb1fa811 --- /dev/null +++ b/roles/guacamole/docs/guacamole.md @@ -0,0 +1,19 @@ +--- +title: "Guacamole" +--- + +Homepage: + +Apache Guacamole is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH. + +## Usage + +Set `guacamole_enabled: true` in your `inventories//nas.yml` file. + +## Specific Configuration + +The default username and password is `guacadmin`. Change it! + +## What to connect to? + +You can run a virtual desktop from your Ansible-NAS box, check out the [Virtual Desktop docs](virtual_desktop.md). From f6144b77a1bb845ec858117eaa137c7c3c1e4b74 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:37:31 +0200 Subject: [PATCH 25/84] Duplicate website/docs/applications/system-tools/healthchecks.io.md history in roles/healthchecks.io/docs/ history. --- roles/healthchecks.io/docs/healthchecks.io.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/healthchecks.io/docs/healthchecks.io.md diff --git a/roles/healthchecks.io/docs/healthchecks.io.md b/roles/healthchecks.io/docs/healthchecks.io.md new file mode 100644 index 00000000..aadbcf94 --- /dev/null +++ b/roles/healthchecks.io/docs/healthchecks.io.md @@ -0,0 +1,13 @@ +--- +title: "Healthchecks.io" +--- + +Homepage: + +A simple cronjob that uses `curl` to ping a given endpoint on the `healthchecks.io` servers. You can choose how often it should ping the endpoint, and what happens when it doesn't. Email/Slack/Telegram and many more services can be integrated. + +## Usage + +Create your own project on , and set both the time between pings and the grace time. Set your prefered integration such as email. + +Set `healthchecks_enabled: true` in your `inventories//nas.yml` file, and if your time between pings is different than the default `healthchecks_ping_minutes`, change it. Finally, set your ping url in the `healthchecks_url` variable. From f7e5d511297f3d429f1d98ecb33d84941d985b26 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:37:58 +0200 Subject: [PATCH 26/84] Duplicate website/docs/applications/dashboards/heimdall.md history in roles/heimdall/docs/ history. --- roles/heimdall/docs/heimdall.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/heimdall/docs/heimdall.md diff --git a/roles/heimdall/docs/heimdall.md b/roles/heimdall/docs/heimdall.md new file mode 100644 index 00000000..7b0b00c3 --- /dev/null +++ b/roles/heimdall/docs/heimdall.md @@ -0,0 +1,17 @@ +--- +title: "Heimdall" +--- + +Homepage: + +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//nas.yml` file. + +The Heimdall web interface can be found at . + +## Specific Configuration + +Heimdall defaults to port 10080 - some browsers block this port. Override `heimdall_port_http` to move it somewhere else. From 8c02e9569277f3335e51ad4b3aee39122e00fef1 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:38:24 +0200 Subject: [PATCH 27/84] Duplicate website/docs/applications/home-automation/homeassistant.md history in roles/homeassistant/docs/ history. --- roles/homeassistant/docs/homeassistant.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/homeassistant/docs/homeassistant.md diff --git a/roles/homeassistant/docs/homeassistant.md b/roles/homeassistant/docs/homeassistant.md new file mode 100644 index 00000000..ac1bc59b --- /dev/null +++ b/roles/homeassistant/docs/homeassistant.md @@ -0,0 +1,15 @@ +--- +title: "Home Assistant" +--- + +Homepage: + +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//nas.yml` file. + +If you want to access Home Assistant externally, don't forget to set `homeassistant_available_externally: true` in your `inventories//nas.yml` file. + +The Home Assistant web interface can be found at . From 398fc0dc1dd4f7ae3b60250d1bf3b1eadd83ebbe Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:38:49 +0200 Subject: [PATCH 28/84] Duplicate website/docs/applications/home-automation/homebridge.md history in roles/homebridge/docs/ history. --- roles/homebridge/docs/homebridge.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/homebridge/docs/homebridge.md diff --git a/roles/homebridge/docs/homebridge.md b/roles/homebridge/docs/homebridge.md new file mode 100644 index 00000000..98c80ebc --- /dev/null +++ b/roles/homebridge/docs/homebridge.md @@ -0,0 +1,13 @@ +--- +title: "Homebridge" +--- + +Homepage: + +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//nas.yml` file. + +The Homebridge web interface can be found at . The default username and password is 'admin' - change this after your first login! From 49bf9c308d3fc179b845f08929cd0be3062aa129 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:39:40 +0200 Subject: [PATCH 29/84] Duplicate website/docs/applications/download-tools/jackett.md history in roles/jackett/docs/ history. --- roles/jackett/docs/jackett.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/jackett/docs/jackett.md diff --git a/roles/jackett/docs/jackett.md b/roles/jackett/docs/jackett.md new file mode 100644 index 00000000..866c1792 --- /dev/null +++ b/roles/jackett/docs/jackett.md @@ -0,0 +1,13 @@ +--- +title: "Jackett" +--- + +Homepage: + +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//nas.yml` file. + +The Jackett web interface can be found at . From 621ab06dcb0fe78b13c5e8e5e1e3679f83efa847 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:40:07 +0200 Subject: [PATCH 30/84] Duplicate website/docs/applications/media-serving/jellyfin.md history in roles/jellyfin/docs/ history. --- roles/jellyfin/docs/jellyfin.md | 67 +++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 roles/jellyfin/docs/jellyfin.md diff --git a/roles/jellyfin/docs/jellyfin.md b/roles/jellyfin/docs/jellyfin.md new file mode 100644 index 00000000..939177de --- /dev/null +++ b/roles/jellyfin/docs/jellyfin.md @@ -0,0 +1,67 @@ +--- +title: "Jellyfin" +--- + +Homepage: + +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//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. From a7a7f229261b89566c7be2d89cb71d5fadafc1c1 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:40:31 +0200 Subject: [PATCH 31/84] Duplicate website/docs/applications/content-management/joomla.md history in roles/joomla/docs/ history. --- roles/joomla/docs/joomla.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 roles/joomla/docs/joomla.md diff --git a/roles/joomla/docs/joomla.md b/roles/joomla/docs/joomla.md new file mode 100644 index 00000000..e573f2f3 --- /dev/null +++ b/roles/joomla/docs/joomla.md @@ -0,0 +1,26 @@ +--- +title: "Joomla" +description: "An award-winning content management system" +--- + +Homepage: + +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//nas.yml` file. + +If you want to access Joomla externally, set `joomla_available_externally: true` in your `inventories//nas.yml` file. + +The Joomla web interface can be found at . + +## 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`. From 5ae9ec397717759868582ae77a1b016a61e5b9bc Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:40:56 +0200 Subject: [PATCH 32/84] Duplicate website/docs/applications/media-serving/komga.md history in roles/komga/docs/ history. --- roles/komga/docs/komga.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/komga/docs/komga.md diff --git a/roles/komga/docs/komga.md b/roles/komga/docs/komga.md new file mode 100644 index 00000000..82b21acc --- /dev/null +++ b/roles/komga/docs/komga.md @@ -0,0 +1,15 @@ +--- +title: "Komga" +--- + +Homepage: + +Docker Image: + +Komga is a media server for your comics, mangas, BDs and magazines. + +## Usage + +Set `komga_enabled: true` in your `inventories//nas.yml` file. + +Access the webui at by default. From 39d5fd87ce284c326ae750a9561a335dd0f61bbb Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:41:21 +0200 Subject: [PATCH 33/84] Duplicate website/docs/applications/system-tools/krusader.md history in roles/krusader/docs/ history. --- roles/krusader/docs/krusader.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/krusader/docs/krusader.md diff --git a/roles/krusader/docs/krusader.md b/roles/krusader/docs/krusader.md new file mode 100644 index 00000000..4c3e147f --- /dev/null +++ b/roles/krusader/docs/krusader.md @@ -0,0 +1,15 @@ +--- +title: "Krusader" +--- + +Homepage: + +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//nas.yml` file. + +The Krusader web interface can be found at . From cc922e63d6029c821514f9cf5e61a2ed2eeb12d5 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:41:47 +0200 Subject: [PATCH 34/84] Duplicate website/docs/applications/download-tools/lidarr.md history in roles/lidarr/docs/ history. --- roles/lidarr/docs/lidarr.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 roles/lidarr/docs/lidarr.md diff --git a/roles/lidarr/docs/lidarr.md b/roles/lidarr/docs/lidarr.md new file mode 100644 index 00000000..32843d4a --- /dev/null +++ b/roles/lidarr/docs/lidarr.md @@ -0,0 +1,11 @@ +--- +title: "Lidarr" +--- + +Homepage: + +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//nas.yml` file. From d5720dfce7f224de6e92f9377a21e0cb0e186246 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:42:13 +0200 Subject: [PATCH 35/84] Duplicate website/docs/applications/other/mealie.md history in roles/mealie/docs/ history. --- roles/mealie/docs/mealie.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/mealie/docs/mealie.md diff --git a/roles/mealie/docs/mealie.md b/roles/mealie/docs/mealie.md new file mode 100644 index 00000000..b001c10f --- /dev/null +++ b/roles/mealie/docs/mealie.md @@ -0,0 +1,13 @@ +--- +title: "Mealie" +--- + +Homepage: + +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//nas.yml` file. + +The Mealie web interface can be found at . From 9c7bebdac2b5bb443930c305b356733a92a8087d Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:42:40 +0200 Subject: [PATCH 36/84] Duplicate website/docs/applications/gaming/minecraft-server.md history in roles/minecraft-server/docs/ history. --- roles/minecraft-server/docs/minecraft-server.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/minecraft-server/docs/minecraft-server.md diff --git a/roles/minecraft-server/docs/minecraft-server.md b/roles/minecraft-server/docs/minecraft-server.md new file mode 100644 index 00000000..e9e4e4a8 --- /dev/null +++ b/roles/minecraft-server/docs/minecraft-server.md @@ -0,0 +1,15 @@ +--- +title: "Minecraft Server" +--- + +Homepage: + +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//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. From ca2310eb6f72e31199dfcf6ec508dc82ada41659 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:43:12 +0200 Subject: [PATCH 37/84] Duplicate website/docs/applications/media-serving/minidlna.md history in roles/minidlna/docs/ history. --- roles/minidlna/docs/minidlna.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/minidlna/docs/minidlna.md diff --git a/roles/minidlna/docs/minidlna.md b/roles/minidlna/docs/minidlna.md new file mode 100644 index 00000000..f216795b --- /dev/null +++ b/roles/minidlna/docs/minidlna.md @@ -0,0 +1,13 @@ +--- +title: "MiniDLNA" +--- + +Homepage: + +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//nas.yml` file. + +The very basic MiniDLNA web interface can be found at . From b2c3bdb35d364c9d58d54d26ec5896c7a4685750 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:43:40 +0200 Subject: [PATCH 38/84] Duplicate website/docs/applications/news/miniflux.md history in roles/miniflux/docs/ history. --- roles/miniflux/docs/miniflux.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/miniflux/docs/miniflux.md diff --git a/roles/miniflux/docs/miniflux.md b/roles/miniflux/docs/miniflux.md new file mode 100644 index 00000000..92890158 --- /dev/null +++ b/roles/miniflux/docs/miniflux.md @@ -0,0 +1,15 @@ +# Miniflux + +Homepage: + +Miniflux is a minimalist and opinionated feed reader. + +## Usage + +Set `miniflux_enabled: true` in your `inventories//nas.yml` file. + +The Miniflux web interface can be found at , 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`. From 831b4a6ffda06cd4d57198408c3694a0ca505288 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:44:06 +0200 Subject: [PATCH 39/84] Duplicate website/docs/applications/home-automation/mosquitto.md history in roles/mosquitto/docs/ history. --- roles/mosquitto/docs/mosquitto.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 roles/mosquitto/docs/mosquitto.md diff --git a/roles/mosquitto/docs/mosquitto.md b/roles/mosquitto/docs/mosquitto.md new file mode 100644 index 00000000..5fe0c9d6 --- /dev/null +++ b/roles/mosquitto/docs/mosquitto.md @@ -0,0 +1,11 @@ +--- +title: "Mosquitto" +--- + +Homepage: + +Mosquitto is a lightweight open source MQTT message broker. + +## Usage + +Set `mosquitto_enabled: true` in your `inventories//nas.yml` file. From 0a0a807b46137136d5c02230f75545df031efc61 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:44:30 +0200 Subject: [PATCH 40/84] Duplicate website/docs/applications/download-tools/mylar.md history in roles/mylar/docs/ history. --- roles/mylar/docs/mylar.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/mylar/docs/mylar.md diff --git a/roles/mylar/docs/mylar.md b/roles/mylar/docs/mylar.md new file mode 100644 index 00000000..819183f1 --- /dev/null +++ b/roles/mylar/docs/mylar.md @@ -0,0 +1,17 @@ +--- +title: "Mylar" +--- + +Homepage: + +Docker Container: + +An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents + +## Usage + +Set `mylar_enabled: true` in your `inventories//nas.yml` file. + +If you want to access Mylar externally, don't forget to set `mylar_available_externally: true` in your `inventories//nas.yml` file. + +The Mylar web interface can be found at . From bb51d163ac09f1edb4b8e17bbda2fa1762fe8657 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:45:11 +0200 Subject: [PATCH 41/84] Duplicate website/docs/applications/media-serving/mymediaforalexa.md history in roles/mymediaforalexa/docs/ history. --- roles/mymediaforalexa/docs/mymediaforalexa.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/mymediaforalexa/docs/mymediaforalexa.md diff --git a/roles/mymediaforalexa/docs/mymediaforalexa.md b/roles/mymediaforalexa/docs/mymediaforalexa.md new file mode 100644 index 00000000..85b42f6d --- /dev/null +++ b/roles/mymediaforalexa/docs/mymediaforalexa.md @@ -0,0 +1,13 @@ +--- +title: "My Media for Alexa" +--- + +Homepage: + +My Media lets you stream your music collection to your Amazon Echo or Amazon Dot without having to upload all your music collection to the Cloud. This keeps your music under your control. + +## Usage + +Set `mymediaforalexa_enabled: true` in your `inventories//nas.yml` file. + +The My Media for Alexa web interface can be found at . From 20e3acd2269d4aeb68927d4fd9b27ef9ff3957a0 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:45:36 +0200 Subject: [PATCH 42/84] Duplicate website/docs/applications/home-automation/n8n.md history in roles/n8n/docs/ history. --- roles/n8n/docs/n8n.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 roles/n8n/docs/n8n.md diff --git a/roles/n8n/docs/n8n.md b/roles/n8n/docs/n8n.md new file mode 100644 index 00000000..c9651163 --- /dev/null +++ b/roles/n8n/docs/n8n.md @@ -0,0 +1,20 @@ +--- +title: "Nodemation (n8n)" +--- + +Homepage: + +Extendable workflow automation tool that enables you to connect anything to everything. More pragrmatically, it helps you interconnect API with each other to build your own information / work flows. + +## Usage + +Set `n8n_enabled: true` in your `inventories//nas.yml` file. + +n8n is secured by default, he user and password can be set with: + +```yaml + n8n_basic_auth_user: "" + n8n_basic_auth_password: "" +``` + +The default for these is "n8n_user" and "n8n_change_me" respectively, it is recommended to change these. From eefa42da0bc8e53c1cfcd2144210a9ed393fc8f7 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:46:02 +0200 Subject: [PATCH 43/84] Duplicate website/docs/applications/media-serving/navidrome.md history in roles/navidrome/docs/ history. --- roles/navidrome/docs/navidrome.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/navidrome/docs/navidrome.md diff --git a/roles/navidrome/docs/navidrome.md b/roles/navidrome/docs/navidrome.md new file mode 100644 index 00000000..3e5380e2 --- /dev/null +++ b/roles/navidrome/docs/navidrome.md @@ -0,0 +1,13 @@ +--- +title: "Navidrome" +--- + +Homepage: + +Navidrome is an open source web-based music collection server and streamer that is compatible with Subsonic/Airsonic. It gives you freedom to listen to your music collection from any browser or mobile device. It's like your personal Spotify! + +## Usage + +Set `navidrome_enabled: true` in your `inventories//nas.yml` file. + +The Navidrome web interface can be found at . From ec0d2c2361db1b0408a4dcc4cc588cd7fb762c01 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:46:30 +0200 Subject: [PATCH 44/84] Duplicate website/docs/applications/system-tools/netbootxyz.md history in roles/netbootxyz/docs/ history. --- roles/netbootxyz/docs/netbootxyz.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/netbootxyz/docs/netbootxyz.md diff --git a/roles/netbootxyz/docs/netbootxyz.md b/roles/netbootxyz/docs/netbootxyz.md new file mode 100644 index 00000000..bca2bd5d --- /dev/null +++ b/roles/netbootxyz/docs/netbootxyz.md @@ -0,0 +1,17 @@ +--- +title: "netboot.xyz" +--- + +Homepage: + +Docker Container: + +netboot.xyz is a way to PXE boot various operating system installers or utilities from one place within the BIOS without the need of having to go retrieve the media to run the tool. [iPXE](https://ipxe.org/) is used to provide a user friendly menu from within the BIOS that lets you easily choose the operating system you want along with any specific types of versions or bootable flags. + +You can remote attach the ISO to servers, set it up as a rescue option in Grub, or even set up your home network to boot to it by default so that it's always available. + +## Usage + +Set `netbootxyz_enabled: true` in your `inventories//nas.yml` file. + +The netbooxyz web interface can be found at . From c38c2ff9c735074728b74da7dfe44a8ad9170993 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:47:56 +0200 Subject: [PATCH 45/84] Duplicate website/docs/applications/other/nextcloud.md history in roles/nextcloud/docs/ history. --- roles/nextcloud/docs/nextcloud.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 roles/nextcloud/docs/nextcloud.md diff --git a/roles/nextcloud/docs/nextcloud.md b/roles/nextcloud/docs/nextcloud.md new file mode 100644 index 00000000..5cc5b062 --- /dev/null +++ b/roles/nextcloud/docs/nextcloud.md @@ -0,0 +1,27 @@ +--- +title: "Nextcloud" +--- + +Homepage: + +## Usage + +Set `nextcloud_enabled: true` in your `inventories//nas.yml` file. + +Tread carefully. + +External access may require that you manually configure your Fully Qualified Domain Name (FQDN) as a trusted domain within the application. There is an environment variable set up for this in the "nextcloud task" which will most likely make manual configuration unnecessary. If you get the following [screenshot](https://docs.nextcloud.com/server/14/admin_manual/installation/installation_wizard.html#trusted-domains) warning when trying to access nextcloud externally you'll need to manually set it up. + +This can be accomplished in two commands. + +```bash +# On the server where the docker containers are running +$ docker exec -it --user www-data nextcloud /bin/bash +$ php occ config:system:set trusted_domains INDEX_FOR_NEW_ENTRY_SEE_DOCS_LINK_BELOW --value=YOUR_FQDN_HERE --update-only +``` + +The above commands are documented in the administration guide for Nextcloud: + +* [set array values](https://docs.nextcloud.com/server/14/admin_manual/configuration_server/occ_command.html#setting-an-array-configuration-value) + +* [docker container docs, references environment variables](https://github.com/nextcloud/docker) From a4c4221ee6a7941eda97dab5fec338652d51e290 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:48:20 +0200 Subject: [PATCH 46/84] Duplicate website/docs/applications/development-tools/nomad.md history in roles/nomad/docs/ history. --- roles/nomad/docs/nomad.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/nomad/docs/nomad.md diff --git a/roles/nomad/docs/nomad.md b/roles/nomad/docs/nomad.md new file mode 100644 index 00000000..08389d11 --- /dev/null +++ b/roles/nomad/docs/nomad.md @@ -0,0 +1,13 @@ +--- +title: "Nomad" +--- + +Homepage: + +A simple and flexible scheduler and orchestrator to deploy and manage containers and non-containerised applications across on-prem and clouds at scale. + +## Usage + +Set `nomad_enabled: true` in your `inventories//nas.yml` file. + +Nomad's web interface can be found at From 8dded7a7d0d78dc300895f701f9f1bdbf4b32ba6 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:48:46 +0200 Subject: [PATCH 47/84] Duplicate website/docs/applications/download-tools/nzbget.md history in roles/nzbget/docs/ history. --- roles/nzbget/docs/nzbget.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/nzbget/docs/nzbget.md diff --git a/roles/nzbget/docs/nzbget.md b/roles/nzbget/docs/nzbget.md new file mode 100644 index 00000000..1e81efb5 --- /dev/null +++ b/roles/nzbget/docs/nzbget.md @@ -0,0 +1,13 @@ +--- +title: "NZBGet" +--- + +Homepage: + +The most efficient Usenet downloader. NZBGet is written in C++ and designed with performance in mind to achieve maximum download speed by using very little system resources. + +## Usage + +Set `nzbget_enabled: true` in your `inventories//nas.yml` file. + +The NZBget web interface can be found at , the default username is `nzbget` and password `tegbzn6789`. Change this once you've logged in! From 3e7d879afa9091f6e6a838565ea1dacf9e295376 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:49:11 +0200 Subject: [PATCH 48/84] Duplicate website/docs/applications/other/octoprint.md history in roles/octoprint/docs/ history. --- roles/octoprint/docs/octoprint.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 roles/octoprint/docs/octoprint.md diff --git a/roles/octoprint/docs/octoprint.md b/roles/octoprint/docs/octoprint.md new file mode 100644 index 00000000..1d5b8c41 --- /dev/null +++ b/roles/octoprint/docs/octoprint.md @@ -0,0 +1,12 @@ +--- +title: "Octoprint" +--- +Homepage: + +Octoprint is a control and monitoring application for your 3D printer. You can start and stop print jobs, view your webcam feed, move the print head and extruder manually and check your gcode files, all from a single web interface. Octoprint doesn't require modifications on the printer firmware, just make sure your NAS is phisically connected to it with a usb cable. + +## Usage + +Connect the printer to your NAS, and take note of where the serial interface is mounted (usually it's automounted in `/dev/ttyUSB0`). Set `octoprint_enabled: true` in your `inventories//nas.yml` file, as well as the `octoprint_printer_mountpoint` variable if your printer doesn't mount to the default location. + +If you want to also have a webcam feed, attach one to your NAS and take note of its mountpoint as well (usually `/dev/video0`). Set `octoprint_enable_webcam: true` and add a `octoprint_webcam_mountpoint` variable if the webcam doesn't mount to the default location. From 218f42f3bcef7dc0dec91d879cc81c51a5f086f1 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:49:35 +0200 Subject: [PATCH 49/84] Duplicate website/docs/applications/download-tools/ombi.md history in roles/ombi/docs/ history. --- roles/ombi/docs/ombi.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 roles/ombi/docs/ombi.md diff --git a/roles/ombi/docs/ombi.md b/roles/ombi/docs/ombi.md new file mode 100644 index 00000000..c13076c2 --- /dev/null +++ b/roles/ombi/docs/ombi.md @@ -0,0 +1,11 @@ +--- +title: "Ombi" +--- + +Homepage: + +Ombi is a self-hosted web application that automatically gives your shared Plex or Emby users the ability to request content by themselves! Ombi can be linked to multiple TV Show and Movie DVR tools to create a seamless end-to-end experience for your users. + +## Usage + +Set `ombi_enabled: true` in your `inventories//nas.yml` file. From 1bbb31f4a2bf787469f18a2f9d3befcbf25ba646 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:50:00 +0200 Subject: [PATCH 50/84] Duplicate website/docs/applications/home-automation/openhab.md history in roles/openhab/docs/ history. --- roles/openhab/docs/openhab.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/openhab/docs/openhab.md diff --git a/roles/openhab/docs/openhab.md b/roles/openhab/docs/openhab.md new file mode 100644 index 00000000..47a60422 --- /dev/null +++ b/roles/openhab/docs/openhab.md @@ -0,0 +1,17 @@ +--- +title: "openHAB" +--- + +Homepage: + +OpenHab is a vendor and technology agnostic open source automation software for your home. +It allows you to connect many different IoT-Devices (which in this case means "Intranet of Things") using custom bindings made by the community. + +## Usage + +Set `openhab_enabled: true` in your `inventories//nas.yml` file. + +## Specific Configuration + +The openHAB Webinterface is available at port 7777 (HTTP) and 7778 (HTTPS). +Visit the webinterface and follow the setup instructions found in the [openHAB Documentation](https://www.openhab.org/docs/tutorial/1sttimesetup.html) From f2c8bd1fd97c48c84f8aff86bd1355eb76d38921 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:50:27 +0200 Subject: [PATCH 51/84] Duplicate website/docs/applications/dashboards/organizr.md history in roles/organizr/docs/ history. --- roles/organizr/docs/organizr.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/organizr/docs/organizr.md diff --git a/roles/organizr/docs/organizr.md b/roles/organizr/docs/organizr.md new file mode 100644 index 00000000..3fb1b3cd --- /dev/null +++ b/roles/organizr/docs/organizr.md @@ -0,0 +1,17 @@ +--- +title: "Organizr" +--- + +Homepage: + +ORGANIZR aims to be your one stop shop for your Servers Frontend. + +Do you have quite a bit of services running on your computer or server? Do you have a lot of bookmarks or have to memor$ + +TODO: finish this truncated description + +## Usage + +Set `organizr_enabled: true` in your `inventories//nas.yml` file. + +The Organizr web interface can be found at . From 8b51299fc17af227ac920a067af2b690639e5356 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:50:50 +0200 Subject: [PATCH 52/84] Duplicate website/docs/applications/download-tools/overseerr.md history in roles/overseerr/docs/ history. --- roles/overseerr/docs/overseerr.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/overseerr/docs/overseerr.md diff --git a/roles/overseerr/docs/overseerr.md b/roles/overseerr/docs/overseerr.md new file mode 100644 index 00000000..d754a829 --- /dev/null +++ b/roles/overseerr/docs/overseerr.md @@ -0,0 +1,15 @@ +--- +title: "Overseerr" +--- + + Homepage: + + Docker Container: + + Overseerr is a free and open source software application for managing requests for your media library. It integrates with your existing services, such as Sonarr, Radarr, and Plex! + +## Usage + + Using overseerr: Set `overseerr_enabled: true` in your `inventories//nas.yml` file. + + The overseerr web interface can be found at . From ce7711dad602e7b8ecd9b1ec95c97a9743e17c7b Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:51:17 +0200 Subject: [PATCH 53/84] Duplicate website/docs/applications/other/paperless_ng.md history in roles/paperless_ng/docs/ history. --- roles/paperless_ng/docs/paperless_ng.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 roles/paperless_ng/docs/paperless_ng.md diff --git a/roles/paperless_ng/docs/paperless_ng.md b/roles/paperless_ng/docs/paperless_ng.md new file mode 100644 index 00000000..651a01ad --- /dev/null +++ b/roles/paperless_ng/docs/paperless_ng.md @@ -0,0 +1,25 @@ +--- +title: "Paperless-ng" +--- + +Homepage: + +Paperless is an application by Daniel Quinn and contributors that indexes your scanned documents and allows you to easily search for documents and store metadata alongside your documents. + +Paperless-ng is a fork of the original project, adding a new interface and many other changes under the hood + +## Usage + +Set `paperless_ng_enabled: true` in your `inventories//nas.yml` file. + +The paperless-ng web interface can be found at . + +### Create the superuser + +To be able to login, you will need a super user. To create it, execute the following command: + +```bash +docker exec -it paperless_ng_uiserver python manage.py createsuperuser +``` + +This will prompt you to set a username, an optional e-mail address and finally a password (at least 8 characters). From 76c4339b32492e84674ffe8ddae2c30047e6d8f9 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:51:43 +0200 Subject: [PATCH 54/84] Duplicate website/docs/applications/other/piwigo.md history in roles/piwigo/docs/ history. --- roles/piwigo/docs/piwigo.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 roles/piwigo/docs/piwigo.md diff --git a/roles/piwigo/docs/piwigo.md b/roles/piwigo/docs/piwigo.md new file mode 100644 index 00000000..f6760f8d --- /dev/null +++ b/roles/piwigo/docs/piwigo.md @@ -0,0 +1,30 @@ +--- +title: "Piwigo" +--- + +Homepage: [Piwigo.org](https://piwigo.org) + +Piwigo is open source photo gallery software for the web. Designed for organisations, teams and individuals. + +## Usage + +Set `piwigo_enabled: true` in your `inventories//nas.yml` file. + +If you want to access Piwigo externally, set `piwigo_available_externally: true` in your `inventories//nas.yml` file. + +The Piwigo web interface can be found at . + +## Specific Configuration + +Optional configurations: + +- Set `piwigo_mysql_user` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". +- Set `piwigo_mysql_password` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". +- Set `piwigo_mysql_root_password` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". + +- On first run you'll need to enter database details: + - Host: `db:3306` + - Username: the value of piwigo_mysql_user, defaults to "piwigo" + - Password: the value of piwigo_password, defaults to "piwigo" + - Database Name: `piwigo` + - Database tables prefix: should be prefilled with `piwigo_` From 530e103e63aa35606088f739477920d2185b1bf7 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:52:07 +0200 Subject: [PATCH 55/84] Duplicate website/docs/applications/media-serving/plex.md history in roles/plex/docs/ history. --- roles/plex/docs/plex.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 roles/plex/docs/plex.md diff --git a/roles/plex/docs/plex.md b/roles/plex/docs/plex.md new file mode 100644 index 00000000..8fb78902 --- /dev/null +++ b/roles/plex/docs/plex.md @@ -0,0 +1,18 @@ +--- +title: "Plex" +--- + +Homepage: + +Plex is a personal media server that also provides access to several external movie, web show, and podcast services. Allows you to stream music too. Apps for many devices, including e.g. chromecast integration. + +## Usage + +Set `plex_enabled: true` in your `inventories//nas.yml` file. + +The Plex web interface can be found at . + +## Specific Configuration + +You'll need to log in with a plex account, (or possibly claim your server). +You'll need to set up your local file store - go to settings > Manage > Libraries, and add your libraries. These are mounted in the root directory by default. From 8c364880d4e998ee36bd130a3e9b3826f4e687e1 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:52:32 +0200 Subject: [PATCH 56/84] Duplicate website/docs/applications/system-tools/portainer.md history in roles/portainer/docs/ history. --- roles/portainer/docs/portainer.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 roles/portainer/docs/portainer.md diff --git a/roles/portainer/docs/portainer.md b/roles/portainer/docs/portainer.md new file mode 100644 index 00000000..78c727e6 --- /dev/null +++ b/roles/portainer/docs/portainer.md @@ -0,0 +1,11 @@ +--- +title: "Portainer" +--- + +Homepage: + +## Usage + +Set `portainer_enabled: true` in your `inventories//nas.yml` file. + +The Portainer web interface can be found at . From 7b478dcaddb7b064fd91f092c1ba116aa4708866 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:52:59 +0200 Subject: [PATCH 57/84] Duplicate website/docs/applications/download-tools/prowlarr.md history in roles/prowlarr/docs/ history. --- roles/prowlarr/docs/prowlarr.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/prowlarr/docs/prowlarr.md diff --git a/roles/prowlarr/docs/prowlarr.md b/roles/prowlarr/docs/prowlarr.md new file mode 100644 index 00000000..0c0c0b45 --- /dev/null +++ b/roles/prowlarr/docs/prowlarr.md @@ -0,0 +1,17 @@ +--- +title: "Prowlarr" +--- + +Homepages: [prowlarr](https://github.com/Prowlarr/Prowlarr) + +**Prowlarr** is a indexer manager/proxy built on the popular arr .net/reactjs base stack to integrate with your various PVR apps. Prowlarr supports both Torrent Trackers and Usenet Indexers. It integrates seamlessly with Sonarr, Radarr, Lidarr, and Readarr offering complete management of your indexers with no per app Indexer setup required (we do it all). + +## Usage + +Set `prowlarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. + +The Prowlarr web interface can be found at `http://ansible_nas_host_or_ip:9696` by default + +## Specific Configuration + +For comprehensive configuration instructions see the [Prowlarr wiki](https://wiki.servarr.com/prowlarr) or [Prowlarr Github page](https://github.com/Prowlarr/Prowlarr) From e53297d72ce496c33b92d7d789a2f0976dc2b619 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:53:23 +0200 Subject: [PATCH 58/84] Duplicate website/docs/applications/download-tools/pyload.md history in roles/pyload/docs/ history. --- roles/pyload/docs/pyload.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 roles/pyload/docs/pyload.md diff --git a/roles/pyload/docs/pyload.md b/roles/pyload/docs/pyload.md new file mode 100644 index 00000000..7870a26a --- /dev/null +++ b/roles/pyload/docs/pyload.md @@ -0,0 +1,18 @@ +--- +title: "pyLoad" +--- + +Homepage: [https://pyload.net/](https://pyload.net/) + +Free and Open Source download manager written in Python and designed to be extremely lightweight, easily extensible and fully manageable via web. + +## Usage + +Set `pyload_enabled: true` in your `inventories//nas.yml` file. + +pyLoad's web interface can be found at . + +## Specific Configuration + +Default username is `pyload` and default password is `pyload` +In order to add or remove users, you will need to access the container from an interactive shell (can easily be done from portainer, if installed) and enter pyLoad's home directory `/opt/pyload` and using the command `python pyLoadCore.py -u` and follow the on-screen prompts. More commands to configure and customize pyLoad can be found on it's website. From 57f8175b0d5b279a454a2f73b0185c840f23a66f Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:53:50 +0200 Subject: [PATCH 59/84] Duplicate website/docs/applications/media-serving/pytivo.md history in roles/pytivo/docs/ history. --- roles/pytivo/docs/pytivo.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 roles/pytivo/docs/pytivo.md diff --git a/roles/pytivo/docs/pytivo.md b/roles/pytivo/docs/pytivo.md new file mode 100644 index 00000000..c3344a23 --- /dev/null +++ b/roles/pytivo/docs/pytivo.md @@ -0,0 +1,32 @@ +--- +title: "PyTivo" +--- + +Project Homepage: + + +Docker Homepage: + + +PyTivo is both an HMO and GoBack server. Similar to TiVo Desktop pyTivo +loads many standard video compression codecs and outputs mpeg2 video to +the TiVo. However, pyTivo is able to load MANY more file types than TiVo +Desktop. + +## Usage + +Set `pytivo_enabled: true` in your `group_vars/all.yml` file. The PyTivo +web interface can be found at . + +## Specific Configuration + +PyTivo needs to be configured for use. Your ansible-nas media is +available to share via: + +* /movies - Where your movies are stored +* /music - Where your music is stored +* /photos - Where your photos are stored +* /podcasts - Where your podcasts are stored +* /tv - Where your TV episodes are stored + +Configuration help for PyTivo settings can be found at [Configure_pyTivo](https://pytivo.sourceforge.io/wiki/index.php/Configure_pyTivo). From 5a6f5582636dabd1f54b980f85f9c6b81efeaf9c Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:54:14 +0200 Subject: [PATCH 60/84] Duplicate website/docs/applications/download-tools/radarr.md history in roles/radarr/docs/ history. --- roles/radarr/docs/radarr.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 roles/radarr/docs/radarr.md diff --git a/roles/radarr/docs/radarr.md b/roles/radarr/docs/radarr.md new file mode 100644 index 00000000..09355c1f --- /dev/null +++ b/roles/radarr/docs/radarr.md @@ -0,0 +1,24 @@ +--- +title: "Radarr" +--- + +Homepage: [radarr](https://radarr.video/) + +**Radarr** is an independent fork of Sonarr reworked for automatically downloading movies via Usenet and BitTorrent. + +## Usage + +Set `radarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. + +The Radarr web interface can be found at `http://ansible_nas_host_or_ip:7878` by default + +## Specific Configuration + +**First make sure Radarr has permissions to write and read the `/download`, and `/movies` folders**. Do this by ensuring the `radarr_movies_directory:` and `radarr_download_directory` settings are correct. + +Radarr will get the file path from the Download client. On default settings with Transmission the path is `/storage/downloads/complete`. You will need to create a path mapping in the **Remote Path Mappings** settings under **Download Client** to point to your internal path that is by default `/downloads`. *If you have difficulties with the path mapping you could also just add a new volume path for the Transmission container and use `/downloads` as the download directory.* + +For Radarr to understand that the `/movies` folder is a folder, you'll need to add a new subfolder into it. +You can also do this by adding a random movie to the folder. Keep in mind to have the internal setting **Create empty movie folders** on **yes** + +Comprehensive setup information can be found on the [Radarr GitHub wiki](https://github.com/Radarr/Radarr/wiki/Setup-Guide) From 61d5479d0f047f35625ce9bd62fcab51f3a9d991 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:54:41 +0200 Subject: [PATCH 61/84] Duplicate website/docs/applications/system-tools/route53_ddns.md history in roles/route53_ddns/docs/ history. --- roles/route53_ddns/docs/route53_ddns.md | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 roles/route53_ddns/docs/route53_ddns.md diff --git a/roles/route53_ddns/docs/route53_ddns.md b/roles/route53_ddns/docs/route53_ddns.md new file mode 100644 index 00000000..4ac40099 --- /dev/null +++ b/roles/route53_ddns/docs/route53_ddns.md @@ -0,0 +1,42 @@ +--- +title: "AWS Route53 Dynamic DNS Updater" +--- + +ddns-route53: + +AWS Route53: + +If you want your Ansible-NAS accessible externally then you need a domain name. You will also need to set a wildcard host `A` record to point to your static IP, or enable this container to automatically update AWS Route53 with your dynamic IP address. + +## Usage + +Set `route53_ddns_enabled: true` in your `inventories//nas.yml` file. + +Set required AWS access credentials from the AWS Console. (See below.) + +## Specific Configuration + +Make sure you set your domain (if different than the `ansible-nas` default) and access details within your `inventories//nas.yml` file. + +To set up Route53 to work with the service, please review the [Prerequisites](https://crazymax.dev/ddns-route53/usage/prerequisites/) page. In short, you will need to set up a Route53 [Hosted Zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html), an [IAM Policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html), and an [IAM User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html) with API credentials. + +### AWS Access Credentials + +| Parameter | Description | Status | +|--------------------|-------------------|-----------| +| route53_key_id | AWS access key ID | mandatory | +| route53_secret_key | AWS secret key | mandatory | + +### Networking + +| Parameter | Description | Status | +|------------------------|--------------------------------|-----------| +| route53_hosted_zone_id | Route53 hosted zone ID | mandatory | +| route53_ttl | Time-to-live for the DNS entry | | +| route53_host | Wildcard domain to update | | + +### Application + +| Parameter | Description | Status | +|------------------|-----------------------------------------------------|-----------| +| route53_schedule | [CRON](https://pkg.go.dev/github.com/robfig/cron?utm_source=godoc#hdr-CRON_Expression_Format) schedule for checking and updating DNS entry | | From 039df5b991d874b19e3d959d3caa2f98ee877adb Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:55:05 +0200 Subject: [PATCH 62/84] Duplicate website/docs/applications/news/rssbridge.md history in roles/rssbridge/docs/ history. --- roles/rssbridge/docs/rssbridge.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/rssbridge/docs/rssbridge.md diff --git a/roles/rssbridge/docs/rssbridge.md b/roles/rssbridge/docs/rssbridge.md new file mode 100644 index 00000000..9ea01ba1 --- /dev/null +++ b/roles/rssbridge/docs/rssbridge.md @@ -0,0 +1,15 @@ +--- +title: "RSS-Bridge" +--- + +Homepage: + +RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one. It can be used on webservers or as a stand-alone application in CLI mode. + +Important: RSS-Bridge is not a feed reader or feed aggregator, but a tool to generate feeds that are consumed by feed readers and feed aggregators. + +## Usage + +Set `rssbridge_enabled: true` in your `inventories//nas.yml` file. + +The RSS-Bridge web interface can be found at . From c2d81b290ff6fc84031a8454f3f55c0ab15d0551 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:55:31 +0200 Subject: [PATCH 63/84] Duplicate website/docs/applications/download-tools/sabnzbd.md history in roles/sabnzbd/docs/ history. --- roles/sabnzbd/docs/sabnzbd.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/sabnzbd/docs/sabnzbd.md diff --git a/roles/sabnzbd/docs/sabnzbd.md b/roles/sabnzbd/docs/sabnzbd.md new file mode 100644 index 00000000..ddbd27d5 --- /dev/null +++ b/roles/sabnzbd/docs/sabnzbd.md @@ -0,0 +1,13 @@ +--- +title: "Sabnzbd" +--- + +Homepage: + +The time tested Usenet downloader provided with FreeNAS. It just works for those migrating from FreeNAS. + +## Usage + +Set `sabnzbd_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. + +The Sabnzbd web interface can be found at . Use this interface to configure the software upon first connection. From 1fd91e97ca0cbd62a01245ba1288890fc372190d Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:56:21 +0200 Subject: [PATCH 64/84] Duplicate website/docs/applications/download-tools/sonarr.md history in roles/sonarr/docs/ history. --- roles/sonarr/docs/sonarr.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 roles/sonarr/docs/sonarr.md diff --git a/roles/sonarr/docs/sonarr.md b/roles/sonarr/docs/sonarr.md new file mode 100644 index 00000000..0833ecb9 --- /dev/null +++ b/roles/sonarr/docs/sonarr.md @@ -0,0 +1,24 @@ +--- +title: "Sonarr" +--- + +Homepage: + +**Sonarr** is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows 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 `sonarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. + +The Sonarr web interface can be found at `http://ansible_nas_host_or_ip:8989` by default + +## Specific Configuration + +**First make sure Sonarr has permissions to write and read the `/download` and `/tv` folders**. Do this by ensuring the `sonarr_movies_directory:` and `sonarr_download_directory` settings are correct. + +Sonarr will get the file path from the Download client. On default settings with Transmission the path is `/storage/downloads/complete`. You will need to create a path mapping in the **Remote Path Mappings** settings under **Download Client** to point to your internal path that is by default `/downloads`. *If you have difficulties with the path mapping you could also just add a new volume path for the Transmission container and use `/downloads` as the download directory.* + +For Sonarr to understand that the `/tv` folder is a folder, you'll need to add a folder into it. +You can also do this by adding a random series to the folder. Keep in mind to have the setting **Create empty movie folders** on **yes** + +For comprehensive configuration instructions see the [Sonarr GitHub wiki](https://github.com/Sonarr/Sonarr/wiki) From a8ddd3f98040487270cb0b99733d136ce3070912 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:56:53 +0200 Subject: [PATCH 65/84] Duplicate website/docs/applications/monitoring/speedtest.md history in roles/speedtest-tracker/docs/ history. --- roles/speedtest-tracker/docs/speedtest.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/speedtest-tracker/docs/speedtest.md diff --git a/roles/speedtest-tracker/docs/speedtest.md b/roles/speedtest-tracker/docs/speedtest.md new file mode 100644 index 00000000..d9f82ad9 --- /dev/null +++ b/roles/speedtest-tracker/docs/speedtest.md @@ -0,0 +1,17 @@ +--- +title: "Speedtest-Tracker" +--- + +Homepage: + +Docker Container: + +Continuously track your internet speed + +## Usage + +Set `speedtest_tracker_enabled: true` in your `inventories//nas.yml` file. + +If you want to access Speedtest-Tracker externally, don't forget to set `speedtest_tracker_available_externally: true` in your `inventories//nas.yml` file. + +The Speedtest-Tracker interface can be found at . From 009b4d3ded881720c7b5e6bd07cb5ab6fc767276 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:57:29 +0200 Subject: [PATCH 66/84] Duplicate website/docs/applications/monitoring/stats.md history in roles/stats/docs/ history. --- roles/stats/docs/stats.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/stats/docs/stats.md diff --git a/roles/stats/docs/stats.md b/roles/stats/docs/stats.md new file mode 100644 index 00000000..1a92639a --- /dev/null +++ b/roles/stats/docs/stats.md @@ -0,0 +1,15 @@ +--- +title: "Stats" +--- + +The stats role uses Prometheus, Grafana, Telegraf and a number of metrics exporters to collect and record lots of metrics about your NAS. + +Telegraf also exposes an InfluxDB endpoint for applications that require it. + +## Usage + +Set `stats_enabled: true` in your `inventories//nas.yml` file. If you want to gather metrics on your internet connection, enable `stats_internet_speed_test_enabled` too. + +If you want to access Grafana externally, set `stats_grafana_available_externally: true` in your `inventories//nas.yml` file. If you want to access Promethehus externally, set `stats_prometheus_available_externally: true` in your `inventories//nas.yml` file. + +The Grafana web interface can be found at , Prometheus can be found at From 8a0c0fe764992f054ab990d74b6bcda6c3c7db1c Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:57:55 +0200 Subject: [PATCH 67/84] Duplicate website/docs/applications/system-tools/syncthing.md history in roles/syncthing/docs/ history. --- roles/syncthing/docs/syncthing.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 roles/syncthing/docs/syncthing.md diff --git a/roles/syncthing/docs/syncthing.md b/roles/syncthing/docs/syncthing.md new file mode 100644 index 00000000..83e882d0 --- /dev/null +++ b/roles/syncthing/docs/syncthing.md @@ -0,0 +1,29 @@ +--- +title: "Syncthing" +--- + +Homepage: + +Github: + +Docker: + +Syncthing is a continuous file synchronization program. It synchronizes files +between two or more computers. It strives to fulfill the goals below in summary. +Syncthing should be: + +1. Safe From Data Loss +2. Secure Against Attackers +3. Easy to Use +4. Automatic +5. Universally Available +6. For Individuals +7. For eveything else see the goals document + +## Usage + +Set `syncthing_enabled: true` in your `\inventories\[my inventory]\group_vars\nas.yml` file. + +## Specific Configuration + +Open the web interface at :8384 to configure. From 78213fa4577c7d921f5be9b4d64981bc23d57b39 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:58:19 +0200 Subject: [PATCH 68/84] Duplicate website/docs/applications/media-serving/tautulli.md history in roles/tautulli/docs/ history. --- roles/tautulli/docs/tautulli.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/tautulli/docs/tautulli.md diff --git a/roles/tautulli/docs/tautulli.md b/roles/tautulli/docs/tautulli.md new file mode 100644 index 00000000..a9876299 --- /dev/null +++ b/roles/tautulli/docs/tautulli.md @@ -0,0 +1,13 @@ +--- +title: "Tautulli" +--- + +Homepage: + +Tautulli allows you to monitor your Plex Media Server. + +## Usage + +Set `tautulli_enabled: true` in your `inventories//nas.yml` file. + +The Tautulli web interface can be found at . From e247f7c4569618093cfccca95562579e0ba3c9e2 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:58:44 +0200 Subject: [PATCH 69/84] Duplicate website/docs/applications/other/thelounge.md history in roles/thelounge/docs/ history. --- roles/thelounge/docs/thelounge.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/thelounge/docs/thelounge.md diff --git a/roles/thelounge/docs/thelounge.md b/roles/thelounge/docs/thelounge.md new file mode 100644 index 00000000..6292a700 --- /dev/null +++ b/roles/thelounge/docs/thelounge.md @@ -0,0 +1,17 @@ +--- +title: "The Lounge" +--- + +Homepage: + +The Lounge is a self-hosted web IRC client. + +## Usage + +Set `thelounge_enabled: true` in your `inventories//nas.yml` file. + +The Lounge web interface can be found at . + +## Specific Configuration + +The default username and password is `admin`. Change this once you've logged in! From 959d1579d0230eae72dd70810e98e7240376f8db Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:59:08 +0200 Subject: [PATCH 70/84] Duplicate website/docs/applications/content-management/tiddlywiki.md history in roles/tiddlywiki/docs/ history. --- roles/tiddlywiki/docs/tiddlywiki.md | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 roles/tiddlywiki/docs/tiddlywiki.md diff --git a/roles/tiddlywiki/docs/tiddlywiki.md b/roles/tiddlywiki/docs/tiddlywiki.md new file mode 100644 index 00000000..be0344b2 --- /dev/null +++ b/roles/tiddlywiki/docs/tiddlywiki.md @@ -0,0 +1,37 @@ +--- +title: "TiddlyWiki" +description: "A notebook for capturing, organizing, and sharing information" +--- + +Homepage: + +TiddlyWiki is a unique non-linear notebook for capturing, organizing, and sharing complex information. Use it to keep your to-do list, to plan an essay or novel, or to organise your wedding. Record every thought that crosses your brain, or build a flexible and responsive website. Unlike conventional online services, TiddlyWiki lets you choose where to keep your data, guaranteeing that in the decades to come you will still be able to use the notes you take today. + +## Usage + +Set `tiddlywiki_enabled: true` in your `inventories//nas.yml` file. + +If you want to access TiddlyWiki externally, set `tiddlywiki_available_externally: true` in your `inventories//nas.yml` file. + +The TiddlyWiki web interface can be found at . + +## Specific Configuration + +The TiddlyWiki role has several configuration parameters. All parameters are optional. + +### Data and Networking + +| Parameter | Description | +|---------------------------|-------------------------------| +| tiddlywiki_data_directory | Host location to store data | +| tiddlywiki_port | Host port for internal access | +| tiddlywiki_hostname | Subdomain for external access | + +### Server Configuration + +| Parameter | Description | +|------------------------|--------------------------| +| tiddlywiki_username | Basic Auth username | +| tiddlywiki_password | Basic Auth password | +| tiddlywiki_node_memory | NodeJS memory allocation | +| tiddlywiki_debug_level | Service debugging | From 22a2499858e818bb9005ee1613f0dfffe531e84d Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 13:59:38 +0200 Subject: [PATCH 71/84] Duplicate website/docs/applications/system-tools/timemachine.md history in roles/timemachine/docs/ history. --- roles/timemachine/docs/timemachine.md | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 roles/timemachine/docs/timemachine.md diff --git a/roles/timemachine/docs/timemachine.md b/roles/timemachine/docs/timemachine.md new file mode 100644 index 00000000..2589ebe8 --- /dev/null +++ b/roles/timemachine/docs/timemachine.md @@ -0,0 +1,30 @@ +--- +title: "Time Machine" +--- + +Apple docs: + +Docker image: + +Time Machine is an application that allows you to backup files from your Mac. + +Older versions of Time Machine relied on AFP (netatalk) shares. Apple has deprecated Time Machine over AFP in favor of SMB (Samba), and current versions of Ansible-NAS use a Samba-based Time Machine share. If you are upgrading from an older version of Ansible-NAS, you will need to re-select your Time Machine back up disk by opening Time Machine Preferences and Selecting your backup disk via the "Select Disk..." option. Your Mac will find the old backups on the share and use them. + +## Usage + +Set `timemachine_enabled: true` in your `inventories//nas.yml` file. + +Enabling Time Machine will result in the installation of Avahi on the NAS system (if it is not already installed) and a Time Machine service configuration file for Avahi will be added to the system (at `/etc/avahi/services/timemachine.service`) to allow for Time Machine discovery by Macs on the local network. Avahi runs on the system, rather than in a container, as the same Avahi instance can be used to announce any number of services. + +The Samba server included in the Time Machine docker container logs to `STDOUT` and is compatible with [Docker's built-in logging infrastructure.](https://docs.docker.com/config/containers/logging/) + +## Specific Configuration + +- `timemachine_data_directory`: The absolute path on Ansible NAS where the backup files will be stored +- `timemachine_volume_size_limit`: The maximum amount of space Time Machine can use for the backups in units of MiB. Set it to 0 for no limit. +- `timemachine_share_name`: The name of the share as it will appear in the Time Machine application. Default is 'Data' +- `timemachine_password`: The password used to access the share. Default is 'timemachine' + +## Upgrading from AFP to SMB-based Time Machine + +Older versions of Time Machine included in Ansible-NAS relied on AFP (netatalk) shares. Apple has deprecated Time Machine over AFP in favor of SMB (Samba), and current versions of Ansible-NAS use a Samba-based Time Machine share. If you are upgrading from an older version of Ansible-NAS with the AFP-based Time Machine, you will need to re-select your Time Machine back up disk by opening Time Machine Preferences and Selecting your backup disk via the "Select Disk..." option. Your Mac will find the old backups on the share and use them. From c67899b599e947de400320caa92b8bad17420839 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 14:00:12 +0200 Subject: [PATCH 72/84] Duplicate website/docs/applications/other/traefik.md history in roles/traefik/docs/ history. --- roles/traefik/docs/traefik.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 roles/traefik/docs/traefik.md diff --git a/roles/traefik/docs/traefik.md b/roles/traefik/docs/traefik.md new file mode 100644 index 00000000..439d01ae --- /dev/null +++ b/roles/traefik/docs/traefik.md @@ -0,0 +1,22 @@ +--- +title: "Traefik" +--- + +Homepage: + +Traefik is a reverse proxy used to provide external access to your Ansible-NAS box. Additionally, Traefik will automatically request and renew SSL certificates for you. + +You can configure which applications are available externally by enabling the `_available_externally` setting +for each application in the Advanced Settings section of your `all.yml`. + +See [External Access](../../getting-started/external-access.md) for more info. + +## Usage + +Set `traefik_enabled: true` in your `inventories//nas.yml` file. + +Traefik's web interface can be found at . + +## Specific Configuration + +You'll need to map port 80 and 443 from your router to your Ansible-NAS box. A quick search should reveal instruction for your model of router. From ec3e903cbd4b585bfa987882ef393518a500dfc4 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 14:00:38 +0200 Subject: [PATCH 73/84] Duplicate website/docs/applications/download-tools/transmission.md history in roles/transmission/docs/ history. --- roles/transmission/docs/transmission.md | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 roles/transmission/docs/transmission.md diff --git a/roles/transmission/docs/transmission.md b/roles/transmission/docs/transmission.md new file mode 100644 index 00000000..e29ce9c4 --- /dev/null +++ b/roles/transmission/docs/transmission.md @@ -0,0 +1,27 @@ +--- +title: "Transmission" +--- + +Homepage: + +Transmission is a free BitTorrent client. Two versions are provided - one that tunnels through OpenVPN and one that connects +directly. + +## Usage + +Set `transmission_enabled: true`, or `transmission_with_openvpn_enabled: true` in your `inventories//nas.yml` file. + +Transmission's web interface can be found at (with OpenVPN) or (without OpenVPN). + +## Specific Configuration + +If you enable Transmission with OpenVPN, you'll need to add the following to your inventory `all.yml`: + +```yaml +openvpn_username: super_secret_username +openvpn_password: super_secret_password +openvpn_provider: NORDVPN +openvpn_config: uk686.nordvpn.com.udp +``` + +See for supported VPN providers. From 2d5b83af443859204ee729ec32701079cb860f12 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 14:00:59 +0200 Subject: [PATCH 74/84] Duplicate website/docs/applications/download-tools/transmission.md history in roles/transmission-with-openvpn/docs/ history. --- .../docs/transmission.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 roles/transmission-with-openvpn/docs/transmission.md diff --git a/roles/transmission-with-openvpn/docs/transmission.md b/roles/transmission-with-openvpn/docs/transmission.md new file mode 100644 index 00000000..e29ce9c4 --- /dev/null +++ b/roles/transmission-with-openvpn/docs/transmission.md @@ -0,0 +1,27 @@ +--- +title: "Transmission" +--- + +Homepage: + +Transmission is a free BitTorrent client. Two versions are provided - one that tunnels through OpenVPN and one that connects +directly. + +## Usage + +Set `transmission_enabled: true`, or `transmission_with_openvpn_enabled: true` in your `inventories//nas.yml` file. + +Transmission's web interface can be found at (with OpenVPN) or (without OpenVPN). + +## Specific Configuration + +If you enable Transmission with OpenVPN, you'll need to add the following to your inventory `all.yml`: + +```yaml +openvpn_username: super_secret_username +openvpn_password: super_secret_password +openvpn_provider: NORDVPN +openvpn_config: uk686.nordvpn.com.udp +``` + +See for supported VPN providers. From a0e053b0b2e206130cfc1b32649bb6ffa9bfe7ba Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 14:01:27 +0200 Subject: [PATCH 75/84] Duplicate website/docs/applications/media-serving/ubooquity.md history in roles/ubooquity/docs/ history. --- roles/ubooquity/docs/ubooquity.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 roles/ubooquity/docs/ubooquity.md diff --git a/roles/ubooquity/docs/ubooquity.md b/roles/ubooquity/docs/ubooquity.md new file mode 100644 index 00000000..1dea7806 --- /dev/null +++ b/roles/ubooquity/docs/ubooquity.md @@ -0,0 +1,27 @@ +--- +title: "Ubooquity" +--- + +Homepage: + +Documentation: + +Docker Image: + +Ubooquity is a free, lightweight and easy-to-use home server for your comics and ebooks. Use it to access your files from anywhere, with a tablet, an e-reader, a phone or a computer. + +## Usage + +Set `ubooquity_enabled: true` in your `inventories//nas.yml` file. + +Access the webui at by default. See specific configuration section below for information on setting up external access. + +## Specific Configuration + +Important note: if you want to access Ubooquity externally through Traefik (at ubooquity.yourdomain.tld), you need to go to and set the reverse proxy prefix to blank under "Advanced". Otherwise you will need to append "/ubooquity" to the url in order to access. + +### Admin login + +The admin portal is not exposed through Traefik. You can access the admin portal on port 2203. + +Upon your first run, the address is . You will be able to set the admin password here. From 7cd5c334dee22b5d213ef9f38fa712aab112461f Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 14:13:32 +0200 Subject: [PATCH 76/84] Duplicate website/docs/applications/download-tools/utorrent.md history in roles/utorrent/docs/ history. --- roles/utorrent/docs/utorrent.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/utorrent/docs/utorrent.md diff --git a/roles/utorrent/docs/utorrent.md b/roles/utorrent/docs/utorrent.md new file mode 100644 index 00000000..c62bab8c --- /dev/null +++ b/roles/utorrent/docs/utorrent.md @@ -0,0 +1,17 @@ +--- +title: "uTorrent" +--- + +Homepage: +Docker Container: + +## Usage + +Set `utorrent_enabled: true` in your `inventories//nas.yml` file. + +If you want to access uTorrent externally, don't forget to set `utorrent_available_externally: true` in your `inventories//nas.yml` file. + +The uTorrent web interface can be found at : + +- Username: admin +- Password: *leave blank* From 1ef3a230d264d1433aead615ec99420501b06c6c Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 14:13:59 +0200 Subject: [PATCH 77/84] Duplicate website/docs/applications/other/virtual_desktop.md history in roles/virtual_desktop/docs/ history. --- roles/virtual_desktop/docs/virtual_desktop.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 roles/virtual_desktop/docs/virtual_desktop.md diff --git a/roles/virtual_desktop/docs/virtual_desktop.md b/roles/virtual_desktop/docs/virtual_desktop.md new file mode 100644 index 00000000..4ff7bec8 --- /dev/null +++ b/roles/virtual_desktop/docs/virtual_desktop.md @@ -0,0 +1,32 @@ +--- +title: "Virtual Desktop" +--- + +It's possible to run a cut down desktop within a Docker container. We use [RattyDAVE's custom Ubuntu Mate image](https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom). + +## Usage + +Set `virtual_desktop_enabled: true` in your `inventories//nas.yml` file. + +## Specific Configuration + +By default `ansible_nas_user` will be granted access with a password of `topsecret` with sudo rights. To change or add additional users override `vd_users` in your `nas.yml`: + +```yaml +vd_users: + - username: "{{ ansible_nas_user }}" + password: "topsecret" + sudo: "Y" + - username: "larrylaffer" + password: "kensentme" + sudo: "Y" +``` + +## Mounts + +`samba_shares_root` is mounted to `/samba`. +`docker_home` is mounted to `/docker`. + +## Remote Access + +It's possible to access your virtual desktop through a web browser! Check out [Guacamole](guacamole.md). From 725477b576095872d6b60a561df7a9ee60cbb950 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 14:17:27 +0200 Subject: [PATCH 78/84] Duplicate website/docs/applications/other/wallabag.md history in roles/wallabag/docs/ history. --- roles/wallabag/docs/wallabag.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 roles/wallabag/docs/wallabag.md diff --git a/roles/wallabag/docs/wallabag.md b/roles/wallabag/docs/wallabag.md new file mode 100644 index 00000000..84bb4b95 --- /dev/null +++ b/roles/wallabag/docs/wallabag.md @@ -0,0 +1,19 @@ +--- +title: "Wallabag" +--- + +Homepage: + +wallabag is a self-hostable PHP application allowing you to not miss any content anymore. Click, save and read it when you can. It extracts content so that you can read it when you have time. + +## Usage + +Set `wallabag_enabled: true` in your `inventories//nas.yml` file. + +If you want to access wallabag externally, don't forget to set `wallabag_available_externally: true` in your `inventories//nas.yml` file. + +I recommend using the mobile app, which will sync with this installation so you have access to your saved articles even if you don't have signal or wifi access. + +The default credentials are wallabag:wallabag + +The wallabag web interface can be found at . From dd0cb5941c7b52ba7e3f01786780e0dfeb0b8f64 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 14:17:52 +0200 Subject: [PATCH 79/84] Duplicate website/docs/applications/system-tools/watchtower.md history in roles/watchtower/docs/ history. --- roles/watchtower/docs/watchtower.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/watchtower/docs/watchtower.md diff --git a/roles/watchtower/docs/watchtower.md b/roles/watchtower/docs/watchtower.md new file mode 100644 index 00000000..31e1fa2e --- /dev/null +++ b/roles/watchtower/docs/watchtower.md @@ -0,0 +1,17 @@ +--- +title: "Watchtower" +--- + +Homepage: + +A process for watching your Docker containers and automatically updating and restarting them whenever their base image is refreshed. + +## Usage + +Set `watchtower_enabled: true` in your `inventories//nas.yml` file. + +## Specific Configuration + +By default Watchtower is configured to check daily at 5am for updates. + +Various notification options are available, and can be configured by updating `watchtower_command` in your `inventories//nas.yml` file. A few examples are provided. The full set of options can be found at the [Watchtower GitHub project page](https://github.com/v2tec/watchtower). From 2662641277c7880d1303f5b2ef5a951c71724c6b Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 14:18:19 +0200 Subject: [PATCH 80/84] Duplicate website/docs/applications/monitoring/wireshark.md history in roles/wireshark/docs/ history. --- roles/wireshark/docs/wireshark.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/wireshark/docs/wireshark.md diff --git a/roles/wireshark/docs/wireshark.md b/roles/wireshark/docs/wireshark.md new file mode 100644 index 00000000..689853d7 --- /dev/null +++ b/roles/wireshark/docs/wireshark.md @@ -0,0 +1,13 @@ +--- +title: "Wireshark" +--- + +Homepage: + +Wireshark is the world’s foremost and widely-used network protocol analyzer. It lets you see what’s happening on your network at a microscopic level and is the de facto (and often de jure) standard across many commercial and non-profit enterprises, government agencies, and educational institutions. Wireshark development thrives thanks to the volunteer contributions of networking experts around the globe and is the continuation of a project started by Gerald Combs in 1998. + +## Usage + +Set `wireshark_enabled: true` in your `inventories//nas.yml` file. + +The Wireshark web interface can be found at . From cad799dea014b590b0624661092a64b4ea80d5a6 Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 14:18:46 +0200 Subject: [PATCH 81/84] Duplicate website/docs/applications/development-tools/woodpecker_ci.md history in roles/woodpecker-ci/docs/ history. --- roles/woodpecker-ci/docs/woodpecker_ci.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 roles/woodpecker-ci/docs/woodpecker_ci.md diff --git a/roles/woodpecker-ci/docs/woodpecker_ci.md b/roles/woodpecker-ci/docs/woodpecker_ci.md new file mode 100644 index 00000000..50208319 --- /dev/null +++ b/roles/woodpecker-ci/docs/woodpecker_ci.md @@ -0,0 +1,19 @@ +--- +title: "Woodpecker CI" +--- + +Woodpecker is a simple CI engine with great extensibility. + +Check it out at . + +## Usage + +Set `woodpecker_ci_enabled: true` in your `inventories//nas.yml` file. + +Gitea (`gitea_enabled: true`) must be set up and running before attempting to set up Woodpecker CI. + +## Setup Tasks + +An Oauth2 application must be set up in Gitea. Visit for more info, then set `woodpecker_ci_gitea_client` and `woodpecker_ci_gitea_secret` accordingly. + +Set `woodpecker_ci_admin_user` to the same username as your user in Gitea. From d039d1e16fd6f724732b9955a375d5ae3642cb2c Mon Sep 17 00:00:00 2001 From: Anarion Dunedain Date: Tue, 28 Mar 2023 14:19:11 +0200 Subject: [PATCH 82/84] Duplicate website/docs/applications/download-tools/youtubedlmaterial.md history in roles/youtubedlmaterial/docs/ history. --- .../docs/youtubedlmaterial.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 roles/youtubedlmaterial/docs/youtubedlmaterial.md diff --git a/roles/youtubedlmaterial/docs/youtubedlmaterial.md b/roles/youtubedlmaterial/docs/youtubedlmaterial.md new file mode 100644 index 00000000..5065be1e --- /dev/null +++ b/roles/youtubedlmaterial/docs/youtubedlmaterial.md @@ -0,0 +1,19 @@ +--- +title: "YouTubeDL-Material" +--- + +Homepage: +Docker Container: + +YoutubeDL-Material is a Material Design frontend for youtube-dl. It's coded using Angular 9 for the frontend, and Node.js on the backend. + +## Usage + +Set `youtubedlmaterial_enabled: true` in your `inventories//nas.yml` file. + +The YouTubeDL-Material web interface can be found at . + +## Specific Configuration + +A YouTube directory will be created in your configured downloads spot. YouTubeDL-Material downloads will be placed there. +You can change the download location via `inventories//nas.yml` file. From c4ab198ead092dcd7486c39aa373954c639b6a29 Mon Sep 17 00:00:00 2001 From: Anarion Date: Tue, 28 Mar 2023 17:15:40 +0200 Subject: [PATCH 83/84] =?UTF-8?q?=F0=9F=93=9D=20Add=204=20missing=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/get_iplayer/docs/get_iplayer.md | 11 +++++++++++ roles/netdata/docs/netdata.md | 11 +++++++++++ roles/sickchill/docs/sickchill.md | 12 ++++++++++++ roles/znc/docs/znc.md | 11 +++++++++++ 4 files changed, 45 insertions(+) create mode 100644 roles/get_iplayer/docs/get_iplayer.md create mode 100644 roles/netdata/docs/netdata.md create mode 100644 roles/sickchill/docs/sickchill.md create mode 100644 roles/znc/docs/znc.md diff --git a/roles/get_iplayer/docs/get_iplayer.md b/roles/get_iplayer/docs/get_iplayer.md new file mode 100644 index 00000000..48173c24 --- /dev/null +++ b/roles/get_iplayer/docs/get_iplayer.md @@ -0,0 +1,11 @@ +# Get_iPlayer + +Homepage: + +Downloads TV and radio programmes from BBC iPlayer. + +## Usage + +Set `get_iplayer_enabled: true` in your `inventories//nas.yml` file. + +The get_iplayer web interface can be found at . diff --git a/roles/netdata/docs/netdata.md b/roles/netdata/docs/netdata.md new file mode 100644 index 00000000..e8ef6884 --- /dev/null +++ b/roles/netdata/docs/netdata.md @@ -0,0 +1,11 @@ +# Netdata + +Homepage: + +An extremely comprehensive system monitoring solution. + +## Usage + +Set `netdata_enabled: true` in your `inventories//nas.yml` file. + +Netdata web interface can be found at . diff --git a/roles/sickchill/docs/sickchill.md b/roles/sickchill/docs/sickchill.md new file mode 100644 index 00000000..8fe2b75a --- /dev/null +++ b/roles/sickchill/docs/sickchill.md @@ -0,0 +1,12 @@ +# Sickchill + +Homepage: [Sickchill](https://sickchill.github.io/) + +SickChill is an automatic Video Library Manager for TV Shows. +It watches for new episodes of your favorite shows, and when they are posted it does its magic: automatic torrent/nzb searching, downloading, and processing at the qualities you want. + +## Usage + +Set `sickchill_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. + +The sickchill web interface can be found at `http://ansible_nas_host_or_ip:8081` by default diff --git a/roles/znc/docs/znc.md b/roles/znc/docs/znc.md new file mode 100644 index 00000000..bbcb5b54 --- /dev/null +++ b/roles/znc/docs/znc.md @@ -0,0 +1,11 @@ +# Znc + +Homepage: + +ZNC is an IRC network bouncer or BNC. It can detach the client from the actual IRC server, and also from selected channels. Multiple clients from different locations can connect to a single ZNC account simultaneously and therefore appear under the same nickname on IRC. It supports Transport Layer Security connections and IPv6. + +## Usage + +Set `znc_enabled: true` in your `inventories//nas.yml` file. Edit `znc_*` variables to suit your needs. For more advanced needs, edit the template config file (`templates\znc.conf.j2`) directly. + +Connect to ZNC using IRC at ansible_nas_host_or_ip:6677. From 1c11b89076f724c3ed9cd61751454af0b2efc313 Mon Sep 17 00:00:00 2001 From: Anarion Date: Mon, 10 Apr 2023 10:39:43 +0200 Subject: [PATCH 84/84] =?UTF-8?q?=F0=9F=93=9D=20Remove=20individual=20docs?= =?UTF-8?q?=20folders?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/freshrss/docs/freshrss.md | 23 ------- roles/get_iplayer/docs/get_iplayer.md | 11 --- roles/gitea/docs/gitea.md | 13 ---- roles/gitlab/docs/gitlab.md | 15 ----- roles/glances/docs/glances.md | 17 ----- roles/gotify/docs/gotify.md | 18 ----- roles/guacamole/docs/guacamole.md | 19 ------ roles/healthchecks.io/docs/healthchecks.io.md | 13 ---- roles/heimdall/docs/heimdall.md | 17 ----- roles/homeassistant/docs/homeassistant.md | 15 ----- roles/homebridge/docs/homebridge.md | 13 ---- roles/jackett/docs/jackett.md | 13 ---- roles/jellyfin/docs/jellyfin.md | 67 ------------------- roles/joomla/docs/joomla.md | 26 ------- roles/komga/docs/komga.md | 15 ----- roles/krusader/docs/krusader.md | 15 ----- roles/lidarr/docs/lidarr.md | 11 --- roles/mealie/docs/mealie.md | 13 ---- .../minecraft-server/docs/minecraft-server.md | 15 ----- roles/minidlna/docs/minidlna.md | 13 ---- roles/miniflux/docs/miniflux.md | 15 ----- roles/mosquitto/docs/mosquitto.md | 11 --- roles/mylar/docs/mylar.md | 17 ----- roles/mymediaforalexa/docs/mymediaforalexa.md | 13 ---- roles/n8n/docs/n8n.md | 20 ------ roles/navidrome/docs/navidrome.md | 13 ---- roles/netbootxyz/docs/netbootxyz.md | 17 ----- roles/netdata/docs/netdata.md | 11 --- roles/nextcloud/docs/nextcloud.md | 27 -------- roles/nomad/docs/nomad.md | 13 ---- roles/nzbget/docs/nzbget.md | 13 ---- roles/octoprint/docs/octoprint.md | 12 ---- roles/ombi/docs/ombi.md | 11 --- roles/openhab/docs/openhab.md | 17 ----- roles/organizr/docs/organizr.md | 17 ----- roles/overseerr/docs/overseerr.md | 15 ----- roles/paperless_ng/docs/paperless_ng.md | 25 ------- roles/piwigo/docs/piwigo.md | 30 --------- roles/plex/docs/plex.md | 18 ----- roles/portainer/docs/portainer.md | 11 --- roles/prowlarr/docs/prowlarr.md | 17 ----- roles/pyload/docs/pyload.md | 18 ----- roles/pytivo/docs/pytivo.md | 32 --------- roles/radarr/docs/radarr.md | 24 ------- roles/route53_ddns/docs/route53_ddns.md | 42 ------------ roles/rssbridge/docs/rssbridge.md | 15 ----- roles/sabnzbd/docs/sabnzbd.md | 13 ---- roles/sickchill/docs/sickchill.md | 12 ---- roles/sonarr/docs/sonarr.md | 24 ------- roles/speedtest-tracker/docs/speedtest.md | 17 ----- roles/stats/docs/stats.md | 15 ----- roles/syncthing/docs/syncthing.md | 29 -------- roles/tautulli/docs/tautulli.md | 13 ---- roles/thelounge/docs/thelounge.md | 17 ----- roles/tiddlywiki/docs/tiddlywiki.md | 37 ---------- roles/timemachine/docs/timemachine.md | 30 --------- roles/traefik/docs/traefik.md | 22 ------ .../docs/transmission.md | 27 -------- roles/transmission/docs/transmission.md | 27 -------- roles/ubooquity/docs/ubooquity.md | 27 -------- roles/utorrent/docs/utorrent.md | 17 ----- roles/virtual_desktop/docs/virtual_desktop.md | 32 --------- roles/wallabag/docs/wallabag.md | 19 ------ roles/watchtower/docs/watchtower.md | 17 ----- roles/wireshark/docs/wireshark.md | 13 ---- roles/woodpecker-ci/docs/woodpecker_ci.md | 19 ------ .../docs/youtubedlmaterial.md | 19 ------ roles/znc/docs/znc.md | 11 --- 68 files changed, 1293 deletions(-) delete mode 100644 roles/freshrss/docs/freshrss.md delete mode 100644 roles/get_iplayer/docs/get_iplayer.md delete mode 100644 roles/gitea/docs/gitea.md delete mode 100644 roles/gitlab/docs/gitlab.md delete mode 100644 roles/glances/docs/glances.md delete mode 100644 roles/gotify/docs/gotify.md delete mode 100644 roles/guacamole/docs/guacamole.md delete mode 100644 roles/healthchecks.io/docs/healthchecks.io.md delete mode 100644 roles/heimdall/docs/heimdall.md delete mode 100644 roles/homeassistant/docs/homeassistant.md delete mode 100644 roles/homebridge/docs/homebridge.md delete mode 100644 roles/jackett/docs/jackett.md delete mode 100644 roles/jellyfin/docs/jellyfin.md delete mode 100644 roles/joomla/docs/joomla.md delete mode 100644 roles/komga/docs/komga.md delete mode 100644 roles/krusader/docs/krusader.md delete mode 100644 roles/lidarr/docs/lidarr.md delete mode 100644 roles/mealie/docs/mealie.md delete mode 100644 roles/minecraft-server/docs/minecraft-server.md delete mode 100644 roles/minidlna/docs/minidlna.md delete mode 100644 roles/miniflux/docs/miniflux.md delete mode 100644 roles/mosquitto/docs/mosquitto.md delete mode 100644 roles/mylar/docs/mylar.md delete mode 100644 roles/mymediaforalexa/docs/mymediaforalexa.md delete mode 100644 roles/n8n/docs/n8n.md delete mode 100644 roles/navidrome/docs/navidrome.md delete mode 100644 roles/netbootxyz/docs/netbootxyz.md delete mode 100644 roles/netdata/docs/netdata.md delete mode 100644 roles/nextcloud/docs/nextcloud.md delete mode 100644 roles/nomad/docs/nomad.md delete mode 100644 roles/nzbget/docs/nzbget.md delete mode 100644 roles/octoprint/docs/octoprint.md delete mode 100644 roles/ombi/docs/ombi.md delete mode 100644 roles/openhab/docs/openhab.md delete mode 100644 roles/organizr/docs/organizr.md delete mode 100644 roles/overseerr/docs/overseerr.md delete mode 100644 roles/paperless_ng/docs/paperless_ng.md delete mode 100644 roles/piwigo/docs/piwigo.md delete mode 100644 roles/plex/docs/plex.md delete mode 100644 roles/portainer/docs/portainer.md delete mode 100644 roles/prowlarr/docs/prowlarr.md delete mode 100644 roles/pyload/docs/pyload.md delete mode 100644 roles/pytivo/docs/pytivo.md delete mode 100644 roles/radarr/docs/radarr.md delete mode 100644 roles/route53_ddns/docs/route53_ddns.md delete mode 100644 roles/rssbridge/docs/rssbridge.md delete mode 100644 roles/sabnzbd/docs/sabnzbd.md delete mode 100644 roles/sickchill/docs/sickchill.md delete mode 100644 roles/sonarr/docs/sonarr.md delete mode 100644 roles/speedtest-tracker/docs/speedtest.md delete mode 100644 roles/stats/docs/stats.md delete mode 100644 roles/syncthing/docs/syncthing.md delete mode 100644 roles/tautulli/docs/tautulli.md delete mode 100644 roles/thelounge/docs/thelounge.md delete mode 100644 roles/tiddlywiki/docs/tiddlywiki.md delete mode 100644 roles/timemachine/docs/timemachine.md delete mode 100644 roles/traefik/docs/traefik.md delete mode 100644 roles/transmission-with-openvpn/docs/transmission.md delete mode 100644 roles/transmission/docs/transmission.md delete mode 100644 roles/ubooquity/docs/ubooquity.md delete mode 100644 roles/utorrent/docs/utorrent.md delete mode 100644 roles/virtual_desktop/docs/virtual_desktop.md delete mode 100644 roles/wallabag/docs/wallabag.md delete mode 100644 roles/watchtower/docs/watchtower.md delete mode 100644 roles/wireshark/docs/wireshark.md delete mode 100644 roles/woodpecker-ci/docs/woodpecker_ci.md delete mode 100644 roles/youtubedlmaterial/docs/youtubedlmaterial.md delete mode 100644 roles/znc/docs/znc.md diff --git a/roles/freshrss/docs/freshrss.md b/roles/freshrss/docs/freshrss.md deleted file mode 100644 index b34b3d08..00000000 --- a/roles/freshrss/docs/freshrss.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "FreshRSS" ---- - -Homepage: - -FreshRSS is a self-hosted RSS feed aggregator like Leed or Kriss Feed. - -It is lightweight, easy to work with, powerful, and customizable. - -It is a multi-user application with an anonymous reading mode. It supports custom tags. There is an API for (mobile) clients, and a Command-Line Interface. - -Thanks to the WebSub standard (formerly PubSubHubbub), FreshRSS is able to receive instant push notifications from compatible sources, such as Mastodon, Friendica, WordPress, Blogger, FeedBurner, etc. - -FreshRSS natively supports basic Web scraping, based on XPath, for Web sites not providing any RSS / Atom feed. - -Finally, it supports extensions for further tuning. - -## Usage - -Set `freshrss_enabled: true` in your `inventories//nas.yml` file. - -The FreshRSS web interface can be found at . diff --git a/roles/get_iplayer/docs/get_iplayer.md b/roles/get_iplayer/docs/get_iplayer.md deleted file mode 100644 index 48173c24..00000000 --- a/roles/get_iplayer/docs/get_iplayer.md +++ /dev/null @@ -1,11 +0,0 @@ -# Get_iPlayer - -Homepage: - -Downloads TV and radio programmes from BBC iPlayer. - -## Usage - -Set `get_iplayer_enabled: true` in your `inventories//nas.yml` file. - -The get_iplayer web interface can be found at . diff --git a/roles/gitea/docs/gitea.md b/roles/gitea/docs/gitea.md deleted file mode 100644 index 46243420..00000000 --- a/roles/gitea/docs/gitea.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Gitea" ---- - -Homepage: - -Gitea is a painless self-hosted Git service. - -## Usage - -Set `gitea_enabled: true` in your `inventories//nas.yml` file. - -The Gitea web interface can be found at . diff --git a/roles/gitlab/docs/gitlab.md b/roles/gitlab/docs/gitlab.md deleted file mode 100644 index f5562d04..00000000 --- a/roles/gitlab/docs/gitlab.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "GitLab" ---- - -Homepage: - -If Gitea isn't powerful enough for you then consider GitLab. It's a much more powerful (and consequently bigger) Git repository solution that includes a suite of code analytics. On the other hand it requires more RAM. - -## Usage - -Set `gitlab_enabled: true` in your `inventories//nas.yml` file. - -To make GitLab available externally via Traefik set `gitlab_available_externally: true` in your `inventories//nas.yml` file. - -The first time you run GitLab you'll be prompted for an account's password. The password is for GitLab's `root` administrator account. From there you can log in to create additional users and further configure the application. diff --git a/roles/glances/docs/glances.md b/roles/glances/docs/glances.md deleted file mode 100644 index 89639696..00000000 --- a/roles/glances/docs/glances.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Glances" ---- - -Homepage: - -Glances is a cross-platform system monitoring tool written in Python. - -## Usage - -Set `glances_enabled: true` in your `inventories//nas.yml` file. - -The Glances web interface can be found at . - -## Specific Configuration - -Glances can be integrated with InfluxDB and Grafana. diff --git a/roles/gotify/docs/gotify.md b/roles/gotify/docs/gotify.md deleted file mode 100644 index 3e2e4267..00000000 --- a/roles/gotify/docs/gotify.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Gotify" ---- - -Homepage: - -A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui) - -## Usage - -Set `gotify_enabled: true` in your `inventories//nas.yml` file. - -The Gotify web interface can be found at . - -Android client: [https://play.google.com/store/apps/details?id=com.github.gotify](https://play.google.com/store/apps/details?id=com.github.gotify) -iOS client: n/a -Chrome extension: n/a -Firefox extension: diff --git a/roles/guacamole/docs/guacamole.md b/roles/guacamole/docs/guacamole.md deleted file mode 100644 index eb1fa811..00000000 --- a/roles/guacamole/docs/guacamole.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Guacamole" ---- - -Homepage: - -Apache Guacamole is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH. - -## Usage - -Set `guacamole_enabled: true` in your `inventories//nas.yml` file. - -## Specific Configuration - -The default username and password is `guacadmin`. Change it! - -## What to connect to? - -You can run a virtual desktop from your Ansible-NAS box, check out the [Virtual Desktop docs](virtual_desktop.md). diff --git a/roles/healthchecks.io/docs/healthchecks.io.md b/roles/healthchecks.io/docs/healthchecks.io.md deleted file mode 100644 index aadbcf94..00000000 --- a/roles/healthchecks.io/docs/healthchecks.io.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Healthchecks.io" ---- - -Homepage: - -A simple cronjob that uses `curl` to ping a given endpoint on the `healthchecks.io` servers. You can choose how often it should ping the endpoint, and what happens when it doesn't. Email/Slack/Telegram and many more services can be integrated. - -## Usage - -Create your own project on , and set both the time between pings and the grace time. Set your prefered integration such as email. - -Set `healthchecks_enabled: true` in your `inventories//nas.yml` file, and if your time between pings is different than the default `healthchecks_ping_minutes`, change it. Finally, set your ping url in the `healthchecks_url` variable. diff --git a/roles/heimdall/docs/heimdall.md b/roles/heimdall/docs/heimdall.md deleted file mode 100644 index 7b0b00c3..00000000 --- a/roles/heimdall/docs/heimdall.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Heimdall" ---- - -Homepage: - -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//nas.yml` file. - -The Heimdall web interface can be found at . - -## Specific Configuration - -Heimdall defaults to port 10080 - some browsers block this port. Override `heimdall_port_http` to move it somewhere else. diff --git a/roles/homeassistant/docs/homeassistant.md b/roles/homeassistant/docs/homeassistant.md deleted file mode 100644 index ac1bc59b..00000000 --- a/roles/homeassistant/docs/homeassistant.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Home Assistant" ---- - -Homepage: - -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//nas.yml` file. - -If you want to access Home Assistant externally, don't forget to set `homeassistant_available_externally: true` in your `inventories//nas.yml` file. - -The Home Assistant web interface can be found at . diff --git a/roles/homebridge/docs/homebridge.md b/roles/homebridge/docs/homebridge.md deleted file mode 100644 index 98c80ebc..00000000 --- a/roles/homebridge/docs/homebridge.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Homebridge" ---- - -Homepage: - -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//nas.yml` file. - -The Homebridge web interface can be found at . The default username and password is 'admin' - change this after your first login! diff --git a/roles/jackett/docs/jackett.md b/roles/jackett/docs/jackett.md deleted file mode 100644 index 866c1792..00000000 --- a/roles/jackett/docs/jackett.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Jackett" ---- - -Homepage: - -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//nas.yml` file. - -The Jackett web interface can be found at . diff --git a/roles/jellyfin/docs/jellyfin.md b/roles/jellyfin/docs/jellyfin.md deleted file mode 100644 index 939177de..00000000 --- a/roles/jellyfin/docs/jellyfin.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "Jellyfin" ---- - -Homepage: - -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//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. diff --git a/roles/joomla/docs/joomla.md b/roles/joomla/docs/joomla.md deleted file mode 100644 index e573f2f3..00000000 --- a/roles/joomla/docs/joomla.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "Joomla" -description: "An award-winning content management system" ---- - -Homepage: - -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//nas.yml` file. - -If you want to access Joomla externally, set `joomla_available_externally: true` in your `inventories//nas.yml` file. - -The Joomla web interface can be found at . - -## 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`. diff --git a/roles/komga/docs/komga.md b/roles/komga/docs/komga.md deleted file mode 100644 index 82b21acc..00000000 --- a/roles/komga/docs/komga.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Komga" ---- - -Homepage: - -Docker Image: - -Komga is a media server for your comics, mangas, BDs and magazines. - -## Usage - -Set `komga_enabled: true` in your `inventories//nas.yml` file. - -Access the webui at by default. diff --git a/roles/krusader/docs/krusader.md b/roles/krusader/docs/krusader.md deleted file mode 100644 index 4c3e147f..00000000 --- a/roles/krusader/docs/krusader.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Krusader" ---- - -Homepage: - -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//nas.yml` file. - -The Krusader web interface can be found at . diff --git a/roles/lidarr/docs/lidarr.md b/roles/lidarr/docs/lidarr.md deleted file mode 100644 index 32843d4a..00000000 --- a/roles/lidarr/docs/lidarr.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "Lidarr" ---- - -Homepage: - -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//nas.yml` file. diff --git a/roles/mealie/docs/mealie.md b/roles/mealie/docs/mealie.md deleted file mode 100644 index b001c10f..00000000 --- a/roles/mealie/docs/mealie.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Mealie" ---- - -Homepage: - -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//nas.yml` file. - -The Mealie web interface can be found at . diff --git a/roles/minecraft-server/docs/minecraft-server.md b/roles/minecraft-server/docs/minecraft-server.md deleted file mode 100644 index e9e4e4a8..00000000 --- a/roles/minecraft-server/docs/minecraft-server.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Minecraft Server" ---- - -Homepage: - -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//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. diff --git a/roles/minidlna/docs/minidlna.md b/roles/minidlna/docs/minidlna.md deleted file mode 100644 index f216795b..00000000 --- a/roles/minidlna/docs/minidlna.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "MiniDLNA" ---- - -Homepage: - -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//nas.yml` file. - -The very basic MiniDLNA web interface can be found at . diff --git a/roles/miniflux/docs/miniflux.md b/roles/miniflux/docs/miniflux.md deleted file mode 100644 index 92890158..00000000 --- a/roles/miniflux/docs/miniflux.md +++ /dev/null @@ -1,15 +0,0 @@ -# Miniflux - -Homepage: - -Miniflux is a minimalist and opinionated feed reader. - -## Usage - -Set `miniflux_enabled: true` in your `inventories//nas.yml` file. - -The Miniflux web interface can be found at , 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`. diff --git a/roles/mosquitto/docs/mosquitto.md b/roles/mosquitto/docs/mosquitto.md deleted file mode 100644 index 5fe0c9d6..00000000 --- a/roles/mosquitto/docs/mosquitto.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "Mosquitto" ---- - -Homepage: - -Mosquitto is a lightweight open source MQTT message broker. - -## Usage - -Set `mosquitto_enabled: true` in your `inventories//nas.yml` file. diff --git a/roles/mylar/docs/mylar.md b/roles/mylar/docs/mylar.md deleted file mode 100644 index 819183f1..00000000 --- a/roles/mylar/docs/mylar.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Mylar" ---- - -Homepage: - -Docker Container: - -An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents - -## Usage - -Set `mylar_enabled: true` in your `inventories//nas.yml` file. - -If you want to access Mylar externally, don't forget to set `mylar_available_externally: true` in your `inventories//nas.yml` file. - -The Mylar web interface can be found at . diff --git a/roles/mymediaforalexa/docs/mymediaforalexa.md b/roles/mymediaforalexa/docs/mymediaforalexa.md deleted file mode 100644 index 85b42f6d..00000000 --- a/roles/mymediaforalexa/docs/mymediaforalexa.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "My Media for Alexa" ---- - -Homepage: - -My Media lets you stream your music collection to your Amazon Echo or Amazon Dot without having to upload all your music collection to the Cloud. This keeps your music under your control. - -## Usage - -Set `mymediaforalexa_enabled: true` in your `inventories//nas.yml` file. - -The My Media for Alexa web interface can be found at . diff --git a/roles/n8n/docs/n8n.md b/roles/n8n/docs/n8n.md deleted file mode 100644 index c9651163..00000000 --- a/roles/n8n/docs/n8n.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: "Nodemation (n8n)" ---- - -Homepage: - -Extendable workflow automation tool that enables you to connect anything to everything. More pragrmatically, it helps you interconnect API with each other to build your own information / work flows. - -## Usage - -Set `n8n_enabled: true` in your `inventories//nas.yml` file. - -n8n is secured by default, he user and password can be set with: - -```yaml - n8n_basic_auth_user: "" - n8n_basic_auth_password: "" -``` - -The default for these is "n8n_user" and "n8n_change_me" respectively, it is recommended to change these. diff --git a/roles/navidrome/docs/navidrome.md b/roles/navidrome/docs/navidrome.md deleted file mode 100644 index 3e5380e2..00000000 --- a/roles/navidrome/docs/navidrome.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Navidrome" ---- - -Homepage: - -Navidrome is an open source web-based music collection server and streamer that is compatible with Subsonic/Airsonic. It gives you freedom to listen to your music collection from any browser or mobile device. It's like your personal Spotify! - -## Usage - -Set `navidrome_enabled: true` in your `inventories//nas.yml` file. - -The Navidrome web interface can be found at . diff --git a/roles/netbootxyz/docs/netbootxyz.md b/roles/netbootxyz/docs/netbootxyz.md deleted file mode 100644 index bca2bd5d..00000000 --- a/roles/netbootxyz/docs/netbootxyz.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "netboot.xyz" ---- - -Homepage: - -Docker Container: - -netboot.xyz is a way to PXE boot various operating system installers or utilities from one place within the BIOS without the need of having to go retrieve the media to run the tool. [iPXE](https://ipxe.org/) is used to provide a user friendly menu from within the BIOS that lets you easily choose the operating system you want along with any specific types of versions or bootable flags. - -You can remote attach the ISO to servers, set it up as a rescue option in Grub, or even set up your home network to boot to it by default so that it's always available. - -## Usage - -Set `netbootxyz_enabled: true` in your `inventories//nas.yml` file. - -The netbooxyz web interface can be found at . diff --git a/roles/netdata/docs/netdata.md b/roles/netdata/docs/netdata.md deleted file mode 100644 index e8ef6884..00000000 --- a/roles/netdata/docs/netdata.md +++ /dev/null @@ -1,11 +0,0 @@ -# Netdata - -Homepage: - -An extremely comprehensive system monitoring solution. - -## Usage - -Set `netdata_enabled: true` in your `inventories//nas.yml` file. - -Netdata web interface can be found at . diff --git a/roles/nextcloud/docs/nextcloud.md b/roles/nextcloud/docs/nextcloud.md deleted file mode 100644 index 5cc5b062..00000000 --- a/roles/nextcloud/docs/nextcloud.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Nextcloud" ---- - -Homepage: - -## Usage - -Set `nextcloud_enabled: true` in your `inventories//nas.yml` file. - -Tread carefully. - -External access may require that you manually configure your Fully Qualified Domain Name (FQDN) as a trusted domain within the application. There is an environment variable set up for this in the "nextcloud task" which will most likely make manual configuration unnecessary. If you get the following [screenshot](https://docs.nextcloud.com/server/14/admin_manual/installation/installation_wizard.html#trusted-domains) warning when trying to access nextcloud externally you'll need to manually set it up. - -This can be accomplished in two commands. - -```bash -# On the server where the docker containers are running -$ docker exec -it --user www-data nextcloud /bin/bash -$ php occ config:system:set trusted_domains INDEX_FOR_NEW_ENTRY_SEE_DOCS_LINK_BELOW --value=YOUR_FQDN_HERE --update-only -``` - -The above commands are documented in the administration guide for Nextcloud: - -* [set array values](https://docs.nextcloud.com/server/14/admin_manual/configuration_server/occ_command.html#setting-an-array-configuration-value) - -* [docker container docs, references environment variables](https://github.com/nextcloud/docker) diff --git a/roles/nomad/docs/nomad.md b/roles/nomad/docs/nomad.md deleted file mode 100644 index 08389d11..00000000 --- a/roles/nomad/docs/nomad.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Nomad" ---- - -Homepage: - -A simple and flexible scheduler and orchestrator to deploy and manage containers and non-containerised applications across on-prem and clouds at scale. - -## Usage - -Set `nomad_enabled: true` in your `inventories//nas.yml` file. - -Nomad's web interface can be found at diff --git a/roles/nzbget/docs/nzbget.md b/roles/nzbget/docs/nzbget.md deleted file mode 100644 index 1e81efb5..00000000 --- a/roles/nzbget/docs/nzbget.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "NZBGet" ---- - -Homepage: - -The most efficient Usenet downloader. NZBGet is written in C++ and designed with performance in mind to achieve maximum download speed by using very little system resources. - -## Usage - -Set `nzbget_enabled: true` in your `inventories//nas.yml` file. - -The NZBget web interface can be found at , the default username is `nzbget` and password `tegbzn6789`. Change this once you've logged in! diff --git a/roles/octoprint/docs/octoprint.md b/roles/octoprint/docs/octoprint.md deleted file mode 100644 index 1d5b8c41..00000000 --- a/roles/octoprint/docs/octoprint.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "Octoprint" ---- -Homepage: - -Octoprint is a control and monitoring application for your 3D printer. You can start and stop print jobs, view your webcam feed, move the print head and extruder manually and check your gcode files, all from a single web interface. Octoprint doesn't require modifications on the printer firmware, just make sure your NAS is phisically connected to it with a usb cable. - -## Usage - -Connect the printer to your NAS, and take note of where the serial interface is mounted (usually it's automounted in `/dev/ttyUSB0`). Set `octoprint_enabled: true` in your `inventories//nas.yml` file, as well as the `octoprint_printer_mountpoint` variable if your printer doesn't mount to the default location. - -If you want to also have a webcam feed, attach one to your NAS and take note of its mountpoint as well (usually `/dev/video0`). Set `octoprint_enable_webcam: true` and add a `octoprint_webcam_mountpoint` variable if the webcam doesn't mount to the default location. diff --git a/roles/ombi/docs/ombi.md b/roles/ombi/docs/ombi.md deleted file mode 100644 index c13076c2..00000000 --- a/roles/ombi/docs/ombi.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "Ombi" ---- - -Homepage: - -Ombi is a self-hosted web application that automatically gives your shared Plex or Emby users the ability to request content by themselves! Ombi can be linked to multiple TV Show and Movie DVR tools to create a seamless end-to-end experience for your users. - -## Usage - -Set `ombi_enabled: true` in your `inventories//nas.yml` file. diff --git a/roles/openhab/docs/openhab.md b/roles/openhab/docs/openhab.md deleted file mode 100644 index 47a60422..00000000 --- a/roles/openhab/docs/openhab.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "openHAB" ---- - -Homepage: - -OpenHab is a vendor and technology agnostic open source automation software for your home. -It allows you to connect many different IoT-Devices (which in this case means "Intranet of Things") using custom bindings made by the community. - -## Usage - -Set `openhab_enabled: true` in your `inventories//nas.yml` file. - -## Specific Configuration - -The openHAB Webinterface is available at port 7777 (HTTP) and 7778 (HTTPS). -Visit the webinterface and follow the setup instructions found in the [openHAB Documentation](https://www.openhab.org/docs/tutorial/1sttimesetup.html) diff --git a/roles/organizr/docs/organizr.md b/roles/organizr/docs/organizr.md deleted file mode 100644 index 3fb1b3cd..00000000 --- a/roles/organizr/docs/organizr.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Organizr" ---- - -Homepage: - -ORGANIZR aims to be your one stop shop for your Servers Frontend. - -Do you have quite a bit of services running on your computer or server? Do you have a lot of bookmarks or have to memor$ - -TODO: finish this truncated description - -## Usage - -Set `organizr_enabled: true` in your `inventories//nas.yml` file. - -The Organizr web interface can be found at . diff --git a/roles/overseerr/docs/overseerr.md b/roles/overseerr/docs/overseerr.md deleted file mode 100644 index d754a829..00000000 --- a/roles/overseerr/docs/overseerr.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Overseerr" ---- - - Homepage: - - Docker Container: - - Overseerr is a free and open source software application for managing requests for your media library. It integrates with your existing services, such as Sonarr, Radarr, and Plex! - -## Usage - - Using overseerr: Set `overseerr_enabled: true` in your `inventories//nas.yml` file. - - The overseerr web interface can be found at . diff --git a/roles/paperless_ng/docs/paperless_ng.md b/roles/paperless_ng/docs/paperless_ng.md deleted file mode 100644 index 651a01ad..00000000 --- a/roles/paperless_ng/docs/paperless_ng.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: "Paperless-ng" ---- - -Homepage: - -Paperless is an application by Daniel Quinn and contributors that indexes your scanned documents and allows you to easily search for documents and store metadata alongside your documents. - -Paperless-ng is a fork of the original project, adding a new interface and many other changes under the hood - -## Usage - -Set `paperless_ng_enabled: true` in your `inventories//nas.yml` file. - -The paperless-ng web interface can be found at . - -### Create the superuser - -To be able to login, you will need a super user. To create it, execute the following command: - -```bash -docker exec -it paperless_ng_uiserver python manage.py createsuperuser -``` - -This will prompt you to set a username, an optional e-mail address and finally a password (at least 8 characters). diff --git a/roles/piwigo/docs/piwigo.md b/roles/piwigo/docs/piwigo.md deleted file mode 100644 index f6760f8d..00000000 --- a/roles/piwigo/docs/piwigo.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "Piwigo" ---- - -Homepage: [Piwigo.org](https://piwigo.org) - -Piwigo is open source photo gallery software for the web. Designed for organisations, teams and individuals. - -## Usage - -Set `piwigo_enabled: true` in your `inventories//nas.yml` file. - -If you want to access Piwigo externally, set `piwigo_available_externally: true` in your `inventories//nas.yml` file. - -The Piwigo web interface can be found at . - -## Specific Configuration - -Optional configurations: - -- Set `piwigo_mysql_user` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". -- Set `piwigo_mysql_password` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". -- Set `piwigo_mysql_root_password` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". - -- On first run you'll need to enter database details: - - Host: `db:3306` - - Username: the value of piwigo_mysql_user, defaults to "piwigo" - - Password: the value of piwigo_password, defaults to "piwigo" - - Database Name: `piwigo` - - Database tables prefix: should be prefilled with `piwigo_` diff --git a/roles/plex/docs/plex.md b/roles/plex/docs/plex.md deleted file mode 100644 index 8fb78902..00000000 --- a/roles/plex/docs/plex.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Plex" ---- - -Homepage: - -Plex is a personal media server that also provides access to several external movie, web show, and podcast services. Allows you to stream music too. Apps for many devices, including e.g. chromecast integration. - -## Usage - -Set `plex_enabled: true` in your `inventories//nas.yml` file. - -The Plex web interface can be found at . - -## Specific Configuration - -You'll need to log in with a plex account, (or possibly claim your server). -You'll need to set up your local file store - go to settings > Manage > Libraries, and add your libraries. These are mounted in the root directory by default. diff --git a/roles/portainer/docs/portainer.md b/roles/portainer/docs/portainer.md deleted file mode 100644 index 78c727e6..00000000 --- a/roles/portainer/docs/portainer.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "Portainer" ---- - -Homepage: - -## Usage - -Set `portainer_enabled: true` in your `inventories//nas.yml` file. - -The Portainer web interface can be found at . diff --git a/roles/prowlarr/docs/prowlarr.md b/roles/prowlarr/docs/prowlarr.md deleted file mode 100644 index 0c0c0b45..00000000 --- a/roles/prowlarr/docs/prowlarr.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Prowlarr" ---- - -Homepages: [prowlarr](https://github.com/Prowlarr/Prowlarr) - -**Prowlarr** is a indexer manager/proxy built on the popular arr .net/reactjs base stack to integrate with your various PVR apps. Prowlarr supports both Torrent Trackers and Usenet Indexers. It integrates seamlessly with Sonarr, Radarr, Lidarr, and Readarr offering complete management of your indexers with no per app Indexer setup required (we do it all). - -## Usage - -Set `prowlarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. - -The Prowlarr web interface can be found at `http://ansible_nas_host_or_ip:9696` by default - -## Specific Configuration - -For comprehensive configuration instructions see the [Prowlarr wiki](https://wiki.servarr.com/prowlarr) or [Prowlarr Github page](https://github.com/Prowlarr/Prowlarr) diff --git a/roles/pyload/docs/pyload.md b/roles/pyload/docs/pyload.md deleted file mode 100644 index 7870a26a..00000000 --- a/roles/pyload/docs/pyload.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "pyLoad" ---- - -Homepage: [https://pyload.net/](https://pyload.net/) - -Free and Open Source download manager written in Python and designed to be extremely lightweight, easily extensible and fully manageable via web. - -## Usage - -Set `pyload_enabled: true` in your `inventories//nas.yml` file. - -pyLoad's web interface can be found at . - -## Specific Configuration - -Default username is `pyload` and default password is `pyload` -In order to add or remove users, you will need to access the container from an interactive shell (can easily be done from portainer, if installed) and enter pyLoad's home directory `/opt/pyload` and using the command `python pyLoadCore.py -u` and follow the on-screen prompts. More commands to configure and customize pyLoad can be found on it's website. diff --git a/roles/pytivo/docs/pytivo.md b/roles/pytivo/docs/pytivo.md deleted file mode 100644 index c3344a23..00000000 --- a/roles/pytivo/docs/pytivo.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "PyTivo" ---- - -Project Homepage: - - -Docker Homepage: - - -PyTivo is both an HMO and GoBack server. Similar to TiVo Desktop pyTivo -loads many standard video compression codecs and outputs mpeg2 video to -the TiVo. However, pyTivo is able to load MANY more file types than TiVo -Desktop. - -## Usage - -Set `pytivo_enabled: true` in your `group_vars/all.yml` file. The PyTivo -web interface can be found at . - -## Specific Configuration - -PyTivo needs to be configured for use. Your ansible-nas media is -available to share via: - -* /movies - Where your movies are stored -* /music - Where your music is stored -* /photos - Where your photos are stored -* /podcasts - Where your podcasts are stored -* /tv - Where your TV episodes are stored - -Configuration help for PyTivo settings can be found at [Configure_pyTivo](https://pytivo.sourceforge.io/wiki/index.php/Configure_pyTivo). diff --git a/roles/radarr/docs/radarr.md b/roles/radarr/docs/radarr.md deleted file mode 100644 index 09355c1f..00000000 --- a/roles/radarr/docs/radarr.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Radarr" ---- - -Homepage: [radarr](https://radarr.video/) - -**Radarr** is an independent fork of Sonarr reworked for automatically downloading movies via Usenet and BitTorrent. - -## Usage - -Set `radarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. - -The Radarr web interface can be found at `http://ansible_nas_host_or_ip:7878` by default - -## Specific Configuration - -**First make sure Radarr has permissions to write and read the `/download`, and `/movies` folders**. Do this by ensuring the `radarr_movies_directory:` and `radarr_download_directory` settings are correct. - -Radarr will get the file path from the Download client. On default settings with Transmission the path is `/storage/downloads/complete`. You will need to create a path mapping in the **Remote Path Mappings** settings under **Download Client** to point to your internal path that is by default `/downloads`. *If you have difficulties with the path mapping you could also just add a new volume path for the Transmission container and use `/downloads` as the download directory.* - -For Radarr to understand that the `/movies` folder is a folder, you'll need to add a new subfolder into it. -You can also do this by adding a random movie to the folder. Keep in mind to have the internal setting **Create empty movie folders** on **yes** - -Comprehensive setup information can be found on the [Radarr GitHub wiki](https://github.com/Radarr/Radarr/wiki/Setup-Guide) diff --git a/roles/route53_ddns/docs/route53_ddns.md b/roles/route53_ddns/docs/route53_ddns.md deleted file mode 100644 index 4ac40099..00000000 --- a/roles/route53_ddns/docs/route53_ddns.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: "AWS Route53 Dynamic DNS Updater" ---- - -ddns-route53: - -AWS Route53: - -If you want your Ansible-NAS accessible externally then you need a domain name. You will also need to set a wildcard host `A` record to point to your static IP, or enable this container to automatically update AWS Route53 with your dynamic IP address. - -## Usage - -Set `route53_ddns_enabled: true` in your `inventories//nas.yml` file. - -Set required AWS access credentials from the AWS Console. (See below.) - -## Specific Configuration - -Make sure you set your domain (if different than the `ansible-nas` default) and access details within your `inventories//nas.yml` file. - -To set up Route53 to work with the service, please review the [Prerequisites](https://crazymax.dev/ddns-route53/usage/prerequisites/) page. In short, you will need to set up a Route53 [Hosted Zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html), an [IAM Policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html), and an [IAM User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html) with API credentials. - -### AWS Access Credentials - -| Parameter | Description | Status | -|--------------------|-------------------|-----------| -| route53_key_id | AWS access key ID | mandatory | -| route53_secret_key | AWS secret key | mandatory | - -### Networking - -| Parameter | Description | Status | -|------------------------|--------------------------------|-----------| -| route53_hosted_zone_id | Route53 hosted zone ID | mandatory | -| route53_ttl | Time-to-live for the DNS entry | | -| route53_host | Wildcard domain to update | | - -### Application - -| Parameter | Description | Status | -|------------------|-----------------------------------------------------|-----------| -| route53_schedule | [CRON](https://pkg.go.dev/github.com/robfig/cron?utm_source=godoc#hdr-CRON_Expression_Format) schedule for checking and updating DNS entry | | diff --git a/roles/rssbridge/docs/rssbridge.md b/roles/rssbridge/docs/rssbridge.md deleted file mode 100644 index 9ea01ba1..00000000 --- a/roles/rssbridge/docs/rssbridge.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "RSS-Bridge" ---- - -Homepage: - -RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one. It can be used on webservers or as a stand-alone application in CLI mode. - -Important: RSS-Bridge is not a feed reader or feed aggregator, but a tool to generate feeds that are consumed by feed readers and feed aggregators. - -## Usage - -Set `rssbridge_enabled: true` in your `inventories//nas.yml` file. - -The RSS-Bridge web interface can be found at . diff --git a/roles/sabnzbd/docs/sabnzbd.md b/roles/sabnzbd/docs/sabnzbd.md deleted file mode 100644 index ddbd27d5..00000000 --- a/roles/sabnzbd/docs/sabnzbd.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Sabnzbd" ---- - -Homepage: - -The time tested Usenet downloader provided with FreeNAS. It just works for those migrating from FreeNAS. - -## Usage - -Set `sabnzbd_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. - -The Sabnzbd web interface can be found at . Use this interface to configure the software upon first connection. diff --git a/roles/sickchill/docs/sickchill.md b/roles/sickchill/docs/sickchill.md deleted file mode 100644 index 8fe2b75a..00000000 --- a/roles/sickchill/docs/sickchill.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sickchill - -Homepage: [Sickchill](https://sickchill.github.io/) - -SickChill is an automatic Video Library Manager for TV Shows. -It watches for new episodes of your favorite shows, and when they are posted it does its magic: automatic torrent/nzb searching, downloading, and processing at the qualities you want. - -## Usage - -Set `sickchill_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. - -The sickchill web interface can be found at `http://ansible_nas_host_or_ip:8081` by default diff --git a/roles/sonarr/docs/sonarr.md b/roles/sonarr/docs/sonarr.md deleted file mode 100644 index 0833ecb9..00000000 --- a/roles/sonarr/docs/sonarr.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Sonarr" ---- - -Homepage: - -**Sonarr** is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows 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 `sonarr_enabled: true` in your `/inventories/[my inventory]/group_vars/nas.yml` file. - -The Sonarr web interface can be found at `http://ansible_nas_host_or_ip:8989` by default - -## Specific Configuration - -**First make sure Sonarr has permissions to write and read the `/download` and `/tv` folders**. Do this by ensuring the `sonarr_movies_directory:` and `sonarr_download_directory` settings are correct. - -Sonarr will get the file path from the Download client. On default settings with Transmission the path is `/storage/downloads/complete`. You will need to create a path mapping in the **Remote Path Mappings** settings under **Download Client** to point to your internal path that is by default `/downloads`. *If you have difficulties with the path mapping you could also just add a new volume path for the Transmission container and use `/downloads` as the download directory.* - -For Sonarr to understand that the `/tv` folder is a folder, you'll need to add a folder into it. -You can also do this by adding a random series to the folder. Keep in mind to have the setting **Create empty movie folders** on **yes** - -For comprehensive configuration instructions see the [Sonarr GitHub wiki](https://github.com/Sonarr/Sonarr/wiki) diff --git a/roles/speedtest-tracker/docs/speedtest.md b/roles/speedtest-tracker/docs/speedtest.md deleted file mode 100644 index d9f82ad9..00000000 --- a/roles/speedtest-tracker/docs/speedtest.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Speedtest-Tracker" ---- - -Homepage: - -Docker Container: - -Continuously track your internet speed - -## Usage - -Set `speedtest_tracker_enabled: true` in your `inventories//nas.yml` file. - -If you want to access Speedtest-Tracker externally, don't forget to set `speedtest_tracker_available_externally: true` in your `inventories//nas.yml` file. - -The Speedtest-Tracker interface can be found at . diff --git a/roles/stats/docs/stats.md b/roles/stats/docs/stats.md deleted file mode 100644 index 1a92639a..00000000 --- a/roles/stats/docs/stats.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Stats" ---- - -The stats role uses Prometheus, Grafana, Telegraf and a number of metrics exporters to collect and record lots of metrics about your NAS. - -Telegraf also exposes an InfluxDB endpoint for applications that require it. - -## Usage - -Set `stats_enabled: true` in your `inventories//nas.yml` file. If you want to gather metrics on your internet connection, enable `stats_internet_speed_test_enabled` too. - -If you want to access Grafana externally, set `stats_grafana_available_externally: true` in your `inventories//nas.yml` file. If you want to access Promethehus externally, set `stats_prometheus_available_externally: true` in your `inventories//nas.yml` file. - -The Grafana web interface can be found at , Prometheus can be found at diff --git a/roles/syncthing/docs/syncthing.md b/roles/syncthing/docs/syncthing.md deleted file mode 100644 index 83e882d0..00000000 --- a/roles/syncthing/docs/syncthing.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "Syncthing" ---- - -Homepage: - -Github: - -Docker: - -Syncthing is a continuous file synchronization program. It synchronizes files -between two or more computers. It strives to fulfill the goals below in summary. -Syncthing should be: - -1. Safe From Data Loss -2. Secure Against Attackers -3. Easy to Use -4. Automatic -5. Universally Available -6. For Individuals -7. For eveything else see the goals document - -## Usage - -Set `syncthing_enabled: true` in your `\inventories\[my inventory]\group_vars\nas.yml` file. - -## Specific Configuration - -Open the web interface at :8384 to configure. diff --git a/roles/tautulli/docs/tautulli.md b/roles/tautulli/docs/tautulli.md deleted file mode 100644 index a9876299..00000000 --- a/roles/tautulli/docs/tautulli.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Tautulli" ---- - -Homepage: - -Tautulli allows you to monitor your Plex Media Server. - -## Usage - -Set `tautulli_enabled: true` in your `inventories//nas.yml` file. - -The Tautulli web interface can be found at . diff --git a/roles/thelounge/docs/thelounge.md b/roles/thelounge/docs/thelounge.md deleted file mode 100644 index 6292a700..00000000 --- a/roles/thelounge/docs/thelounge.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "The Lounge" ---- - -Homepage: - -The Lounge is a self-hosted web IRC client. - -## Usage - -Set `thelounge_enabled: true` in your `inventories//nas.yml` file. - -The Lounge web interface can be found at . - -## Specific Configuration - -The default username and password is `admin`. Change this once you've logged in! diff --git a/roles/tiddlywiki/docs/tiddlywiki.md b/roles/tiddlywiki/docs/tiddlywiki.md deleted file mode 100644 index be0344b2..00000000 --- a/roles/tiddlywiki/docs/tiddlywiki.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: "TiddlyWiki" -description: "A notebook for capturing, organizing, and sharing information" ---- - -Homepage: - -TiddlyWiki is a unique non-linear notebook for capturing, organizing, and sharing complex information. Use it to keep your to-do list, to plan an essay or novel, or to organise your wedding. Record every thought that crosses your brain, or build a flexible and responsive website. Unlike conventional online services, TiddlyWiki lets you choose where to keep your data, guaranteeing that in the decades to come you will still be able to use the notes you take today. - -## Usage - -Set `tiddlywiki_enabled: true` in your `inventories//nas.yml` file. - -If you want to access TiddlyWiki externally, set `tiddlywiki_available_externally: true` in your `inventories//nas.yml` file. - -The TiddlyWiki web interface can be found at . - -## Specific Configuration - -The TiddlyWiki role has several configuration parameters. All parameters are optional. - -### Data and Networking - -| Parameter | Description | -|---------------------------|-------------------------------| -| tiddlywiki_data_directory | Host location to store data | -| tiddlywiki_port | Host port for internal access | -| tiddlywiki_hostname | Subdomain for external access | - -### Server Configuration - -| Parameter | Description | -|------------------------|--------------------------| -| tiddlywiki_username | Basic Auth username | -| tiddlywiki_password | Basic Auth password | -| tiddlywiki_node_memory | NodeJS memory allocation | -| tiddlywiki_debug_level | Service debugging | diff --git a/roles/timemachine/docs/timemachine.md b/roles/timemachine/docs/timemachine.md deleted file mode 100644 index 2589ebe8..00000000 --- a/roles/timemachine/docs/timemachine.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "Time Machine" ---- - -Apple docs: - -Docker image: - -Time Machine is an application that allows you to backup files from your Mac. - -Older versions of Time Machine relied on AFP (netatalk) shares. Apple has deprecated Time Machine over AFP in favor of SMB (Samba), and current versions of Ansible-NAS use a Samba-based Time Machine share. If you are upgrading from an older version of Ansible-NAS, you will need to re-select your Time Machine back up disk by opening Time Machine Preferences and Selecting your backup disk via the "Select Disk..." option. Your Mac will find the old backups on the share and use them. - -## Usage - -Set `timemachine_enabled: true` in your `inventories//nas.yml` file. - -Enabling Time Machine will result in the installation of Avahi on the NAS system (if it is not already installed) and a Time Machine service configuration file for Avahi will be added to the system (at `/etc/avahi/services/timemachine.service`) to allow for Time Machine discovery by Macs on the local network. Avahi runs on the system, rather than in a container, as the same Avahi instance can be used to announce any number of services. - -The Samba server included in the Time Machine docker container logs to `STDOUT` and is compatible with [Docker's built-in logging infrastructure.](https://docs.docker.com/config/containers/logging/) - -## Specific Configuration - -- `timemachine_data_directory`: The absolute path on Ansible NAS where the backup files will be stored -- `timemachine_volume_size_limit`: The maximum amount of space Time Machine can use for the backups in units of MiB. Set it to 0 for no limit. -- `timemachine_share_name`: The name of the share as it will appear in the Time Machine application. Default is 'Data' -- `timemachine_password`: The password used to access the share. Default is 'timemachine' - -## Upgrading from AFP to SMB-based Time Machine - -Older versions of Time Machine included in Ansible-NAS relied on AFP (netatalk) shares. Apple has deprecated Time Machine over AFP in favor of SMB (Samba), and current versions of Ansible-NAS use a Samba-based Time Machine share. If you are upgrading from an older version of Ansible-NAS with the AFP-based Time Machine, you will need to re-select your Time Machine back up disk by opening Time Machine Preferences and Selecting your backup disk via the "Select Disk..." option. Your Mac will find the old backups on the share and use them. diff --git a/roles/traefik/docs/traefik.md b/roles/traefik/docs/traefik.md deleted file mode 100644 index 439d01ae..00000000 --- a/roles/traefik/docs/traefik.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: "Traefik" ---- - -Homepage: - -Traefik is a reverse proxy used to provide external access to your Ansible-NAS box. Additionally, Traefik will automatically request and renew SSL certificates for you. - -You can configure which applications are available externally by enabling the `_available_externally` setting -for each application in the Advanced Settings section of your `all.yml`. - -See [External Access](../../getting-started/external-access.md) for more info. - -## Usage - -Set `traefik_enabled: true` in your `inventories//nas.yml` file. - -Traefik's web interface can be found at . - -## Specific Configuration - -You'll need to map port 80 and 443 from your router to your Ansible-NAS box. A quick search should reveal instruction for your model of router. diff --git a/roles/transmission-with-openvpn/docs/transmission.md b/roles/transmission-with-openvpn/docs/transmission.md deleted file mode 100644 index e29ce9c4..00000000 --- a/roles/transmission-with-openvpn/docs/transmission.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Transmission" ---- - -Homepage: - -Transmission is a free BitTorrent client. Two versions are provided - one that tunnels through OpenVPN and one that connects -directly. - -## Usage - -Set `transmission_enabled: true`, or `transmission_with_openvpn_enabled: true` in your `inventories//nas.yml` file. - -Transmission's web interface can be found at (with OpenVPN) or (without OpenVPN). - -## Specific Configuration - -If you enable Transmission with OpenVPN, you'll need to add the following to your inventory `all.yml`: - -```yaml -openvpn_username: super_secret_username -openvpn_password: super_secret_password -openvpn_provider: NORDVPN -openvpn_config: uk686.nordvpn.com.udp -``` - -See for supported VPN providers. diff --git a/roles/transmission/docs/transmission.md b/roles/transmission/docs/transmission.md deleted file mode 100644 index e29ce9c4..00000000 --- a/roles/transmission/docs/transmission.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Transmission" ---- - -Homepage: - -Transmission is a free BitTorrent client. Two versions are provided - one that tunnels through OpenVPN and one that connects -directly. - -## Usage - -Set `transmission_enabled: true`, or `transmission_with_openvpn_enabled: true` in your `inventories//nas.yml` file. - -Transmission's web interface can be found at (with OpenVPN) or (without OpenVPN). - -## Specific Configuration - -If you enable Transmission with OpenVPN, you'll need to add the following to your inventory `all.yml`: - -```yaml -openvpn_username: super_secret_username -openvpn_password: super_secret_password -openvpn_provider: NORDVPN -openvpn_config: uk686.nordvpn.com.udp -``` - -See for supported VPN providers. diff --git a/roles/ubooquity/docs/ubooquity.md b/roles/ubooquity/docs/ubooquity.md deleted file mode 100644 index 1dea7806..00000000 --- a/roles/ubooquity/docs/ubooquity.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Ubooquity" ---- - -Homepage: - -Documentation: - -Docker Image: - -Ubooquity is a free, lightweight and easy-to-use home server for your comics and ebooks. Use it to access your files from anywhere, with a tablet, an e-reader, a phone or a computer. - -## Usage - -Set `ubooquity_enabled: true` in your `inventories//nas.yml` file. - -Access the webui at by default. See specific configuration section below for information on setting up external access. - -## Specific Configuration - -Important note: if you want to access Ubooquity externally through Traefik (at ubooquity.yourdomain.tld), you need to go to and set the reverse proxy prefix to blank under "Advanced". Otherwise you will need to append "/ubooquity" to the url in order to access. - -### Admin login - -The admin portal is not exposed through Traefik. You can access the admin portal on port 2203. - -Upon your first run, the address is . You will be able to set the admin password here. diff --git a/roles/utorrent/docs/utorrent.md b/roles/utorrent/docs/utorrent.md deleted file mode 100644 index c62bab8c..00000000 --- a/roles/utorrent/docs/utorrent.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "uTorrent" ---- - -Homepage: -Docker Container: - -## Usage - -Set `utorrent_enabled: true` in your `inventories//nas.yml` file. - -If you want to access uTorrent externally, don't forget to set `utorrent_available_externally: true` in your `inventories//nas.yml` file. - -The uTorrent web interface can be found at : - -- Username: admin -- Password: *leave blank* diff --git a/roles/virtual_desktop/docs/virtual_desktop.md b/roles/virtual_desktop/docs/virtual_desktop.md deleted file mode 100644 index 4ff7bec8..00000000 --- a/roles/virtual_desktop/docs/virtual_desktop.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "Virtual Desktop" ---- - -It's possible to run a cut down desktop within a Docker container. We use [RattyDAVE's custom Ubuntu Mate image](https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom). - -## Usage - -Set `virtual_desktop_enabled: true` in your `inventories//nas.yml` file. - -## Specific Configuration - -By default `ansible_nas_user` will be granted access with a password of `topsecret` with sudo rights. To change or add additional users override `vd_users` in your `nas.yml`: - -```yaml -vd_users: - - username: "{{ ansible_nas_user }}" - password: "topsecret" - sudo: "Y" - - username: "larrylaffer" - password: "kensentme" - sudo: "Y" -``` - -## Mounts - -`samba_shares_root` is mounted to `/samba`. -`docker_home` is mounted to `/docker`. - -## Remote Access - -It's possible to access your virtual desktop through a web browser! Check out [Guacamole](guacamole.md). diff --git a/roles/wallabag/docs/wallabag.md b/roles/wallabag/docs/wallabag.md deleted file mode 100644 index 84bb4b95..00000000 --- a/roles/wallabag/docs/wallabag.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Wallabag" ---- - -Homepage: - -wallabag is a self-hostable PHP application allowing you to not miss any content anymore. Click, save and read it when you can. It extracts content so that you can read it when you have time. - -## Usage - -Set `wallabag_enabled: true` in your `inventories//nas.yml` file. - -If you want to access wallabag externally, don't forget to set `wallabag_available_externally: true` in your `inventories//nas.yml` file. - -I recommend using the mobile app, which will sync with this installation so you have access to your saved articles even if you don't have signal or wifi access. - -The default credentials are wallabag:wallabag - -The wallabag web interface can be found at . diff --git a/roles/watchtower/docs/watchtower.md b/roles/watchtower/docs/watchtower.md deleted file mode 100644 index 31e1fa2e..00000000 --- a/roles/watchtower/docs/watchtower.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Watchtower" ---- - -Homepage: - -A process for watching your Docker containers and automatically updating and restarting them whenever their base image is refreshed. - -## Usage - -Set `watchtower_enabled: true` in your `inventories//nas.yml` file. - -## Specific Configuration - -By default Watchtower is configured to check daily at 5am for updates. - -Various notification options are available, and can be configured by updating `watchtower_command` in your `inventories//nas.yml` file. A few examples are provided. The full set of options can be found at the [Watchtower GitHub project page](https://github.com/v2tec/watchtower). diff --git a/roles/wireshark/docs/wireshark.md b/roles/wireshark/docs/wireshark.md deleted file mode 100644 index 689853d7..00000000 --- a/roles/wireshark/docs/wireshark.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Wireshark" ---- - -Homepage: - -Wireshark is the world’s foremost and widely-used network protocol analyzer. It lets you see what’s happening on your network at a microscopic level and is the de facto (and often de jure) standard across many commercial and non-profit enterprises, government agencies, and educational institutions. Wireshark development thrives thanks to the volunteer contributions of networking experts around the globe and is the continuation of a project started by Gerald Combs in 1998. - -## Usage - -Set `wireshark_enabled: true` in your `inventories//nas.yml` file. - -The Wireshark web interface can be found at . diff --git a/roles/woodpecker-ci/docs/woodpecker_ci.md b/roles/woodpecker-ci/docs/woodpecker_ci.md deleted file mode 100644 index 50208319..00000000 --- a/roles/woodpecker-ci/docs/woodpecker_ci.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Woodpecker CI" ---- - -Woodpecker is a simple CI engine with great extensibility. - -Check it out at . - -## Usage - -Set `woodpecker_ci_enabled: true` in your `inventories//nas.yml` file. - -Gitea (`gitea_enabled: true`) must be set up and running before attempting to set up Woodpecker CI. - -## Setup Tasks - -An Oauth2 application must be set up in Gitea. Visit for more info, then set `woodpecker_ci_gitea_client` and `woodpecker_ci_gitea_secret` accordingly. - -Set `woodpecker_ci_admin_user` to the same username as your user in Gitea. diff --git a/roles/youtubedlmaterial/docs/youtubedlmaterial.md b/roles/youtubedlmaterial/docs/youtubedlmaterial.md deleted file mode 100644 index 5065be1e..00000000 --- a/roles/youtubedlmaterial/docs/youtubedlmaterial.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "YouTubeDL-Material" ---- - -Homepage: -Docker Container: - -YoutubeDL-Material is a Material Design frontend for youtube-dl. It's coded using Angular 9 for the frontend, and Node.js on the backend. - -## Usage - -Set `youtubedlmaterial_enabled: true` in your `inventories//nas.yml` file. - -The YouTubeDL-Material web interface can be found at . - -## Specific Configuration - -A YouTube directory will be created in your configured downloads spot. YouTubeDL-Material downloads will be placed there. -You can change the download location via `inventories//nas.yml` file. diff --git a/roles/znc/docs/znc.md b/roles/znc/docs/znc.md deleted file mode 100644 index bbcb5b54..00000000 --- a/roles/znc/docs/znc.md +++ /dev/null @@ -1,11 +0,0 @@ -# Znc - -Homepage: - -ZNC is an IRC network bouncer or BNC. It can detach the client from the actual IRC server, and also from selected channels. Multiple clients from different locations can connect to a single ZNC account simultaneously and therefore appear under the same nickname on IRC. It supports Transport Layer Security connections and IPv6. - -## Usage - -Set `znc_enabled: true` in your `inventories//nas.yml` file. Edit `znc_*` variables to suit your needs. For more advanced needs, edit the template config file (`templates\znc.conf.j2`) directly. - -Connect to ZNC using IRC at ansible_nas_host_or_ip:6677.