diff --git a/.gitignore b/ansible/.gitignore similarity index 100% rename from .gitignore rename to ansible/.gitignore diff --git a/ansible.cfg b/ansible/ansible.cfg similarity index 100% rename from ansible.cfg rename to ansible/ansible.cfg diff --git a/group_vars/instance_system/vars.yaml b/ansible/group_vars/instance_system/vars.yaml similarity index 100% rename from group_vars/instance_system/vars.yaml rename to ansible/group_vars/instance_system/vars.yaml diff --git a/group_vars/instance_system/vault.yaml b/ansible/group_vars/instance_system/vault.yaml similarity index 100% rename from group_vars/instance_system/vault.yaml rename to ansible/group_vars/instance_system/vault.yaml diff --git a/inventory b/ansible/inventory similarity index 100% rename from inventory rename to ansible/inventory diff --git a/roles/arr/README.md b/ansible/roles/arr/README.md similarity index 100% rename from roles/arr/README.md rename to ansible/roles/arr/README.md diff --git a/roles/arr/defaults/main.yml b/ansible/roles/arr/defaults/main.yml similarity index 100% rename from roles/arr/defaults/main.yml rename to ansible/roles/arr/defaults/main.yml diff --git a/roles/arr/handlers/main.yml b/ansible/roles/arr/handlers/main.yml similarity index 100% rename from roles/arr/handlers/main.yml rename to ansible/roles/arr/handlers/main.yml diff --git a/roles/arr/meta/main.yml b/ansible/roles/arr/meta/main.yml similarity index 100% rename from roles/arr/meta/main.yml rename to ansible/roles/arr/meta/main.yml diff --git a/roles/arr/tasks/main.yml b/ansible/roles/arr/tasks/main.yml similarity index 100% rename from roles/arr/tasks/main.yml rename to ansible/roles/arr/tasks/main.yml diff --git a/roles/arr/templates/arr.yml b/ansible/roles/arr/templates/arr.yml similarity index 100% rename from roles/arr/templates/arr.yml rename to ansible/roles/arr/templates/arr.yml diff --git a/roles/arr/templates/docker-compose.yaml.j2 b/ansible/roles/arr/templates/docker-compose.yaml.j2 similarity index 100% rename from roles/arr/templates/docker-compose.yaml.j2 rename to ansible/roles/arr/templates/docker-compose.yaml.j2 diff --git a/roles/arr/tests/inventory b/ansible/roles/arr/tests/inventory similarity index 100% rename from roles/arr/tests/inventory rename to ansible/roles/arr/tests/inventory diff --git a/roles/arr/tests/test.yml b/ansible/roles/arr/tests/test.yml similarity index 100% rename from roles/arr/tests/test.yml rename to ansible/roles/arr/tests/test.yml diff --git a/roles/arr/vars/main.yml b/ansible/roles/arr/vars/main.yml similarity index 100% rename from roles/arr/vars/main.yml rename to ansible/roles/arr/vars/main.yml diff --git a/roles/caddy/tasks/main.yaml b/ansible/roles/caddy/tasks/main.yaml similarity index 100% rename from roles/caddy/tasks/main.yaml rename to ansible/roles/caddy/tasks/main.yaml diff --git a/roles/caddy/templates/docker-compose.yaml.j2 b/ansible/roles/caddy/templates/docker-compose.yaml.j2 similarity index 100% rename from roles/caddy/templates/docker-compose.yaml.j2 rename to ansible/roles/caddy/templates/docker-compose.yaml.j2 diff --git a/roles/incus-install/tasks/add-repo.yaml b/ansible/roles/incus-install/tasks/add-repo.yaml similarity index 100% rename from roles/incus-install/tasks/add-repo.yaml rename to ansible/roles/incus-install/tasks/add-repo.yaml diff --git a/roles/incus-install/tasks/bootstrap.yaml b/ansible/roles/incus-install/tasks/bootstrap.yaml similarity index 100% rename from roles/incus-install/tasks/bootstrap.yaml rename to ansible/roles/incus-install/tasks/bootstrap.yaml diff --git a/roles/incus-install/tasks/main.yaml b/ansible/roles/incus-install/tasks/main.yaml similarity index 100% rename from roles/incus-install/tasks/main.yaml rename to ansible/roles/incus-install/tasks/main.yaml diff --git a/roles/grocy/README.md b/ansible/roles/paperless/README.md similarity index 100% rename from roles/grocy/README.md rename to ansible/roles/paperless/README.md diff --git a/roles/paperless/defaults/main.yml b/ansible/roles/paperless/defaults/main.yml similarity index 100% rename from roles/paperless/defaults/main.yml rename to ansible/roles/paperless/defaults/main.yml diff --git a/ansible/roles/paperless/handlers/main.yml b/ansible/roles/paperless/handlers/main.yml new file mode 100644 index 0000000..6d5ba60 --- /dev/null +++ b/ansible/roles/paperless/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for paperless diff --git a/roles/grocy/meta/main.yml b/ansible/roles/paperless/meta/main.yml similarity index 100% rename from roles/grocy/meta/main.yml rename to ansible/roles/paperless/meta/main.yml diff --git a/roles/paperless/tasks/main.yml b/ansible/roles/paperless/tasks/main.yml similarity index 100% rename from roles/paperless/tasks/main.yml rename to ansible/roles/paperless/tasks/main.yml diff --git a/roles/paperless/templates/docker-compose.yaml.j2 b/ansible/roles/paperless/templates/docker-compose.yaml.j2 similarity index 100% rename from roles/paperless/templates/docker-compose.yaml.j2 rename to ansible/roles/paperless/templates/docker-compose.yaml.j2 diff --git a/roles/grocy/tests/inventory b/ansible/roles/paperless/tests/inventory similarity index 100% rename from roles/grocy/tests/inventory rename to ansible/roles/paperless/tests/inventory diff --git a/roles/paperless/tests/test.yml b/ansible/roles/paperless/tests/test.yml similarity index 100% rename from roles/paperless/tests/test.yml rename to ansible/roles/paperless/tests/test.yml diff --git a/ansible/roles/paperless/vars/main.yml b/ansible/roles/paperless/vars/main.yml new file mode 100644 index 0000000..3082f84 --- /dev/null +++ b/ansible/roles/paperless/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for paperless diff --git a/roles/system/files/incus.servers.tpl b/ansible/roles/system/files/incus.servers.tpl similarity index 100% rename from roles/system/files/incus.servers.tpl rename to ansible/roles/system/files/incus.servers.tpl diff --git a/roles/system/files/incus.sources.tpl b/ansible/roles/system/files/incus.sources.tpl similarity index 100% rename from roles/system/files/incus.sources.tpl rename to ansible/roles/system/files/incus.sources.tpl diff --git a/roles/system/files/zabbly-key.asc b/ansible/roles/system/files/zabbly-key.asc similarity index 100% rename from roles/system/files/zabbly-key.asc rename to ansible/roles/system/files/zabbly-key.asc diff --git a/roles/system/handlers/main.yaml b/ansible/roles/system/handlers/main.yaml similarity index 100% rename from roles/system/handlers/main.yaml rename to ansible/roles/system/handlers/main.yaml diff --git a/roles/system/tasks/main.yaml b/ansible/roles/system/tasks/main.yaml similarity index 100% rename from roles/system/tasks/main.yaml rename to ansible/roles/system/tasks/main.yaml diff --git a/arr/arr.yml b/arr/arr.yml new file mode 100644 index 0000000..8d25d1d --- /dev/null +++ b/arr/arr.yml @@ -0,0 +1,172 @@ +version: "3" +services: + sonarr: + container_name: sonarr + image: lscr.io/linuxserver/sonarr:latest + ports: + - 8989:8989 + environment: + - PUID=${PUID} + - PGID=${PGID} + - UMASK_SET=022 + - TZ=${TZ} + volumes: + - "./config/sonarr:/config" + - "CHANGE_TO_COMPOSE_DATA_PATH:/data" + restart: unless-stopped + radarr: + container_name: radarr + image: lscr.io/linuxserver/radarr:latest + ports: + - 7878:7878 + environment: + - PUID=${PUID} + - PGID=${PGID} + - UMASK_SET=022 + - TZ=${TZ} + volumes: + - "./config/radarr:/config" + - "CHANGE_TO_COMPOSE_DATA_PATH:/data" + restart: unless-stopped + lidarr: + container_name: lidarr + image: lscr.io/linuxserver/lidarr:latest + ports: + - 8686:8686 + environment: + - PUID=${PUID} + - PGID=${PGID} + - UMASK_SET=022 + - TZ=${TZ} + - DOCKER_MODS=linuxserver/mods:universal-docker + volumes: + - "./config/lidarr:/config" + - "CHANGE_TO_COMPOSE_DATA_PATH:/data" + - "/var/run/docker.sock:/var/run/docker.sock:ro" + restart: unless-stopped + readarr: + container_name: readarr + image: lscr.io/linuxserver/readarr:develop + ports: + - 8787:8787 + environment: + - PUID=${PUID} + - PGID=${PGID} + - UMASK_SET=022 + - TZ=${TZ} + volumes: + - "./config/readarr:/config" + - "CHANGE_TO_COMPOSE_DATA_PATH:/data" + restart: unless-stopped + prowlarr: + container_name: prowlarr + image: lscr.io/linuxserver/prowlarr:develop + environment: + - PUID=${PUID} + - PGID=${PGID} + - UMASK_SET=022 + - TZ=${TZ} + volumes: + - "./config/prowlarr:/config" + ports: + - 9696:9696 + restart: unless-stopped + sabnzbd: + container_name: sabnzbd + image: lscr.io/linuxserver/sabnzbd:latest + environment: + - PUID=${PUID} + - PGID=${PGID} + - TZ=${TZ} + volumes: + - "./config/sabnzbd:/config" + - "CHANGE_TO_COMPOSE_DATA_PATH/usenet:/data/usenet:rw" + ports: + - 8080:8080 + restart: unless-stopped + pia-qbittorrent: + image: j4ym0/pia-qbittorrent + container_name: pia-qbittorrent + cap_add: + - NET_ADMIN + environment: + - UID=${PUID} + - GID=${PGID} + - TZ=${TZ} + - REGION=Netherlands + - USER=${PIA_USER} + - PASSWORD=${PIA_PASS} + volumes: + - "./config/piaqbit:/config" + - "CHANGE_TO_COMPOSE_DATA_PATH/torrent:/downloads:rw" + ports: + - "8888:8888" + restart: unless-stopped + jellyfin: + image: lscr.io/linuxserver/jellyfin:latest + container_name: jellyfin + environment: + - PUID={$PUID} + - PGID={$PGID} + - TZ=${TZ} + #- JELLYFIN_PublishedServerUrl=192.168.0.5 #optional + volumes: + - ".config/jellyfin:/config" + - "CHANGE_TO_COMPOSE_DATA_PATH/media:/data" + ports: + - 8096:8096 + - 7359:7359/udp #optional - network discovery + - 1900:1900/udp #optional - dlna discovery + restart: unless-stopped + audiobookshelf: + container_name: audiobookshelf + image: ghcr.io/advplyr/audiobookshelf:latest + environment: + - PUID=${PUID} + - PGID=${PGID} + - UMASK_SET=022 + - TZ=${TZ} + ports: + - 13378:80 + volumes: + - "CHANGE_TO_COMPOSE_DATA_PATH/media/audio/books:/audiobooks" + - "CHANGE_TO_COMPOSE_DATA_PATH/media/audio/podcasts:/podcasts" + - ".config/audiobookshelf:/config" + - ".metadata/audiobookshelf:/metadata" + restart: unless-stopped + jellyseerr: + image: fallenbagel/jellyseerr:latest + container_name: jellyseerr + environment: + - TZ=${TZ} + ports: + - 5055:5055 + volumes: + - "./config/jellyseerr:/app/config" + restart: unless-stopped + beets: + image: lscr.io/linuxserver/beets:latest + container_name: beets + environment: + - PUID=${PUID} + - PGID=${PGID} + - TZ=${TZ} + volumes: + - "./config/beets:/config" + - "CHANGE_TO_COMPOSE_DATA_PATH/media/audio/music:/music" + - "CHANGE_TO_COMPOSE_DATA_PATH/media/audio/music-unsorted:/downloads" + - "CHANGE_TO_COMPOSE_DATA_PATH:/data" + ports: + - 8337:8337 + restart: unless-stopped + homarr: + image: ghcr.io/ajnart/homarr:latest + container_name: homarr + volumes: + - /var/run/docker.sock:/var/run/docker.sock # Optional, only if you want docker integration + - ./config/homarr/configs:/app/data/configs + - ./config/homarr/icons:/app/public/icons + - ./config/homarr/data:/data + ports: + - '80:7575' + restart: unless-stopped diff --git a/stacks/monitoring.yaml b/monitoring.yaml similarity index 100% rename from stacks/monitoring.yaml rename to monitoring.yaml diff --git a/stacks/paperless/docker-compose.env b/paperless/docker-compose.env similarity index 100% rename from stacks/paperless/docker-compose.env rename to paperless/docker-compose.env diff --git a/stacks/paperless/docker-compose.simple_example.yml b/paperless/docker-compose.simple_example.yml similarity index 100% rename from stacks/paperless/docker-compose.simple_example.yml rename to paperless/docker-compose.simple_example.yml diff --git a/stacks/paperless/docker-compose.yml b/paperless/docker-compose.yml similarity index 100% rename from stacks/paperless/docker-compose.yml rename to paperless/docker-compose.yml diff --git a/roles/paperless/scripts/scantopaperless.sh b/paperless/scantopaperless.sh similarity index 90% rename from roles/paperless/scripts/scantopaperless.sh rename to paperless/scantopaperless.sh index ad43f3e..5c10c0c 100755 --- a/roles/paperless/scripts/scantopaperless.sh +++ b/paperless/scantopaperless.sh @@ -24,5 +24,5 @@ if ! stat -t out*.png >/dev/null 2>&1; then fi magick out*.png out.pdf -mv out.pdf "$HOME/documents/consume/$(date +'%Y-%m-%dT%H-%M')_scan.pdf" +mv out.pdf "$HOME/documents/archive/consume/$(date +'%Y-%m-%dT%H-%M')_scan.pdf" rm out*.png diff --git a/playbook.yaml b/playbook.yaml deleted file mode 100644 index 757f051..0000000 --- a/playbook.yaml +++ /dev/null @@ -1,49 +0,0 @@ ---- -- name: Prepare incus server host - hosts: host_system - tasks: - - name: Prepare system - ansible.builtin.import_role: - name: system - tags: system - - # FIXME: Role needs much fixup before it can run - # - name: Prepare incus - # ansible.builtin.import_role: - # name: incus-install - # tags: incus - - # ansible-galaxy install geerlingguy.docker -- name: Install docker - hosts: instance_system - tasks: - - name: Install docker and docker compose - ansible.builtin.import_role: - name: geerlingguy.docker - tags: docker - - - name: Install docker python requirements - ansible.builtin.package: - name: "{{ item }}" - state: present - loop: - - python3-yaml # for docker compose_v2 - - python3-requests # for docker network - -- name: Prepare all docker hosted containers - hosts: instance_system - tasks: - - name: Set up Caddy stack - ansible.builtin.import_role: - name: caddy - tags: caddy - - - name: Set up Arr stack - ansible.builtin.import_role: - name: arr - tags: arr - - - name: Set up Paperless stack - ansible.builtin.import_role: - name: paperless - tags: paperless diff --git a/roles/grocy/defaults/main.yml b/roles/grocy/defaults/main.yml deleted file mode 100644 index c765f90..0000000 --- a/roles/grocy/defaults/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- - -stack_grocy_env_dir: /opt/stack_grocy - -stack_grocy_puid: 1000 -stack_grocy_pgid: 100 -stack_grocy_tz: America/Chicago -stack_grocy_umask_set: 022 diff --git a/roles/grocy/tasks/main.yml b/roles/grocy/tasks/main.yml deleted file mode 100644 index 4bc182e..0000000 --- a/roles/grocy/tasks/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- name: Create grocy stack environment directory - ansible.builtin.file: - state: directory - path: "{{ stack_grocy_env_dir }}" - owner: root - group: root - mode: 0700 - -- name: Start the compose stack - community.docker.docker_compose_v2: - project_name: stack_grocy - definition: "{{ lookup('template', 'docker-compose.yaml.j2') | from_yaml }}" - remove_orphans: true - wait: true - wait_timeout: 60 diff --git a/roles/grocy/templates/docker-compose.yaml.j2 b/roles/grocy/templates/docker-compose.yaml.j2 deleted file mode 100644 index 32d6b3a..0000000 --- a/roles/grocy/templates/docker-compose.yaml.j2 +++ /dev/null @@ -1,24 +0,0 @@ -services: - sonarr: - container_name: grocy - image: lscr.io/linuxserver/grocy:latest - networks: - - caddy - environment: - - PUID={{ stack_grocy_puid }} - - PGID={{ stack_grocy_pgid }} - - TZ={{ stack_grocy_tz }} - - UMASK_SET={{ stack_grocy_umask_set }} - volumes: - - "{{ arrstack_env_dir }}/config/grocy:/config" - restart: unless-stopped - labels: - caddy: "http://house.pichi.berlin" - caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}'}}" - -networks: - caddy: - external: true - -volumes: - caddy_data: {} diff --git a/roles/grocy/tests/test.yml b/roles/grocy/tests/test.yml deleted file mode 100644 index 536a352..0000000 --- a/roles/grocy/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - grocy diff --git a/roles/paperless/README.md b/roles/paperless/README.md deleted file mode 100644 index dfa8474..0000000 --- a/roles/paperless/README.md +++ /dev/null @@ -1,46 +0,0 @@ -Role Name -========= - -Set up a docker-hosted paperless-ngx instance. - -Requirements ------------- - -The target server needs to be running a reasonably recent version of docker, -which contains the `docker compose` (_not_ `docker-compose`) sub-command. - -Role Variables --------------- - -All relevant variables reside in `defaults/main.yml`. - - -Dependencies ------------- - -Relies on the `caddy` role to be executed for caddy to pick up the container and proxy to it. - -Example Playbook ----------------- - -The role can easily be set up in the following way to deploy to any server: - - - hosts: servers - roles: - - role: paperless - -An example scanning script is included which I wrote for my old printer and allows (relatively) rapid scanning by pushing a button, -and automatically merging and sending the files to the consume folder. - -This will need to be adjusted for wherever you watch for the documents, -but is a simple example of how it could be integrated into a scanning workflow. - -License -------- - -MIT - -Author Information ------------------- - -Copyright (c) 2025 Marty Oehme. All Rights Reserved. diff --git a/roles/paperless/meta/main.yml b/roles/paperless/meta/main.yml deleted file mode 100644 index ea68190..0000000 --- a/roles/paperless/meta/main.yml +++ /dev/null @@ -1,34 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/paperless/tests/inventory b/roles/paperless/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/paperless/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost -