├── .github
├── PULL_REQUEST_TEMPLATE.md
├── pull.yml
└── workflows
│ └── ci.yml
├── .gitignore
├── LICENSE.md
├── README.md
├── ansible_facts.d
├── group.fact
├── timezone.fact
└── user.fact
├── community.yml
├── defaults
├── ansible.cfg.default
├── hetzner_nfs.yml.default
├── settings.yml.default
└── telly.yml.default
├── filter_plugins
└── pluralize.py
├── inventories
├── group_vars
│ └── all.yml
├── host_vars
│ └── .gitkeep
└── local
└── roles
├── airdcpp
├── files
│ ├── DCPlusPlus.xml
│ └── WebServer.xml
└── tasks
│ └── main.yml
├── airsonic
└── tasks
│ └── main.yml
├── alltube
└── tasks
│ └── main.yml
├── alternatrr
└── tasks
│ └── main.yml
├── alternatrrx
└── tasks
│ ├── main.yml
│ └── template.yml
├── amongus
└── tasks
│ └── main.yml
├── apprise
└── tasks
│ └── main.yml
├── archivebox
└── tasks
│ └── main.yml
├── asshama
└── tasks
│ └── main.yml
├── audiobookshelf
└── tasks
│ └── main.yml
├── autoscan
└── tasks
│ └── main.yml
├── bazarrx
└── tasks
│ ├── main.yml
│ └── template.yml
├── beets
└── tasks
│ └── main.yml
├── bitwarden
├── tasks
│ └── main.yml
└── templates
│ └── bitwarden_env.j2
├── booksonic
└── tasks
│ └── main.yml
├── bookstack
└── tasks
│ └── main.yml
├── btrfsmaintenance
└── tasks
│ └── main.yml
├── calibre-web
└── tasks
│ └── main.yml
├── calibre
└── tasks
│ └── main.yml
├── changedetection
└── tasks
│ └── main.yml
├── cloudflare-dns
└── tasks
│ └── main.yml
├── coder
└── tasks
│ └── main.yml
├── comicstreamer
└── tasks
│ └── main.yml
├── comixed
└── tasks
│ └── main.yml
├── conreq
└── tasks
│ └── main.yml
├── couchpotato
└── tasks
│ └── main.yml
├── dashmachine
└── tasks
│ └── main.yml
├── deemix
└── tasks
│ └── main.yml
├── deemixrr
└── tasks
│ └── main.yml
├── deezloader-remix
└── tasks
│ └── main.yml
├── deluge
└── tasks
│ └── main.yml
├── delugevpn
└── tasks
│ └── main.yml
├── drive_strm
├── files
│ └── drive_strm_rebuild.sh
├── tasks
│ └── main.yml
└── templates
│ └── config.json.j2
├── easycountdown
└── tasks
│ └── main.yml
├── emby2
├── files
│ └── dlna.xml
└── tasks
│ ├── main.yml
│ └── subtasks
│ └── settings.yml
├── embystat
└── tasks
│ ├── main.yml
│ └── subtasks
│ └── migration.yml
├── epms
└── tasks
│ └── main.yml
├── filebot
└── tasks
│ └── main.yml
├── filebrowser
├── tasks
│ └── main.yml
└── templates
│ ├── filebrowser.db
│ └── filebrowser.json.j2
├── filezilla
└── tasks
│ └── main.yml
├── firefly
└── tasks
│ └── main.yml
├── flaresolverr
└── tasks
│ └── main.yml
├── funkwhale
└── tasks
│ └── main.yml
├── gazee
└── tasks
│ └── main.yml
├── gitea
└── tasks
│ └── main.yml
├── glances
├── files
│ └── glances.conf
└── tasks
│ └── main.yml
├── goplaxt
└── tasks
│ └── main.yml
├── gotify
└── tasks
│ └── main.yml
├── grafana
└── tasks
│ └── main.yml
├── guacamole
└── tasks
│ └── main.yml
├── handbrake
└── tasks
│ └── main.yml
├── healthchecks
├── tasks
│ └── main.yml
└── templates
│ └── local_settings.py.j2
├── heimdall
└── tasks
│ └── main.yml
├── hetzner_nfs
├── tasks
│ ├── hetzner_nfs_mount.yml
│ ├── hetzner_nfs_server.yml
│ ├── hetzner_nfs_server_uninstall.yml
│ ├── hetzner_nfs_unmount.yml
│ ├── main.yml
│ ├── services_start.yml
│ └── services_stop.yml
└── templates
│ ├── client
│ ├── hosts.allow.j2
│ ├── hosts.deny.j2
│ ├── init_vlan.sh.j2
│ └── nfs_vlan.service.j2
│ └── server
│ ├── exports.j2
│ ├── hosts.deny.j2
│ ├── init_vlan.sh.j2
│ └── nfs_vlan.service.j2
├── influxdb
└── tasks
│ └── main.yml
├── invoiceninja
├── tasks
│ └── main.yml
└── templates
│ └── invoiceninja_env.j2
├── jdownloader2
├── files
│ ├── sevenzipjbinding1509.jar
│ └── sevenzipjbinding1509Linux.jar
└── tasks
│ ├── main.yml
│ └── subtasks
│ └── legacy.yml
├── jellyfin
├── files
│ └── dlna.xml
└── tasks
│ ├── jellyfin_settings.yml
│ └── main.yml
├── jfa-go
└── tasks
│ └── main.yml
├── jirafeau
└── tasks
│ └── main.yml
├── kcptun-client
├── tasks
│ └── main.yml
└── templates
│ └── config.json.j2
├── kcptun-server
├── tasks
│ └── main.yml
└── templates
│ └── config.json.j2
├── kitana
└── tasks
│ └── main.yml
├── komga
└── tasks
│ └── main.yml
├── lazylibrarian
└── tasks
│ └── main.yml
├── lidarrx
└── tasks
│ ├── main.yml
│ └── template.yml
├── logarr
├── tasks
│ └── main.yml
└── templates
│ └── config.json.j2
├── mariadb
└── tasks
│ └── main.yml
├── mediabutler
└── tasks
│ └── main.yml
├── medusa
└── tasks
│ └── main.yml
├── minecraft
└── tasks
│ └── main.yml
├── mkvtoolnix
└── tasks
│ └── main.yml
├── mongodb
└── tasks
│ └── main.yml
├── monitorr
└── tasks
│ └── main.yml
├── moviematch
└── tasks
│ └── main.yml
├── mylar
└── tasks
│ └── main.yml
├── mylar3
└── tasks
│ └── main.yml
├── navidrome
└── tasks
│ └── main.yml
├── nextcloud
└── tasks
│ └── main.yml
├── nowshowing
└── tasks
│ └── main.yml
├── nzbhydra
└── tasks
│ └── main.yml
├── ombix
└── tasks
│ ├── main.yml
│ └── template.yml
├── ouroboros
├── tasks
│ └── main.yml
└── templates
│ └── ouroboros.env.j2
├── overseerr
└── tasks
│ └── main.yml
├── overseerrx
└── tasks
│ ├── main.yml
│ └── template.yml
├── paperless-ng
└── tasks
│ └── main.yml
├── petio
└── tasks
│ └── main.yml
├── phantombot
└── tasks
│ └── main.yml
├── plex-auto-collections
└── tasks
│ └── main.yml
├── plex-meta-manager
└── tasks
│ └── main.yml
├── plex2
├── defaults
│ └── main.yml
└── tasks
│ ├── main.yml
│ └── subtasks
│ ├── claim_server.yml
│ └── preferences.yml
├── postgres
└── tasks
│ └── main.yml
├── pre_tasks
└── tasks
│ ├── main.yml
│ └── subtasks
│ └── apt.yml
├── prowlarr
└── tasks
│ └── main.yml
├── pyload
└── tasks
│ └── main.yml
├── qbittorrent
└── tasks
│ └── main.yml
├── qbittorrentvpn
└── tasks
│ └── main.yml
├── quassel
├── files
│ └── clear_backlog.py
└── tasks
│ └── main.yml
├── radarrx
└── tasks
│ ├── main.yml
│ ├── subtasks
│ ├── darkerr.yml
│ └── suitarr_migration.yml
│ └── template.yml
├── readarr
└── tasks
│ └── main.yml
├── readarrx
└── tasks
│ ├── main.yml
│ └── template.yml
├── redbot
└── tasks
│ └── main.yml
├── redis
└── tasks
│ └── main.yml
├── requestrr
└── tasks
│ └── main.yml
├── requestrrx
└── tasks
│ ├── main.yml
│ └── template.yml
├── resilio-sync
└── tasks
│ ├── main.yml
│ └── subtasks
│ └── legacy_migration.yml
├── rocketchat
└── tasks
│ └── main.yml
├── sanity_check
└── tasks
│ ├── main.yml
│ └── subtasks
│ ├── backup_check.yml
│ ├── cloudbox_check.yml
│ ├── tags_check.yml
│ └── touch_logs.yml
├── searx
└── tasks
│ └── main.yml
├── settings
├── files
│ └── settings-updater.py
└── tasks
│ ├── ansible_config.yml
│ ├── ansible_config_2.yml
│ ├── exit.yml
│ ├── main.yml
│ └── settings_updater.yml
├── sickchill
└── tasks
│ └── main.yml
├── smokeping
└── tasks
│ └── main.yml
├── sonarrx
└── tasks
│ ├── main.yml
│ ├── subtasks
│ ├── darkerr.yml
│ └── suitarr_migration.yml
│ └── template.yml
├── speedtest
└── tasks
│ └── main.yml
├── sshwifty
├── tasks
│ └── main.yml
└── templates
│ └── sshwifty.conf.json.j2
├── stash
└── tasks
│ └── main.yml
├── subsonic
└── tasks
│ └── main.yml
├── synclounge
└── tasks
│ └── main.yml
├── tdarrv2-node
└── tasks
│ └── main.yml
├── tdarrv2
└── tasks
│ └── main.yml
├── telegraf
├── files
│ └── telegraf.conf
└── tasks
│ └── main.yml
├── telly
├── tasks
│ ├── main.yml
│ ├── telly10.yml
│ ├── telly11.yml
│ └── telly15.yml
└── templates
│ └── telly11.config.json.j2
├── thelounge
└── tasks
│ └── main.yml
├── transmissionvpn
└── tasks
│ └── main.yml
├── transmissionx
└── tasks
│ ├── main.yml
│ ├── settings
│ ├── dynamic.yml
│ ├── main.yml
│ └── static.yml
│ └── template.yml
├── ubooquity
└── tasks
│ └── main.yml
├── unifi
└── tasks
│ └── main.yml
├── unmanic
└── tasks
│ └── main.yml
├── varken
├── tasks
│ ├── config.yml
│ └── main.yml
└── templates
│ └── varken.ini.js2
├── vnstat
└── tasks
│ └── main.yml
├── vscode
└── tasks
│ └── main.yml
├── wallabag
└── tasks
│ └── main.yml
├── watchtower
├── tasks
│ └── main.yml
└── templates
│ └── watchtower.env.j2
├── whisparr
└── tasks
│ └── main.yml
├── wordpress
└── tasks
│ └── main.yml
├── xbackbone
└── tasks
│ └── main.yml
├── xteve
└── tasks
│ └── main.yml
└── znc
└── tasks
└── main.yml
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | Please review this template and edit it as appropriate. It's not been provided as a thing to ignore. If there are things that don't apply, remove them. Don't just check boxes for the sake of checking boxes. Remove this paragraph and the related thing below.
2 |
3 | # Description
4 |
5 | Please include a summary of the change and which issue is fixed if any. Please also include relevant motivation and context. List any dependencies that are required for this change.
6 |
7 | # How Has This Been Tested?
8 |
9 | Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.
10 |
11 | - [ ] Test A
12 | - [ ] Test B
13 |
14 | # New Role Checklist:
15 |
16 | - [ ] I have reviewed the [Contribute page in the wiki](https://github.com/Cloudbox/Community/wiki/Contribute)
17 | - [ ] I have updated the header in any files I may have used as templates with my own information
18 | - [ ] I have added my new role to `[COMMUNITY REPO ROOT]/.github/workflows/ci.yml`
19 | - [ ] I have added my new role to `community.yml`
20 | - [ ] I have verified that any Docker images used are current and supported.
21 | - [ ] I have made corresponding changes to the documentation
22 | - [ ] This line is still here because I didn't bother to read to the end
23 |
--------------------------------------------------------------------------------
/.github/pull.yml:
--------------------------------------------------------------------------------
1 | version: "1"
2 | rules:
3 | - base: master
4 | upstream: cloudbox:master
5 | mergeMethod: hardreset
6 | - base: develop
7 | upstream: cloudbox:develop
8 | mergeMethod: hardreset
9 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on: [push, pull_request, workflow_dispatch]
4 |
5 | jobs:
6 | find-roles:
7 | runs-on: ubuntu-latest
8 | outputs:
9 | matrix: ${{ steps.set-matrix.outputs.matrix }}
10 | steps:
11 | - uses: actions/checkout@v2
12 | - id: set-matrix
13 | run: OUTPUT=$(awk -F'[][]' -e '/ role:/ && FNR > 13' community.yml | awk '!/#/' | awk -F'[][]' '{print $2}' | tr '\n' ',' | sed 's/,*$//' | sed "s/.\(drive_strm\|drive_strm_rebuild\|hetzner_nfs_server\|hetzner_nfs_server_uninstall\|hetzner_nfs_client_mount\|hetzner_nfs_client_unmount\).,//g") && echo "::set-output name=matrix::{\"roles\":[$OUTPUT]}"
14 |
15 | install:
16 | name: '${{ matrix.roles }}'
17 | needs: find-roles
18 | runs-on: ubuntu-18.04
19 | strategy:
20 | matrix: ${{fromJson(needs.find-roles.outputs.matrix)}}
21 | fail-fast: false
22 |
23 | steps:
24 | - uses: actions/checkout@v2
25 |
26 | - name: Install Dependencies
27 | run: curl -s https://cloudbox.works/scripts/dep.sh | sudo -H sh &> /dev/null
28 |
29 | - name: Install Repository
30 | run: curl -s https://cloudbox.works/scripts/repo.sh | bash &> /dev/null
31 |
32 | - name: Change default configuration user
33 | run: cd /home/runner/cloudbox && sed -i 's/seed/runner/g' accounts.yml
34 |
35 | - name: Syntax Check
36 | run: cd /home/runner/cloudbox && sudo ansible-playbook cloudbox.yml --syntax-check
37 |
38 | - name: Install Cloudbox
39 | run: cd /home/runner/cloudbox && sudo ansible-playbook cloudbox.yml --tags "core" --skip-tags "sanity_check,settings,kernel,hetzner,shell,rclone,system,motd,nvidia,mounts,scripts" --extra-vars '{"continuous_integration":true}'
40 |
41 | - name: Copy default configuration
42 | run: cp -n defaults/ansible.cfg.default ansible.cfg && cp -n defaults/settings.yml.default settings.yml
43 |
44 | - name: Install ${{ matrix.roles }}
45 | run: sudo ansible-playbook community.yml --tags "${{ matrix.roles }}" --skip-tags "sanity_check,settings" --extra-vars '{"continuous_integration":true}'
46 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # MacOS
2 | .DS_Store
3 |
4 | # Python
5 | *.pyc
6 |
7 | # VSCode
8 | .vscode/
9 |
10 | # Ansible
11 | /*.retry
12 |
13 | # Community
14 | /ansible.cfg
15 | /*.yml
16 | !/appveyor.yml
17 | !/community.yml
18 | /*.log
19 |
--------------------------------------------------------------------------------
/ansible_facts.d/group.fact:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # https://github.com/ifor2u/specbase
3 |
4 | import json
5 |
6 | file = open("/etc/group", "r+")
7 |
8 | list = {}
9 | while True:
10 | line = file.readline()
11 | if not line:
12 | break
13 | tokens = line.rstrip().split(":")
14 | group = {}
15 | group["gid"] = tokens[2]
16 | group["group-list"] = []
17 | if len(tokens) == 4:
18 | for token in tokens[3].split(","):
19 | if token == "":
20 | break
21 | group["group-list"].append(token)
22 | list[tokens[0]] = group
23 |
24 | print(json.dumps(list))
25 |
--------------------------------------------------------------------------------
/ansible_facts.d/timezone.fact:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # https://medium.com/hotels-com-technology/back-to-the-future-af4431aa6e97
4 |
5 | if [ -z "$TZ" ]
6 | then
7 | zoneinfo="/usr/share/zoneinfo"
8 | localtime="/etc/localtime"
9 | for f in $(find $zoneinfo -not -wholename $zoneinfo -not -wholename *localtime* -not -wholename *right* -not -wholename *Etc/UTC*); do
10 | dumped=$(zdump $f)
11 | zoneTime=$(echo $dumped | cut -d" " -f2-)
12 | currentTime=$(echo $(zdump $localtime) | cut -d" " -f2-)
13 | if [[ "$currentTime" == "$zoneTime" ]]; then
14 | tzfile=$(echo $dumped | cut -d" " -f1)
15 | break
16 | fi
17 | done
18 | TZ=$(echo $tzfile | cut -d/ -f5-)
19 | fi
20 |
21 | [ -z "$TZ" ] && TZ="Etc/UTC"
22 |
23 | echo "\"$TZ\""
24 |
--------------------------------------------------------------------------------
/ansible_facts.d/user.fact:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # https://github.com/ifor2u/specbase
3 |
4 | import json
5 |
6 | file = open("/etc/passwd", "r+")
7 |
8 | list = {}
9 | while True:
10 | line = file.readline()
11 | if not line:
12 | break
13 | tokens = line.rstrip().split(":")
14 | user = {}
15 | user["uid"] = tokens[2]
16 | user["gid"] = tokens[3]
17 | user["comment"] = tokens[4]
18 | user["home"] = tokens[5]
19 | user["shell"] = tokens[6]
20 | list[tokens[0]] = user
21 |
22 | print(json.dumps(list))
23 |
--------------------------------------------------------------------------------
/defaults/ansible.cfg.default:
--------------------------------------------------------------------------------
1 | [defaults]
2 | inventory = ./inventories/local
3 | roles_path = roles:$HOME/cloudbox/roles:$HOME/cloudbox/resources/roles
4 | fact_path = ./ansible_facts.d
5 | log_path = ./community.log
6 | hash_behaviour = merge
7 | callback_whitelist = profile_tasks
8 | command_warnings = False
9 | retry_files_enabled = False
10 | force_color = True
11 |
--------------------------------------------------------------------------------
/defaults/hetzner_nfs.yml.default:
--------------------------------------------------------------------------------
1 | hetzner_nfs:
2 | vlan_id: 4000
3 | mount_client: 3
4 |
--------------------------------------------------------------------------------
/defaults/telly.yml.default:
--------------------------------------------------------------------------------
1 | telly:
2 | version: 1.0
3 | telly10:
4 | TELLY_FILTER_REGEX_MODE: true
5 | TELLY_FILTER_REGEX: ".*"
6 | TELLY_IPTV_PLAYLIST: "/opt/telly/file.m3u or URL2M3U"
7 | TELLY_LOG_LEVEL: "Info"
8 | TELLY_LOG_REQUESTS: false
9 | TELLY_IPTV_DIRECT: false
10 | TELLY_IPTV_STARTING_CHANNEL: "10000"
11 | TELLY_IPTV_STREAMS: "1"
12 | TELLY_DISCOVERY_DEVICE_ID: "12345678"
13 | TELLY_DISCOVERY_DEVICE_FRIENDLY_NAME: "telly"
14 | TELLY_DISCOVERY_DEVICE_AUTH: "telly123"
15 | TELLY_DISCOVERY_DEVICE_MANUFACTURER: "Silicondust"
16 | TELLY_DISCOVERY_DEVICE_MODEL_NUMBER: "HDTC-2US"
17 | TELLY_DISCOVERY_DEVICE_FIRMWARE_NAME: "hdhomeruntc_atsc"
18 | TELLY_DISCOVERY_DEVICE_FIRMWARE_VERSION: "20150826"
19 | TELLY_DISCOVERY_SSDP: true
20 | telly11:
21 | streams: 1
22 | provider_name: CloudTV
23 | m3u_url: /opt/telly/file.m3u or URL2M3U
24 | epg_url: /opt/telly/file.xml or URL2XML
25 | filter: USA
26 |
--------------------------------------------------------------------------------
/filter_plugins/pluralize.py:
--------------------------------------------------------------------------------
1 |
2 | # Modified version of https://github.com/audreyr/jinja2_pluralize
3 |
4 | def pluralize(value, arg='s', arg2=None):
5 | """
6 | Adapted from django.template.defaultfilters:
7 | https://github.com/django/django/blob/master/django/template/defaultfilters.py
8 |
9 | Returns a plural suffix if the value is not 1. By default, 's' is used as
10 | the suffix:
11 |
12 | * If value is 0, vote{{ value | pluralize }} displays "0 votes".
13 | * If value is 1, vote{{ value | pluralize }} displays "1 vote".
14 | * If value is 2, vote{{ value | pluralize }} displays "2 votes".
15 |
16 | If an argument is provided, that string is used instead:
17 |
18 | * If value is 0, class{{ value | pluralize('es') }} displays "0 classes".
19 | * If value is 1, class{{ value | pluralize('es') }} displays "1 class".
20 | * If value is 2, class{{ value | pluralize('es') }} displays "2 classes".
21 |
22 | If the provided argument contains a comma, the text before the comma is
23 | used for the singular case and the text after the comma is used for the
24 | plural case:
25 |
26 | * If value is 0, cand{{ value | pluralize('y','ies') }} displays "0 candies".
27 | * If value is 1, cand{{ value | pluralize('y','ies') }} displays "1 candy".
28 | * If value is 2, cand{{ value | pluralize('y','ies') }} displays "2 candies".
29 | """
30 |
31 | if arg2 is not None:
32 | singular_suffix = arg
33 | plural_suffix = arg2
34 | else:
35 | singular_suffix = ''
36 | plural_suffix = arg
37 |
38 | try:
39 | if int(value) != 1:
40 | return plural_suffix
41 | except ValueError: # Invalid string that's not a number.
42 | pass
43 | except TypeError: # Value isn't a string or a number; maybe it's a list?
44 | try:
45 | if len(value) != 1:
46 | return plural_suffix
47 | except TypeError: # len() of unsized object.
48 | pass
49 | return singular_suffix
50 |
51 |
52 | class FilterModule(object):
53 | ''' adds pluralize filter '''
54 | def filters(self):
55 | return {
56 | # filter map
57 | 'pluralize': pluralize
58 | }
59 |
--------------------------------------------------------------------------------
/inventories/host_vars/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cloudbox/Community/58109d25927a5c353d900757ffbf828064207625/inventories/host_vars/.gitkeep
--------------------------------------------------------------------------------
/inventories/local:
--------------------------------------------------------------------------------
1 | [local]
2 | localhost ansible_connection=local
3 |
--------------------------------------------------------------------------------
/roles/airdcpp/files/DCPlusPlus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | /Downloads/
4 | 0
5 | 21248
6 | 21248
7 | 21249
8 | 1000
9 | 1000
10 | 120
11 | 134217700
12 | 0
13 | 2
14 | 50
15 | 2
16 | 1
17 | 2
18 | 1
19 | 1
20 | 1
21 | 1
22 | 524288
23 | 33554430
24 | 33554430
25 | 32
26 | 1
27 | 1
28 |
29 |
30 | /Share/
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/roles/airdcpp/files/WebServer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/roles/airsonic/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Airsonic #
3 | # Author(s): Superduper09 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/airsonic #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: airsonic
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: airsonic
22 | state: absent
23 |
24 | - name: Create airsonic directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/airsonic
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: airsonic
32 | image: lscr.io/linuxserver/airsonic
33 | pull: yes
34 | env:
35 | PUID: "{{ uid }}"
36 | PGID: "{{ gid }}"
37 | TZ: "{{ tz }}"
38 | VIRTUAL_HOST: "airsonic.{{ user.domain }}"
39 | VIRTUAL_PORT: "4040"
40 | LETSENCRYPT_HOST: "airsonic.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | volumes:
43 | - "/opt/airsonic:/config"
44 | - "/mnt:/mnt"
45 | labels:
46 | "com.github.cloudbox.cloudbox_managed": "true"
47 | networks:
48 | - name: cloudbox
49 | aliases:
50 | - airsonic
51 | purge_networks: yes
52 | restart_policy: unless-stopped
53 | state: started
54 |
--------------------------------------------------------------------------------
/roles/alltube/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: AllTube #
3 | # Author(s): primaxius #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): rudloff/alltube #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: alltube
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: alltube
22 | state: absent
23 |
24 | - name: Create alltube directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/alltube
28 |
29 | - name: Download alltube config example
30 | get_url:
31 | url: "https://raw.githubusercontent.com/Rudloff/alltube/master/config/config.example.yml"
32 | dest: "/opt/alltube/config.example.yml"
33 | owner: "{{ user.name }}"
34 | group: "{{ user.name }}"
35 | mode: 0775
36 | force: yes
37 |
38 | - name: Create and start container
39 | docker_container:
40 | name: alltube
41 | image: "rudloff/alltube:latest"
42 | pull: yes
43 | volumes:
44 | - "/opt/alltube:/var/www/html/config:rw"
45 | env:
46 | TZ: "{{ tz }}"
47 | VIRTUAL_HOST: "alltube.{{ alltube.domain | default(user.domain,true) }}"
48 | VIRTUAL_PORT: "80"
49 | LETSENCRYPT_HOST: "alltube.{{ alltube.domain | default(user.domain,true) }}"
50 | LETSENCRYPT_EMAIL: "{{ user.email }}"
51 | labels:
52 | "com.github.cloudbox.cloudbox_managed": "true"
53 | networks:
54 | - name: cloudbox
55 | aliases:
56 | - alltube
57 | purge_networks: yes
58 | restart_policy: unless-stopped
59 | state: started
60 |
--------------------------------------------------------------------------------
/roles/alternatrrx/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: alternatrr #
3 | # Author(s): TheUltimateC0der #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): theultimatecoder/alternatrr #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Gather list of alternatrrx Docker containers"
13 | shell: "docker ps -a --format '{{ '{{' }} .Names{{ '}}' }}' --filter label=com.github.cloudbox.community=alternatrrx | xargs echo -n"
14 | register: cloudbox_community_alternatrrx
15 | ignore_errors: yes
16 |
17 | - name: "Stop all alternatrrx Docker containers"
18 | shell: "docker stop {{ cloudbox_community_alternatrrx.stdout }}"
19 | ignore_errors: yes
20 | when: (cloudbox_community_alternatrrx.stdout | trim | length > 0)
21 |
22 | - name: "Remove all alternatrrx Docker containers"
23 | shell: "docker rm {{ cloudbox_community_alternatrrx.stdout }}"
24 | ignore_errors: yes
25 | when: (cloudbox_community_alternatrrx.stdout | trim | length > 0)
26 |
27 | - name: "Execute alternatrrx roles"
28 | include_tasks: template.yml
29 | vars:
30 | rolename: "{{ role }}"
31 | with_items: "{{ alternatrrx.roles }}"
32 | loop_control:
33 | loop_var: role
--------------------------------------------------------------------------------
/roles/amongus/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Minecraft Server #
3 | # Author(s): FML128 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): denverquane/amongusdiscord #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: amongus
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: amongus
22 | state: absent
23 |
24 | - name: Create amongus directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/amongus
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: amongus
32 | image: denverquane/amongusdiscord
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | UID: "{{ uid }}"
37 | GID: "{{ gid }}"
38 | DISCORD_BOT_TOKEN: "{{ amongus.token }}"
39 | SERVER_URL: "https://amongus.{{ user.domain }}"
40 | EXT_PORT: "443"
41 | CONFIG_PATH: "/config"
42 | VIRTUAL_HOST: "amongus.{{ user.domain }}"
43 | VIRTUAL_PORT: "443"
44 | LETSENCRYPT_HOST: "amongus.{{ user.domain }}"
45 | LETSENCRYPT_EMAIL: "{{ user.email }}"
46 | volumes:
47 | - "/etc/localtime:/etc/localtime:ro"
48 | - "/opt/amongus:/config"
49 | labels:
50 | "com.github.cloudbox.cloudbox_managed": "true"
51 | networks:
52 | - name: cloudbox
53 | aliases:
54 | - amongus
55 | purge_networks: yes
56 | restart_policy: unless-stopped
57 | state: started
58 |
--------------------------------------------------------------------------------
/roles/apprise/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Apprise #
3 | # Author(s): owine #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): caronc/apprise #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: apprise
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: apprise
22 | state: absent
23 |
24 | - name: Create htpasswd
25 | htpasswd:
26 | path: "/opt/nginx-proxy/htpasswd/{{ item }}.{{ user.domain }}"
27 | name: "{{ user.name }}"
28 | password: "{{ user.pass }}"
29 | owner: "{{ user.name }}"
30 | group: "{{ user.name }}"
31 | mode: 0664
32 | with_items:
33 | - apprise
34 |
35 | - name: Create apprise directories
36 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
37 | with_items:
38 | - /opt/apprise
39 |
40 | - name: Create and start container
41 | docker_container:
42 | name: apprise
43 | image: caronc/apprise
44 | pull: yes
45 | env:
46 | VIRTUAL_HOST: "apprise.{{ user.domain }}"
47 | VIRTUAL_PORT: "8000"
48 | LETSENCRYPT_HOST: "apprise.{{ user.domain }}"
49 | LETSENCRYPT_EMAIL: "{{ user.email }}"
50 | HTTPS_METHOD: "nohttps"
51 | volumes:
52 | - "/opt/apprise:/config"
53 | - "/mnt:/mnt"
54 | labels:
55 | "com.github.cloudbox.cloudbox_managed": "true"
56 | networks:
57 | - name: cloudbox
58 | aliases:
59 | - apprise
60 | purge_networks: yes
61 | restart_policy: unless-stopped
62 | state: started
63 |
--------------------------------------------------------------------------------
/roles/archivebox/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Archive Box #
3 | # Author(s): 4everfun #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): archivebox/archivebox #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: archivebox
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: archivebox
22 | state: absent
23 |
24 | - name: Create archivebox directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/archivebox
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: archivebox
32 | image: "archivebox/archivebox:latest"
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | VIRTUAL_HOST: "archivebox.{{ user.domain }}"
39 | VIRTUAL_PORT: "8000"
40 | LETSENCRYPT_HOST: "archivebox.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | command:
43 | volumes:
44 | - "/opt/archivebox:/data"
45 | labels:
46 | "com.github.cloudbox.cloudbox_managed": "true"
47 | networks:
48 | - name: cloudbox
49 | aliases:
50 | - archivebox
51 | purge_networks: yes
52 | restart_policy: unless-stopped
53 | state: started
54 |
--------------------------------------------------------------------------------
/roles/audiobookshelf/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Audiobookshelf #
3 | # Author(s): astrodad #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): ghcr.io/advplyr/audiobookshelf #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: audiobookshelf
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: audiobookshelf
22 | state: absent
23 |
24 | - name: Create audiobookshelf directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/audiobookshelf
28 | - /opt/audiobookshelf/metadata
29 |
30 | - name: Create and start container
31 | docker_container:
32 | name: audiobookshelf
33 | image: ghcr.io/advplyr/audiobookshelf:latest
34 | pull: yes
35 | env:
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | TZ: "{{ tz }}"
39 | VIRTUAL_HOST: "audiobookshelf.{{ user.domain }}"
40 | VIRTUAL_PORT: "13378"
41 | LETSENCRYPT_HOST: "audiobookshelf.{{ user.domain }}"
42 | LETSENCRYPT_EMAIL: "{{ user.email }}"
43 | volumes:
44 | - "/opt/audiobookshelf:/config"
45 | - "/opt/audiobookshelf/metadata:/metadata"
46 | - "/mnt/unionfs/Media/Audiobooks:/audiobooks"
47 | - "/mnt/unionfs/Media/Podcasts:/podcasts"
48 | - "/mnt:/mnt"
49 |
50 | labels:
51 | "com.github.cloudbox.cloudbox_managed": "true"
52 | networks:
53 | - name: cloudbox
54 | aliases:
55 | - audiobookshelf
56 | purge_networks: yes
57 | restart_policy: unless-stopped
58 | state: started
59 |
--------------------------------------------------------------------------------
/roles/bazarrx/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: BazarrX #
3 | # Author(s): Migz93 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/bazarr #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Gather list of bazarrx Docker containers"
13 | shell: "docker ps -a --format '{{ '{{' }} .Names{{ '}}' }}' --filter label=com.github.cloudbox.community=bazarrx | xargs echo -n"
14 | register: cloudbox_community_bazarrx
15 | ignore_errors: yes
16 |
17 | - name: "Stop all bazarrx Docker containers"
18 | shell: "docker stop {{ cloudbox_community_bazarrx.stdout }}"
19 | ignore_errors: yes
20 | when: (cloudbox_community_bazarrx.stdout | trim | length > 0)
21 |
22 | - name: "Remove all bazarrx Docker containers"
23 | shell: "docker rm {{ cloudbox_community_bazarrx.stdout }}"
24 | ignore_errors: yes
25 | when: (cloudbox_community_bazarrx.stdout | trim | length > 0)
26 |
27 | - name: "Execute BazarrX roles"
28 | include_tasks: template.yml
29 | vars:
30 | rolename: "{{ role }}"
31 | with_items: "{{ bazarrx.roles }}"
32 | loop_control:
33 | loop_var: role
34 |
--------------------------------------------------------------------------------
/roles/booksonic/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Booksonic #
3 | # Author(s): moarbytes, muplah #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/booksonic #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: booksonic
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: booksonic
22 | state: absent
23 |
24 | - name: Create booksonic directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/booksonic
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: booksonic
32 | image: lscr.io/linuxserver/booksonic
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | VIRTUAL_HOST: "booksonic.{{ user.domain }}"
39 | VIRTUAL_PORT: "4040"
40 | LETSENCRYPT_HOST: "booksonic.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | volumes:
43 | - "/opt/booksonic:/config"
44 | - "/mnt/unionfs/Media/Audiobooks:/audiobooks"
45 | - "/mnt/unionfs/Media/Podcasts:/podcasts"
46 | - "/mnt/unionfs:/media"
47 | - "/mnt:/mnt"
48 | - "/mnt/unionfs/Media:/data"
49 | labels:
50 | "com.github.cloudbox.cloudbox_managed": "true"
51 | networks:
52 | - name: cloudbox
53 | aliases:
54 | - booksonic
55 | purge_networks: yes
56 | restart_policy: unless-stopped
57 | state: started
58 |
--------------------------------------------------------------------------------
/roles/calibre-web/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Calibre-Web #
3 | # Author(s): Superduper09, -SK #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/calibre-web #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: books
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: calibre-web
22 | state: absent
23 |
24 | - name: Create calibre directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/calibre-web
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: calibre-web
32 | image: lscr.io/linuxserver/calibre-web
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | VIRTUAL_HOST: "books.{{ user.domain }}"
39 | VIRTUAL_PORT: "8083"
40 | LETSENCRYPT_HOST: "books.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | USE_CONFIG_DIR: "true"
43 | DOCKER_MODS: linuxserver/calibre-web:calibre
44 | volumes:
45 | - "/mnt/unionfs/Media/Books:/books"
46 | - "/opt/calibre-web/config:/config"
47 | - "/opt/calibre-web:/calibre-web"
48 | - "/mnt:/mnt"
49 | labels:
50 | "com.github.cloudbox.cloudbox_managed": "true"
51 | networks:
52 | - name: cloudbox
53 | aliases:
54 | - calibre-web
55 | purge_networks: yes
56 | restart_policy: unless-stopped
57 | state: started
58 |
--------------------------------------------------------------------------------
/roles/cloudflare-dns/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Cloudflare DNS Role #
3 | # Author(s): l3uddz, desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: Install 'dnsutils'
12 | apt: "name=dnsutils state=present"
13 |
14 | - name: Get Public IP Address
15 | shell: "{{ ip_address_lookup_command }}"
16 | register: public_ip_lookup
17 |
18 | - name: Set 'public_ip' variable
19 | set_fact:
20 | public_ip: "{{ public_ip_lookup.stdout }}"
21 |
22 | - name: Set DNS Record
23 | cloudflare_dns:
24 | account_api_token: "{{ cloudflare.api }}"
25 | account_email: "{{ cloudflare.email }}"
26 | zone: "{{ user.domain }}"
27 | state: present
28 | solo: true
29 | type: A
30 | value: "{{ public_ip }}"
31 | record: "{{ record }}"
32 |
33 | - name: Set 'record_temp' variable
34 | set_fact:
35 | record_temp: "{{ (record == user.domain) | ternary(user.domain,record + '.' + user.domain) }}"
36 |
37 | - name: Display DNS Record
38 | debug:
39 | msg: "DNS Record for '{{ record_temp }}' set to '{{ public_ip }}'."
40 |
--------------------------------------------------------------------------------
/roles/coder/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Coder #
3 | # Author(s): astroMD #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): codercom/code-server #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: coder
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing containers
20 | docker_container: "name={{ item }} state=absent"
21 | with_items:
22 | - coder
23 |
24 | - name: Create required directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/coder
28 |
29 | - name: Create and start coder container
30 | docker_container:
31 | name: coder
32 | image: "codercom/code-server"
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | PASSWORD: "{{ user.pass }}"
39 | VIRTUAL_HOST: "coder.{{ user.domain }}"
40 | VIRTUAL_PORT: "8080"
41 | LETSENCRYPT_HOST: "coder.{{ user.domain }}"
42 | LETSENCRYPT_EMAIL: "{{ user.email }}"
43 | volumes:
44 | - "/home/{{ user.name }}/workspaces:/home/coder/project"
45 | - "/mnt:/mnt"
46 | - "/opt:/host_opt"
47 | - "/home/{{ user.name }}:/home/coder/host"
48 | labels:
49 | "com.github.cloudbox.cloudbox_managed": "true"
50 | networks:
51 | - name: cloudbox
52 | aliases:
53 | - coder
54 | purge_networks: yes
55 | restart_policy: unless-stopped
56 | state: started
57 |
--------------------------------------------------------------------------------
/roles/comicstreamer/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: comicstreamer #
3 | # Author(s): theotocopulitos #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): kalinon/comicstreamer #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: comicstreamer
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: comicstreamer
22 | state: absent
23 |
24 | - name: Create comicstreamer directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/comicstreamer
28 | - /mnt/local/Media/Comics
29 |
30 | - name: Create and start container
31 | docker_container:
32 | name: comicstreamer
33 | image: kalinon/comicstreamer
34 | pull: yes
35 | env:
36 | TZ: "{{ tz }}"
37 | PUID: "{{ uid }}"
38 | PGID: "{{ gid }}"
39 | VIRTUAL_HOST: "comicstreamer.{{ user.domain }}"
40 | VIRTUAL_PORT: "32500"
41 | LETSENCRYPT_HOST: "comicstreamer.{{ user.domain }}"
42 | LETSENCRYPT_EMAIL: "{{ user.email }}"
43 | volumes:
44 | - "/opt/comicstreamer:/config"
45 | - "/mnt/unionfs/Media/Comics:/comics"
46 | - "/mnt:/mnt"
47 |
48 | labels:
49 | "com.github.cloudbox.cloudbox_managed": "true"
50 | networks:
51 | - name: cloudbox
52 | aliases:
53 | - comicstreamer
54 | purge_networks: yes
55 | restart_policy: unless-stopped
56 | state: started
57 |
--------------------------------------------------------------------------------
/roles/comixed/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: comixed #
3 | # Author(s): theotocopulitos #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): comixed/comixed #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: comixed
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: comixed
22 | state: absent
23 |
24 | - name: Create comixed directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/comixed
28 | - /mnt/local/Media/Comics
29 | - name: Create and start container
30 | docker_container:
31 | name: comixed
32 | image: comixed/comixed:latest
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | VIRTUAL_HOST: "comixed.{{ user.domain }}"
39 | VIRTUAL_PORT: "7171"
40 | LETSENCRYPT_HOST: "comixed.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | volumes:
43 | - "/opt/comixed:/root/.comixed"
44 | - "/mnt/unionfs/Media/Comics:/comics"
45 | - "mnt:/mnt"
46 |
47 | labels:
48 | "com.github.cloudbox.cloudbox_managed": "true"
49 | networks:
50 | - name: cloudbox
51 | aliases:
52 | - comixed
53 | purge_networks: yes
54 | restart_policy: unless-stopped
55 | state: started
56 |
--------------------------------------------------------------------------------
/roles/couchpotato/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Couchpotato #
3 | # Author(s): javi11 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/couchpotato #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: 'Setting CloudFlare DNS Record'
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: couchpotato
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: couchpotato
22 | state: absent
23 |
24 | - name: Create couchpotato directories
25 | file: 'path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}'
26 | with_items:
27 | - /opt/couchpotato
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: couchpotato
32 | image: lscr.io/linuxserver/couchpotato
33 | pull: yes
34 | env:
35 | UMASK: "002"
36 | TZ: '{{ tz }}'
37 | PUID: '{{ uid }}'
38 | PGID: '{{ gid }}'
39 | VIRTUAL_HOST: 'couchpotato.{{ user.domain }}'
40 | VIRTUAL_PORT: "5050"
41 | LETSENCRYPT_HOST: 'couchpotato.{{ user.domain }}'
42 | LETSENCRYPT_EMAIL: '{{ user.email }}'
43 | volumes:
44 | - '/opt/couchpotato:/config'
45 | - '/mnt:/mnt'
46 | - '/mnt/unionfs/Media/Movies:/movies'
47 | - '/mnt/local/downloads:/downloads'
48 | labels:
49 | 'com.github.cloudbox.cloudbox_managed': 'true'
50 | networks:
51 | - name: cloudbox
52 | aliases:
53 | - couchpotato
54 | purge_networks: yes
55 | restart_policy: always
56 | state: started
57 |
--------------------------------------------------------------------------------
/roles/dashmachine/tasks/main.yml:
--------------------------------------------------------------------------------
1 |
2 | #########################################################################
3 | # Title: Community: DashMachine #
4 | # Author(s): Jolbol1 #
5 | # URL: https://github.com/Cloudbox/Community #
6 | # Docker Image(s): rmountjoy/dashmachine #
7 | # -- #
8 | # Part of the Cloudbox project: https://cloudbox.works #
9 | #########################################################################
10 | # GNU General Public License v3.0 #
11 | #########################################################################
12 | ---
13 | - name: "Setting CloudFlare DNS Record"
14 | include_role:
15 | name: cloudflare-dns
16 | vars:
17 | record: dashmachine
18 | when: cloudflare_enabled
19 |
20 | - name: Stop and remove any existing containers
21 | docker_container: "name={{ item }} state=absent"
22 | with_items:
23 | - dashmachine
24 |
25 | - name: Create required directories
26 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
27 | with_items:
28 | - /opt/dashmachine/user_data
29 |
30 | - name: Create and start DashMachine container
31 | docker_container:
32 | name: dashmachine
33 | image: "rmountjoy/dashmachine:latest"
34 | pull: yes
35 | env:
36 | TZ: "{{ tz }}"
37 | PUID: "{{ uid }}"
38 | PGID: "{{ gid }}"
39 | VIRTUAL_HOST: "{{ dashmachine.subdomain }}.{{ user.domain }}"
40 | VIRTUAL_PORT: "5000"
41 | LETSENCRYPT_HOST: "{{ dashmachine.subdomain }}.{{ user.domain }}"
42 | LETSENCRYPT_EMAIL: "{{ user.email }}"
43 | LOG_LEVEL: DEBUG
44 | labels:
45 | "com.github.cloudbox.cloudbox_managed": "true"
46 | volumes:
47 | - /opt/dashmachine/user_data:/dashmachine/dashmachine/user_data
48 | networks:
49 | - name: cloudbox
50 | aliases:
51 | - dashmachine
52 | purge_networks: yes
53 | restart_policy: unless-stopped
54 | state: started
55 |
--------------------------------------------------------------------------------
/roles/deemix/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: deemix #
3 | # Author(s): chazlarson #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): bocki/deemix #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: deemix
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: deemix
22 | state: absent
23 |
24 | - name: Create deemix directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }} recurse=yes"
26 | with_items:
27 | - /opt/deemix/
28 | - /mnt/local/downloads/deezer
29 |
30 | - name: Create and start container
31 | docker_container:
32 | name: deemix
33 | image: "registry.gitlab.com/bockiii/deemix-docker"
34 | pull: yes
35 | env:
36 | BACKUP: "yes"
37 | VIRTUAL_HOST: "deemix.{{ user.domain }}"
38 | VIRTUAL_PORT: "6595"
39 | LETSENCRYPT_HOST: "deemix.{{ user.domain }}"
40 | LETSENCRYPT_EMAIL: "{{ user.email }}"
41 | TZ: "{{ tz }}"
42 | UMASK_SET: "022"
43 | PUID: "{{ uid }}"
44 | PGID: "{{ gid }}"
45 | volumes:
46 | - "/mnt:/mnt"
47 | - "/opt/deemix:/config"
48 | - "/mnt/local/downloads/deezer:/downloads"
49 | labels:
50 | "com.github.cloudbox.cloudbox_managed": "true"
51 | networks:
52 | - name: cloudbox
53 | aliases:
54 | - deemix
55 | purge_networks: yes
56 | restart_policy: always
57 | state: started
58 |
--------------------------------------------------------------------------------
/roles/drive_strm/files/drive_strm_rebuild.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #########################################################################
3 | # Title: Drive STRM Rebuild #
4 | # Author(s): desimaniac #
5 | # URL: https://github.com/cloudbox/cloudbox #
6 | # Description: Rebuilds STRMs while keeping config intact. #
7 | # -- #
8 | # Part of the Cloudbox project: https://cloudbox.works #
9 | #########################################################################
10 | # GNU General Public License v3.0 #
11 | #########################################################################
12 |
13 | ################################
14 | # Constants
15 | ################################
16 |
17 | # Config files
18 | readonly DOCKER_CONTAINER="drive_strm"
19 | readonly APP_PATH="/opt/drive_strm"
20 | readonly STRM_PATH="/mnt/strm"
21 |
22 | ################################
23 | # Main
24 | ################################
25 |
26 | # Stop Docker container
27 | docker stop ${DOCKER_CONTAINER} >/dev/null
28 |
29 | # Remove STRM files
30 | rm -rf ${STRM_PATH}/*
31 |
32 | # Remove Drive STRM db files
33 | rm ${APP_PATH}/*.db*
34 |
35 | # Start Docker container
36 | docker start ${DOCKER_CONTAINER} >/dev/null
37 |
--------------------------------------------------------------------------------
/roles/drive_strm/templates/config.json.j2:
--------------------------------------------------------------------------------
1 | {
2 | "google": {
3 | "allowed": {
4 | "file_paths": [
5 | "My Drive/Media/Movies/",
6 | "My Drive/Media/TV/"
7 | ],
8 | "file_extensions": false,
9 | "file_extensions_list":[
10 | "webm","mkv","flv","vob","ogv","ogg","drc","gif",
11 | "gifv","mng","avi","mov","qt","wmv","yuv","rm",
12 | "rmvb","asf","amv","mp4","m4p","m4v","mpg","mp2",
13 | "mpeg","mpe","mpv","m2v","m4v","svi","3gp","3g2",
14 | "mxf","roq","nsv","f4v","f4p","f4a","f4b","mp3",
15 | "flac","ts"
16 | ],
17 | "mime_types": true,
18 | "mime_types_list": ["video"]
19 | },
20 | "client_id": "{{ (client_id.user_input | default('',true)) | trim }}",
21 | "client_secret": "{{ (client_secret.user_input | default('',true)) | trim }}",
22 | "maindrive": true,
23 | "teamdrive": false,
24 | "teamdrives": [],
25 | "poll_interval": 120
26 | },
27 | "server": {
28 | "listen_ip": "0.0.0.0",
29 | "listen_port": 7294,
30 | "direct_streams": false
31 | },
32 | "strm": {
33 | "access_url": "https://strm.{{ user.domain }}/",
34 | "root_path": "/strm",
35 | "remove_empty_dirs": true,
36 | "empty_dir_depth": 4,
37 | "show_transcodes": false,
38 | "chunk_size": 250000
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/roles/emby2/files/dlna.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | false
5 | false
6 | false
7 | 60
8 | 1800
9 |
10 |
--------------------------------------------------------------------------------
/roles/embystat/tasks/subtasks/migration.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: EmbyStat #
3 | # Author(s): Satz #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: Check if older folder exists
12 | stat:
13 | path: /opt/embystats
14 | register: old_folder
15 |
16 | - name: Check folder exists
17 | stat:
18 | path: /opt/embystat
19 | register: folder
20 |
21 | - name: Rename '/opt' folder 'embystats' to 'embystat'
22 | shell: |
23 | mv /opt/embystats /opt/embystat
24 | chown -R {{ user.name }}:{{ user.name }} /opt/embystat
25 | when: (old_folder.stat.exists) and not (folder.stat.exists)
26 |
27 | - name: Check folder exists
28 | stat:
29 | path: /opt/embystat
30 | register: folder
31 |
32 | - name: Check subfolder exists
33 | stat:
34 | path: /opt/embystat/config
35 | register: subfolder
36 |
37 | - name: Move '/opt/embystat' folder contents to 'config' subfolder
38 | shell: |
39 | mv /opt/embystat /tmp/config
40 | mkdir /opt/embystat
41 | mv /tmp/config /opt/embystat/
42 | find /opt/embystat/* -type d -empty -delete
43 | chown -R {{ user.name }}:{{ user.name }} /opt/embystat
44 | when: (folder.stat.exists) and not (subfolder.stat.exists)
45 |
--------------------------------------------------------------------------------
/roles/filebrowser/templates/filebrowser.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cloudbox/Community/58109d25927a5c353d900757ffbf828064207625/roles/filebrowser/templates/filebrowser.db
--------------------------------------------------------------------------------
/roles/filebrowser/templates/filebrowser.json.j2:
--------------------------------------------------------------------------------
1 | {
2 | "port": 1216,
3 | "baseURL": "",
4 | "address": "",
5 | "log": "stdout",
6 | "database": "/database.db",
7 | "root": "/srv"
8 | }
--------------------------------------------------------------------------------
/roles/flaresolverr/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Flaresolverr #
3 | # Author(s): Flaresolverr, Grostim #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # URL: https://github.com/FlareSolverr/FlareSolverr #
6 | # Docker Image(s): flaresolverr/flaresolverr #
7 | # -- #
8 | # Part of the Cloudbox project: https://cloudbox.works #
9 | #########################################################################
10 | # GNU General Public License v3.0 #
11 | #########################################################################
12 | ---
13 |
14 | - name: Stop and remove any existing container
15 | docker_container:
16 | name: flaresolverr
17 | state: absent
18 |
19 | - name: Create and start container
20 | docker_container:
21 | name: flaresolverr
22 | image: "flaresolverr/flaresolverr"
23 | pull: yes
24 | env:
25 | BACKUP: "no"
26 | PUID: "{{ uid }}"
27 | PGID: "{{ gid }}"
28 | UMASK: "002"
29 | CAPTCHA_SOLVER: "hcaptcha-solver"
30 | TZ: "{{ tz }}"
31 | labels:
32 | "com.github.cloudbox.cloudbox_managed": "true"
33 | networks:
34 | - name: cloudbox
35 | aliases:
36 | - flaresolverr
37 | purge_networks: yes
38 | restart_policy: unless-stopped
39 | state: started
40 |
--------------------------------------------------------------------------------
/roles/funkwhale/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Funkwhale #
3 | # Author(s): RXWatcher, Superduper09 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): thetarkus/funkwhale #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: funkwhale
17 | when: cloudflare_enabled
18 |
19 | - name: "Stop and remove funkwhale container"
20 | docker_container:
21 | name: funkwhale
22 | state: absent
23 |
24 | - name: "Create funkwhale directories"
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/funkwhale
28 | - /opt/funkwhale/data
29 |
30 | - name: "Create and start funkwhale container"
31 | docker_container:
32 | name: funkwhale
33 | image: funkwhale/all-in-one:develop
34 | pull: yes
35 | env:
36 | FUNKWHALE_HOSTNAME: "funkwhale.{{ user.domain }}"
37 | NESTED_PROXY: "1"
38 | VIRTUAL_HOST: "funkwhale.{{ user.domain }}"
39 | VIRTUAL_PORT: "80"
40 | LETSENCRYPT_HOST: "funkwhale.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | PUID: "{{ uid }}"
43 | PGID: "{{ gid }}"
44 | volumes:
45 | - "/opt/funkwhale/data:/data"
46 | - "/mnt/unionfs/:/music:ro"
47 | labels:
48 | "com.github.cloudbox.cloudbox_managed": "true"
49 | networks:
50 | - name: cloudbox
51 | aliases:
52 | - funkwhale
53 | purge_networks: yes
54 | restart_policy: unless-stopped
55 | state: started
56 |
57 | - name: "sleep for 10 seconds and continue"
58 | wait_for:
59 | timeout: 10
60 |
--------------------------------------------------------------------------------
/roles/gazee/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Gazee #
3 | # Author(s): Aki #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/gazee #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: gazee
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: gazee
22 | state: absent
23 |
24 | - name: Create gazee directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/gazee
28 | - /mnt/local/Media/Comics
29 |
30 | - name: Create and start container
31 | docker_container:
32 | name: gazee
33 | image: linuxserver/gazee
34 | pull: yes
35 | env:
36 | TZ: "{{ tz }}"
37 | PUID: "{{ uid }}"
38 | PGID: "{{ gid }}"
39 | VIRTUAL_HOST: "gazee.{{ user.domain }}"
40 | VIRTUAL_PORT: "4242"
41 | LETSENCRYPT_HOST: "gazee.{{ user.domain }}"
42 | LETSENCRYPT_EMAIL: "{{ user.email }}"
43 | volumes:
44 | - "/opt/gazee:/config"
45 | - "/mnt/local/downloads/nzbs:/downloads/nzbs"
46 | - "/mnt/unionfs/Media/Comics:/comics"
47 | labels:
48 | "com.github.cloudbox.cloudbox_managed": "true"
49 | networks:
50 | - name: cloudbox
51 | aliases:
52 | - gazee
53 | purge_networks: yes
54 | restart_policy: unless-stopped
55 | state: started
56 |
--------------------------------------------------------------------------------
/roles/goplaxt/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: GoPlaxt #
3 | # Author(s): EnorMOZ #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): xanderstrike/goplaxt #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: goplaxt
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: goplaxt
22 | state: absent
23 |
24 | - name: Create goplaxt directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/goplaxt
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: goplaxt
32 | image: xanderstrike/goplaxt
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | VIRTUAL_HOST: "goplaxt.{{ user.domain }}"
39 | VIRTUAL_PORT: "8000"
40 | LETSENCRYPT_HOST: "goplaxt.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | TRAKT_ID: "{{ goplaxt.trakt_id }}"
43 | TRAKT_secret: "{{ goplaxt.trakt_secret }}"
44 | REDIRECT_URI: "https://goplaxt.{{ user.domain }}"
45 | volumes:
46 | - "/opt/goplaxt:/app/keystore"
47 | labels:
48 | "com.github.cloudbox.cloudbox_managed": "true"
49 | networks:
50 | - name: cloudbox
51 | aliases:
52 | - goplaxt
53 | purge_networks: yes
54 | restart_policy: unless-stopped
55 | state: started
56 |
--------------------------------------------------------------------------------
/roles/gotify/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Gotify-server #
3 | # Author(s): Bas #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): gotify/server #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: gotify
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: gotify
22 | state: absent
23 |
24 | - name: Create gotify-server directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }} recurse=yes"
26 | with_items:
27 | - /opt/gotify
28 | - /opt/gotify/config
29 |
30 | - name: Create and start container
31 | docker_container:
32 | name: gotify
33 | image: gotify/server
34 | pull: yes
35 | env:
36 | TZ: "{{ tz }}"
37 | VIRTUAL_HOST: "gotify.{{ user.domain }}"
38 | VIRTUAL_PORT: "80"
39 | LETSENCRYPT_HOST: "gotify.{{ user.domain }}"
40 | LETSENCRYPT_EMAIL: "{{ user.email }}"
41 | GOTIFY_DEFAULTUSER_NAME: "{{ user.name }}"
42 | GOTIFY_DEFAULTUSER_PASS: "{{ user.pass }}"
43 | volumes:
44 | - "/opt/gotify/config:/app/data"
45 | labels:
46 | "com.github.cloudbox.cloudbox_managed": "true"
47 | networks:
48 | - name: cloudbox
49 | aliases:
50 | - gotify
51 | restart_policy: unless-stopped
52 | state: started
53 |
54 | - name: "Wait for 30 seconds"
55 | wait_for:
56 | timeout: 30
57 |
58 | - name: Reset gotify-server directories
59 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }} recurse=yes"
60 | with_items:
61 | - /opt/gotify
62 |
--------------------------------------------------------------------------------
/roles/grafana/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Cloudbox: Grafana Role #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/cloudbox/cloudbox #
5 | # Docker Image(s): grafana/grafana #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: grafana
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing containers
20 | docker_container:
21 | name: grafana
22 | state: absent
23 |
24 | - name: Create required directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/grafana
28 |
29 | - name: Create and start grafana container
30 | docker_container:
31 | name: grafana
32 | image: "grafana/grafana"
33 | pull: yes
34 | user: "{{ uid }}:{{ gid }}"
35 | env:
36 | GF_SERVER_ROOT_URL: "https://grafana.{{ user.domain }}"
37 | GF_SECURITY_ADMIN_PASSWORD: "{{ user.pass }}"
38 | GF_INSTALL_PLUGINS: "{{ grafana.plugins }}"
39 | VIRTUAL_HOST: "grafana.{{ user.domain }}"
40 | VIRTUAL_PORT: "3000"
41 | LETSENCRYPT_HOST: "grafana.{{ user.domain }}"
42 | LETSENCRYPT_EMAIL: "{{ user.email }}"
43 | volumes:
44 | - "/etc/localtime:/etc/localtime:ro"
45 | - "/opt/grafana:/var/lib/grafana"
46 | labels:
47 | "com.github.cloudbox.cloudbox_managed": "true"
48 | networks:
49 | - name: cloudbox
50 | aliases:
51 | - grafana
52 | purge_networks: yes
53 | restart_policy: unless-stopped
54 | state: started
55 |
--------------------------------------------------------------------------------
/roles/healthchecks/templates/local_settings.py.j2:
--------------------------------------------------------------------------------
1 | EMAIL_HOST = "smtp.gmail.com"
2 | DEFAULT_FROM_EMAIL = "noreply@{{ user.domain }}"
3 | BASE_URL = "healthchecks.{{ user.domain }}"
4 | EMAIL_USE_TLS = True
5 | SITE_ROOT = "https://healthchecks.{{ user.domain }}"
6 | DEBUG = False
7 | EMAIL_PORT = "587"
8 | SITE_NAME = "healthchecks"
9 | EMAIL_HOST_PASSWORD = "{{ user.pass }}"
10 | EMAIL_HOST_USER = "{{ user.email }}"
11 | ALLOWED_HOSTS = ["*"]
12 | CSRF_TRUSTED_ORIGINS = ["*"]
13 |
--------------------------------------------------------------------------------
/roles/hetzner_nfs/tasks/hetzner_nfs_server_uninstall.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Hetzner NFS: Hetzner NFS Server Uninstall Task #
3 | # Author(s): l3uddz, desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: Check 'nfs_vlan.service' exists
12 | stat:
13 | path: '/etc/systemd/system/nfs_vlan.service'
14 | register: nfs_vlan_service
15 |
16 | - name: Stop 'nfs_vlan.service'
17 | systemd:
18 | state: stopped
19 | name: nfs_vlan
20 | daemon_reload: yes
21 | enabled: no
22 | when: nfs_vlan_service.stat.exists
23 |
24 | - name: Uninstall nfs requirements
25 | apt:
26 | state: absent
27 | name:
28 | - rpcbind
29 | - nfs-kernel-server
30 |
31 | - name: Remove files
32 | file:
33 | path: "{{ item }}"
34 | state: absent
35 | with_items:
36 | - "/etc/systemd/system/nfs_vlan.service"
37 | - "/etc/exports"
38 | - "/etc/hosts.deny"
39 | - "/opt/hetzner_nfs"
40 |
41 | - name: Reboot message
42 | debug:
43 | msg:
44 | - "Restarting the server to apply changes..."
45 |
46 | - name: Reboot
47 | shell: reboot
48 |
49 | - name: Reboot message
50 | debug:
51 | msg:
52 | - "Failed to reboot automatically."
53 | - "You will need to restart the server yourself."
54 |
--------------------------------------------------------------------------------
/roles/hetzner_nfs/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Hetzner NFS Role #
3 | # Author(s): l3uddz, desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: Import vars
12 | include_vars: "{{ item }}"
13 | with_first_found:
14 | - "../../hetzner_nfs.yml"
15 | - "../../defaults/hetzner_nfs.yml.default"
16 |
17 | - name: Server Tasks
18 | block:
19 |
20 | - name: "Hetzner NFS Server Tasks"
21 | include_tasks: "hetzner_nfs_server.yml"
22 | when: ('hetzner_nfs_server' in ansible_run_tags)
23 |
24 | - name: "Hetzner NFS Server Uninstall Tasks"
25 | include_tasks: "hetzner_nfs_server_uninstall.yml"
26 | when: ('hetzner_nfs_server_uninstall' in ansible_run_tags)
27 |
28 | when: ('hetzner_nfs_server' in ansible_run_tags) or ('hetzner_nfs_server_uninstall' in ansible_run_tags)
29 |
30 |
31 | - name: Client Tasks
32 | block:
33 |
34 | - name: Fail when invalid hetzner_nfs.mount_client is specified
35 | fail: msg="You must use a value larger than 2 and lower than 251 for the Hetzner NFS mount_client advanced setting."
36 | when: hetzner_nfs.mount_client < 3 or hetzner_nfs.mount_client > 250
37 |
38 | - name: "Services Stop Tasks"
39 | include_tasks: "services_stop.yml"
40 |
41 | - name: "Hetzner NFS Mount Tasks"
42 | include_tasks: "hetzner_nfs_mount.yml"
43 | when: ('hetzner_nfs_client_mount' in ansible_run_tags)
44 |
45 | - name: "Hetzner NFS UNmount Tasks"
46 | include_tasks: "hetzner_nfs_unmount.yml"
47 | when: ('hetzner_nfs_client_unmount' in ansible_run_tags)
48 |
49 | - name: "Services Start Tasks"
50 | include_tasks: "services_start.yml"
51 |
52 | when: ('hetzner_nfs_client_mount' in ansible_run_tags) or ('hetzner_nfs_client_unmount' in ansible_run_tags)
53 |
--------------------------------------------------------------------------------
/roles/hetzner_nfs/tasks/services_start.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Hetzner NFS: Start Services Task #
3 | # Author(s): l3uddz, desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: Start 'unionfs.service'
12 | systemd: state=started name=unionfs daemon_reload=yes enabled=yes
13 | when: unionfs_service.stat.exists and unionfs_service_running
14 |
15 | - name: Start 'mergerfs.service'
16 | systemd: state=started name=mergerfs daemon_reload=yes enabled=yes
17 | when: mergerfs_service.stat.exists and mergerfs_service_running
18 |
19 | - name: Wait for 30 seconds before commencing
20 | wait_for:
21 | timeout: 30
22 | when: (docker_binary.stat.exists) and (docker_service_running) and not (docker_running_containers.stdout | trim | length == 0)
23 |
24 | - name: "Re-start all previously running Docker containers"
25 | shell: 'docker start {{ docker_running_containers.stdout }}'
26 | ignore_errors: yes
27 | when: (docker_binary.stat.exists) and (docker_service_running) and not (docker_running_containers.stdout | trim | length == 0)
28 |
--------------------------------------------------------------------------------
/roles/hetzner_nfs/templates/client/hosts.allow.j2:
--------------------------------------------------------------------------------
1 | # /etc/hosts.allow: list of hosts that are allowed to access the system.
2 | # See the manual pages hosts_access(5) and hosts_options(5).
3 | #
4 | # Example: ALL: LOCAL @some_netgroup
5 | # ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
6 | #
7 | # If you're going to protect the portmapper use the name "rpcbind" for the
8 | # daemon name. See rpcbind(8) and rpc.mountd(8) for further information.
9 | #
10 |
11 | rpcbind : 192.168.100.
12 |
--------------------------------------------------------------------------------
/roles/hetzner_nfs/templates/client/hosts.deny.j2:
--------------------------------------------------------------------------------
1 | # /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
2 | # See the manual pages hosts_access(5) and hosts_options(5).
3 | #
4 | # Example: ALL: some.host.name, .some.domain
5 | # ALL EXCEPT in.fingerd: other.host.name, .other.domain
6 | #
7 | # If you're going to protect the portmapper use the name "rpcbind" for the
8 | # daemon name. See rpcbind(8) and rpc.mountd(8) for further information.
9 | #
10 | # The PARANOID wildcard matches any host whose name does not match its
11 | # address.
12 | #
13 | # You may wish to enable this to ensure any programs that don't
14 | # validate looked up hostnames still leave understandable logs. In past
15 | # versions of Debian this has been the default.
16 | # ALL: PARANOID
17 |
18 | rpcbind : ALL
19 |
--------------------------------------------------------------------------------
/roles/hetzner_nfs/templates/client/init_vlan.sh.j2:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | sudo ip link add link {{ ansible_default_ipv4.interface }} name {{ ansible_default_ipv4.interface }}.{{ hetzner_nfs.vlan_id }} type vlan id {{ hetzner_nfs.vlan_id }}
3 | sudo ip link set {{ ansible_default_ipv4.interface }}.{{ hetzner_nfs.vlan_id }} mtu 1400
4 | sudo ip link set dev {{ ansible_default_ipv4.interface }}.{{ hetzner_nfs.vlan_id }} up
5 | sudo ip addr add 192.168.100.{{ hetzner_nfs.mount_client }}/24 brd 192.168.100.255 dev {{ ansible_default_ipv4.interface }}.{{ hetzner_nfs.vlan_id }}
6 | sudo umount /mnt/feeder
7 | sudo mount 192.168.100.2:/mnt/local /mnt/feeder
--------------------------------------------------------------------------------
/roles/hetzner_nfs/templates/client/nfs_vlan.service.j2:
--------------------------------------------------------------------------------
1 | # /etc/systemd/system/nfs_vlan.service
2 |
3 | [Unit]
4 | Description=Init NFS VLAN For Mediabox
5 | Wants=network-online.target
6 | After=network.target network-online.target
7 |
8 | [Service]
9 | ExecStart=/opt/hetzner_nfs/init_vlan.sh
10 |
11 | [Install]
12 | WantedBy=multi-user.target
13 |
--------------------------------------------------------------------------------
/roles/hetzner_nfs/templates/server/exports.j2:
--------------------------------------------------------------------------------
1 | # /etc/exports: the access control list for filesystems which may be exported
2 | # to NFS clients. See exports(5).
3 | #
4 | # Example for NFSv2 and NFSv3:
5 | # /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
6 | #
7 | # Example for NFSv4:
8 | # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
9 | # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
10 | #
11 |
12 | # local media
13 |
14 | /mnt/local 192.168.100.0/24(rw,sync,no_subtree_check,all_squash,anonuid={{ uid }},anongid={{ gid }})
--------------------------------------------------------------------------------
/roles/hetzner_nfs/templates/server/hosts.deny.j2:
--------------------------------------------------------------------------------
1 | # /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
2 | # See the manual pages hosts_access(5) and hosts_options(5).
3 | #
4 | # Example: ALL: some.host.name, .some.domain
5 | # ALL EXCEPT in.fingerd: other.host.name, .other.domain
6 | #
7 | # If you're going to protect the portmapper use the name "rpcbind" for the
8 | # daemon name. See rpcbind(8) and rpc.mountd(8) for further information.
9 | #
10 | # The PARANOID wildcard matches any host whose name does not match its
11 | # address.
12 | #
13 | # You may wish to enable this to ensure any programs that don't
14 | # validate looked up hostnames still leave understandable logs. In past
15 | # versions of Debian this has been the default.
16 | # ALL: PARANOID
17 |
18 | rpcbind mountd nfsd statd lockd rquotad: ALL EXCEPT 192.168.100.0/24
19 |
--------------------------------------------------------------------------------
/roles/hetzner_nfs/templates/server/init_vlan.sh.j2:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | sudo ip link add link {{ ansible_default_ipv4.interface }} name {{ ansible_default_ipv4.interface }}.{{ hetzner_nfs.vlan_id }} type vlan id {{ hetzner_nfs.vlan_id }}
3 | sudo ip link set {{ ansible_default_ipv4.interface }}.{{ hetzner_nfs.vlan_id }} mtu 1400
4 | sudo ip link set dev {{ ansible_default_ipv4.interface }}.{{ hetzner_nfs.vlan_id }} up
5 | sudo ip addr add 192.168.100.2/24 brd 192.168.100.255 dev {{ ansible_default_ipv4.interface }}.{{ hetzner_nfs.vlan_id }}
--------------------------------------------------------------------------------
/roles/hetzner_nfs/templates/server/nfs_vlan.service.j2:
--------------------------------------------------------------------------------
1 | # /etc/systemd/system/nfs_vlan.service
2 |
3 | [Unit]
4 | Description=Init NFS VLAN For Feederbox
5 | Wants=network-online.target
6 | After=network.target network-online.target
7 |
8 | [Service]
9 | ExecStart=/opt/hetzner_nfs/init_vlan.sh
10 |
11 | [Install]
12 | WantedBy=multi-user.target
13 |
--------------------------------------------------------------------------------
/roles/influxdb/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Cloudbox: InfluxDB Role #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/cloudbox/cloudbox #
5 | # Docker Image(s): influxdb #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Stop and remove any existing containers
13 | docker_container:
14 | name: influxdb
15 | state: absent
16 |
17 | - name: Create required directories
18 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
19 | with_items:
20 | - /opt/influxdb
21 |
22 | - name: Create and start influxdb container
23 | docker_container:
24 | name: influxdb
25 | image: "influxdb:1.8.4"
26 | pull: yes
27 | volumes:
28 | - "/etc/localtime:/etc/localtime:ro"
29 | - "/opt/influxdb:/var/lib/influxdb"
30 | labels:
31 | "com.github.cloudbox.cloudbox_managed": "true"
32 | networks:
33 | - name: cloudbox
34 | aliases:
35 | - influxdb
36 | purge_networks: yes
37 | restart_policy: unless-stopped
38 | state: started
39 |
--------------------------------------------------------------------------------
/roles/jdownloader2/files/sevenzipjbinding1509.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cloudbox/Community/58109d25927a5c353d900757ffbf828064207625/roles/jdownloader2/files/sevenzipjbinding1509.jar
--------------------------------------------------------------------------------
/roles/jdownloader2/files/sevenzipjbinding1509Linux.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cloudbox/Community/58109d25927a5c353d900757ffbf828064207625/roles/jdownloader2/files/sevenzipjbinding1509Linux.jar
--------------------------------------------------------------------------------
/roles/jdownloader2/tasks/subtasks/legacy.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: JDownloader2 | Legacy #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): jlesage/jdownloader-2 #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Legacy | Check if '/opt/myjdownloader' exists
13 | stat:
14 | path: "/opt/myjdownloader"
15 | register: opt_myjdownloader
16 |
17 | - name: Legacy | Migration Block
18 | block:
19 |
20 | - name: Legacy | Stop and remove myjdownloader container
21 | docker_container:
22 | name: myjdownloader
23 | state: absent
24 |
25 | - name: Legacy | Move opt folder 'myjdownloader' to 'jdownloader2'
26 | shell: |
27 | mv /opt/myjdownloader /opt/jdownloader2
28 | chown -R {{ user.name }}:{{ user.name }} /opt/jdownloader2
29 |
30 | when: (opt_myjdownloader.stat.exists)
31 |
--------------------------------------------------------------------------------
/roles/jellyfin/files/dlna.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | false
5 | false
6 | false
7 | 60
8 | 1800
9 |
10 |
--------------------------------------------------------------------------------
/roles/jfa-go/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: JFA-Go #
3 | # Author(s): Bonny1992 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): hrfee/jfa-go #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: "{{ jfa_go.subdomain|default('jfa-go',true) }}"
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: jfa-go
22 | state: absent
23 |
24 | - name: Create jfa-go directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/jfa-go
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: jfa-go
32 | image: hrfee/jfa-go:latest
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | GUID: "{{ gid }}"
38 | VIRTUAL_HOST: "{{ jfa_go.subdomain|default('jfa-go',true) }}.{{ user.domain }}"
39 | VIRTUAL_PORT: "8056"
40 | LETSENCRYPT_HOST: "{{ jfa_go.subdomain|default('jfa-go',true) }}.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | volumes:
43 | - "/opt/jfa-go:/data"
44 | - "/opt/jellyfin:/jf"
45 | - "/etc/localtime:/etc/localtime:ro"
46 | - "/mnt:/mnt"
47 | labels:
48 | "com.github.cloudbox.cloudbox_managed": "true"
49 | networks:
50 | - name: cloudbox
51 | aliases:
52 | - jfa-go
53 | purge_networks: yes
54 | restart_policy: unless-stopped
55 | state: started
--------------------------------------------------------------------------------
/roles/jirafeau/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Jirafeau #
3 | # Author(s): zhdenny #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): jgeusebroek/jirafea #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: jirafeau
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: jirafeau
22 | state: absent
23 |
24 | - name: Create jirafeau directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }} recurse=yes"
26 | with_items:
27 | - /opt/jirafeau/www
28 | - /opt/jirafeau/data
29 |
30 | - name: Create and start container
31 | docker_container:
32 | name: jirafeau
33 | image: "jgeusebroek/jirafeau"
34 | pull: yes
35 | env:
36 | TZ: "{{ tz }}"
37 | VIRTUAL_HOST: "jirafeau.{{ jirafeau.domain | default(user.domain,true) }}"
38 | VIRTUAL_PORT: "80"
39 | LETSENCRYPT_HOST: "jirafeau.{{ jirafeau.domain | default(user.domain,true) }}"
40 | LETSENCRYPT_EMAIL: "{{ user.email }}"
41 | volumes:
42 | - "/opt/jirafeau/cfg:/cfg:rw"
43 | - "/opt/jirafeau/data:/data:rw"
44 | labels:
45 | "com.github.cloudbox.cloudbox_managed": "true"
46 | networks:
47 | - name: cloudbox
48 | aliases:
49 | - jirafeau
50 | purge_networks: yes
51 | restart_policy: unless-stopped
52 | state: started
53 |
--------------------------------------------------------------------------------
/roles/kcptun-client/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: kcptun Client #
3 | # Author(s): RXWatcher #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): horjulf/kcptun #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Stop and remove any existing container
13 | docker_container:
14 | name: kcptun-client
15 | state: absent
16 |
17 | - name: Create opt directory
18 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
19 | with_items:
20 | - /opt/kcptun-client
21 | - /opt/kcptun-client/config
22 |
23 | - name: "Check if kcptun-client config file exists"
24 | stat:
25 | path: "/opt/kcptun-client/config/config.json"
26 | register: kcptun_config
27 |
28 | - name: "Import config file if it doesnt exist"
29 | template:
30 | src: config.json.j2
31 | dest: /opt/kcptun-client/config/config.json
32 | force: yes
33 | owner: "{{ user.name }}"
34 | group: "{{ user.name }}"
35 | mode: 0775
36 | when: not kcptun_config.stat.exists
37 |
38 | - name: Create and start container
39 | docker_container:
40 | name: kcptun-client
41 | image: horjulf/kcptun:latest
42 | pull: yes
43 | env:
44 | TZ: "{{ tz }}"
45 | volumes:
46 | - "/opt/kcptun-client/config:/config"
47 | command: "/bin/client -c /config/config.json"
48 | labels:
49 | "com.github.cloudbox.cloudbox_managed": "true"
50 | user: "{{ uid }}:{{ gid }}"
51 | network_mode: host
52 | restart_policy: unless-stopped
53 | state: started
54 |
--------------------------------------------------------------------------------
/roles/kcptun-client/templates/config.json.j2:
--------------------------------------------------------------------------------
1 | {
2 | "target": "127.0.0.1:443",
3 | "listen": "0.0.0.0:29990",
4 | "mode": "fast3",
5 | "crypt": "aes-128",
6 | "key": "my_default_password",
7 | "dscp": 46,
8 | "parityshard": 2,
9 | "datashard": 80,
10 | "mtu": 1400,
11 | "nocomp": true,
12 | "nodelay": 0,
13 | "acknodelay": true,
14 | "interval": 50,
15 | "resend": 0,
16 | "nc": 0,
17 | "keepalive": 10,
18 | "sockbuf": 268435500,
19 | "smuxbuf": 268435500,
20 | "snmpperiod": 60,
21 | "pprof": false,
22 | "conn": 4,
23 | "autoexpire": 0,
24 | "sndwnd": 8192,
25 | "rcvwnd": 16384
26 | }
27 |
--------------------------------------------------------------------------------
/roles/kcptun-server/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: kcptun Server #
3 | # Author(s): RXWatcher #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): horjulf/kcptun #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Stop and remove any existing container
13 | docker_container:
14 | name: kcptun-server
15 | state: absent
16 |
17 | - name: Create opt directory
18 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
19 | with_items:
20 | - /opt/kcptun-server
21 | - /opt/kcptun-server/config
22 |
23 | - name: "Check if kcptun-server config file exists"
24 | stat:
25 | path: "/opt/kcptun-server/config/config.json"
26 | register: kcptun_config
27 |
28 | - name: "Import config file if it doesnt exist"
29 | template:
30 | src: config.json.j2
31 | dest: /opt/kcptun-server/config/config.json
32 | force: yes
33 | owner: "{{ user.name }}"
34 | group: "{{ user.name }}"
35 | mode: 0775
36 | when: not kcptun_config.stat.exists
37 |
38 | - name: Create and start container
39 | docker_container:
40 | name: kcptun-server
41 | image: horjulf/kcptun:latest
42 | pull: yes
43 | env:
44 | TZ: "{{ tz }}"
45 | volumes:
46 | - "/opt/kcptun-server/config:/config"
47 | command: "/bin/server -c /config/config.json"
48 | labels:
49 | "com.github.cloudbox.cloudbox_managed": "true"
50 | user: "{{ uid }}:{{ gid }}"
51 | network_mode: host
52 | restart_policy: unless-stopped
53 | state: started
54 |
--------------------------------------------------------------------------------
/roles/kcptun-server/templates/config.json.j2:
--------------------------------------------------------------------------------
1 | {
2 | "target": "127.0.0.1:443",
3 | "listen": "0.0.0.0:29990",
4 | "mode": "fast3",
5 | "crypt": "aes-128",
6 | "key": "my_default_password",
7 | "dscp": 46,
8 | "parityshard": 2,
9 | "datashard": 80,
10 | "mtu": 1400,
11 | "nocomp": true,
12 | "nodelay": 0,
13 | "acknodelay": true,
14 | "interval": 50,
15 | "resend": 0,
16 | "nc": 0,
17 | "keepalive": 10,
18 | "sockbuf": 268435500,
19 | "smuxbuf": 268435500,
20 | "snmpperiod": 60,
21 | "pprof": false,
22 | "conn": 4,
23 | "autoexpire": 0,
24 | "sndwnd": 16384,
25 | "rcvwnd": 16384
26 | }
27 |
--------------------------------------------------------------------------------
/roles/kitana/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Kitana #
3 | # Author(s): 4everfun #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): pannal/kitana #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: kitana
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: kitana
22 | state: absent
23 |
24 | - name: Create kitana directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/kitana
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: kitana
32 | image: "pannal/kitana:latest"
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | VIRTUAL_HOST: "kitana.{{ user.domain }}"
37 | VIRTUAL_PORT: "31337"
38 | LETSENCRYPT_HOST: "kitana.{{ user.domain }}"
39 | LETSENCRYPT_EMAIL: "{{ user.email }}"
40 | command: -P
41 | volumes:
42 | - "/opt/kitana:/app/data"
43 | labels:
44 | "com.github.cloudbox.cloudbox_managed": "true"
45 | networks:
46 | - name: cloudbox
47 | aliases:
48 | - kitana
49 | purge_networks: yes
50 | restart_policy: unless-stopped
51 | state: started
52 |
--------------------------------------------------------------------------------
/roles/komga/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: komga #
3 | # Author(s): theotocopulitos #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): gotson/komga #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: komga
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: komga
22 | state: absent
23 |
24 | - name: Create komga directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/komga
28 | - /mnt/local/Media/Comics
29 |
30 | - name: Create and start container
31 | docker_container:
32 | name: komga
33 | image: gotson/komga
34 | pull: yes
35 | env:
36 | TZ: "{{ tz }}"
37 | PUID: "{{ uid }}"
38 | PGID: "{{ gid }}"
39 | VIRTUAL_HOST: "komga.{{ user.domain }}"
40 | VIRTUAL_PORT: "8080"
41 | LETSENCRYPT_HOST: "komga.{{ user.domain }}"
42 | LETSENCRYPT_EMAIL: "{{ user.email }}"
43 | volumes:
44 | - "/opt/komga:/config"
45 | - "/mnt/unionfs/Media/Comics:/comics"
46 | - "/mnt:/mnt"
47 |
48 | labels:
49 | "com.github.cloudbox.cloudbox_managed": "true"
50 | networks:
51 | - name: cloudbox
52 | aliases:
53 | - komga
54 | purge_networks: yes
55 | restart_policy: unless-stopped
56 | state: started
57 |
--------------------------------------------------------------------------------
/roles/lazylibrarian/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: LazyLibrarian #
3 | # Author(s): Superduper09 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): thraxis/lazylibrarian-calibre #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: lazylibrarian
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: lazylibrarian
22 | state: absent
23 |
24 | - name: Create lazylibrarian directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/lazylibrarian
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: lazylibrarian
32 | image: thraxis/lazylibrarian-calibre
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | VIRTUAL_HOST: "lazylibrarian.{{ user.domain }}"
39 | VIRTUAL_PORT: "5299"
40 | LETSENCRYPT_HOST: "lazylibrarian.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | volumes:
43 | - "/opt/lazylibrarian:/config"
44 | - "/mnt:/mnt"
45 | labels:
46 | "com.github.cloudbox.cloudbox_managed": "true"
47 | networks:
48 | - name: cloudbox
49 | aliases:
50 | - lazylibrarian
51 | purge_networks: yes
52 | restart_policy: unless-stopped
53 | state: started
54 |
--------------------------------------------------------------------------------
/roles/lidarrx/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Lidarrx #
3 | # Author(s): paris-ci #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): cr.hotio.dev/hotio/lidarr #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Gather list of lidarrx Docker containers"
13 | shell: "docker ps -a --format '{{ '{{' }} .Names{{ '}}' }}' --filter label=com.github.cloudbox.community=lidarrx | xargs echo -n"
14 | register: cloudbox_community_lidarrx
15 | ignore_errors: yes
16 |
17 | - name: "Stop all lidarrx Docker containers"
18 | shell: "docker stop {{ cloudbox_community_lidarrx.stdout }}"
19 | ignore_errors: yes
20 | when: (cloudbox_community_lidarrx.stdout | trim | length > 0)
21 |
22 | - name: "Remove all lidarrx Docker containers"
23 | shell: "docker rm {{ cloudbox_community_lidarrx.stdout }}"
24 | ignore_errors: yes
25 | when: (cloudbox_community_lidarrx.stdout | trim | length > 0)
26 |
27 | - name: "Execute LidarrX roles"
28 | include_tasks: template.yml
29 | vars:
30 | rolename: "{{ role }}"
31 | with_items: "{{ lidarrx.roles }}"
32 | loop_control:
33 | loop_var: role
34 |
--------------------------------------------------------------------------------
/roles/mariadb/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: MariaDB Role #
3 | # Author(s): l3uddz, desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/mariadb #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Stop and remove any existing containers
13 | docker_container: "name={{ item }} state=absent"
14 | with_items:
15 | - mariadb
16 |
17 | - name: Create required directories
18 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
19 | with_items:
20 | - /opt/mariadb
21 |
22 | - name: Create and start mariadb container
23 | docker_container:
24 | name: mariadb
25 | image: "lscr.io/linuxserver/mariadb"
26 | pull: yes
27 | env:
28 | TZ: "{{ tz }}"
29 | PUID: "{{ uid }}"
30 | PGID: "{{ gid }}"
31 | MYSQL_ROOT_PASSWORD: "password321"
32 | volumes:
33 | - "/opt/mariadb:/config"
34 | labels:
35 | "com.github.cloudbox.cloudbox_managed": "true"
36 | networks:
37 | - name: cloudbox
38 | aliases:
39 | - mariadb
40 | purge_networks: yes
41 | restart_policy: unless-stopped
42 | state: started
43 |
--------------------------------------------------------------------------------
/roles/medusa/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Medusa #
3 | # Author(s): javi11 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/medusa #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: medusa
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: medusa
22 | state: absent
23 |
24 | - name: Create medusa directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/medusa
28 |
29 | - name: Set default_volumes variable
30 | set_fact:
31 | default_volumes:
32 | - "/opt/medusa:/config"
33 | - "/opt/scripts:/scripts"
34 | - "/mnt:/mnt"
35 | - "/mnt/unionfs/Media/TV:/tv"
36 |
37 | - name: Create and start container
38 | docker_container:
39 | name: medusa
40 | image: lscr.io/linuxserver/medusa
41 | pull: yes
42 | env:
43 | TZ: "{{ tz }}"
44 | PUID: "{{ uid }}"
45 | PGID: "{{ gid }}"
46 | UMASK: "002"
47 | VIRTUAL_HOST: "medusa.{{ user.domain }}"
48 | VIRTUAL_PORT: "8081"
49 | LETSENCRYPT_HOST: "medusa.{{ user.domain }}"
50 | LETSENCRYPT_EMAIL: "{{ user.email }}"
51 | volumes: "{{ default_volumes + nzbs_downloads_path|default([]) + torrents_downloads_path|default([]) }}"
52 | labels:
53 | "com.github.cloudbox.cloudbox_managed": "true"
54 | networks:
55 | - name: cloudbox
56 | aliases:
57 | - medusa
58 | purge_networks: yes
59 | restart_policy: unless-stopped
60 | state: started
61 |
--------------------------------------------------------------------------------
/roles/minecraft/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Minecraft Server #
3 | # Author(s): atilling #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): itzg/minecraft-server #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: minecraft
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: minecraft
22 | state: absent
23 |
24 | - name: Create minecraft directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/minecraft
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: minecraft
32 | image: itzg/minecraft-server
33 | pull: yes
34 | published_ports:
35 | - "25565:25565"
36 | env:
37 | TZ: "{{ tz }}"
38 | UID: "{{ uid }}"
39 | GID: "{{ gid }}"
40 | VIRTUAL_HOST: "minecraft.{{ user.domain }}"
41 | VIRTUAL_PORT: "25565"
42 | EULA: "TRUE"
43 | WHITELIST: "{{ uid }}"
44 | OPS: "{{ uid }}"
45 | LETSENCRYPT_HOST: "minecraft.{{ user.domain }}"
46 | LETSENCRYPT_EMAIL: "{{ user.email }}"
47 | volumes:
48 | - "/etc/localtime:/etc/localtime:ro"
49 | - "/opt/minecraft/data:/data"
50 | labels:
51 | "com.github.cloudbox.cloudbox_managed": "true"
52 | networks:
53 | - name: cloudbox
54 | aliases:
55 | - minecraft
56 | purge_networks: yes
57 | restart_policy: unless-stopped
58 | state: started
59 |
--------------------------------------------------------------------------------
/roles/mongodb/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: MongoDB #
3 | # Author(s): Superduper09, desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): mongo:latest #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Stop and remove any existing container
13 | docker_container: "name={{ item }} state=absent"
14 | with_items:
15 | - mongodb
16 |
17 | - name: Create required directories
18 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
19 | with_items:
20 | - "/opt/mongodb"
21 |
22 | - name: Create and start mongodb container
23 | docker_container:
24 | name: "mongo"
25 | image: "mongo:latest"
26 | pull: yes
27 | user: "{{ uid }}:{{ gid }}"
28 | env:
29 | MONGO_DATA_DIR: "/data/db"
30 | MONGO_LOG_DIR: "/dev/null"
31 | MONGO_URL: "mongodb://mongo:27017/"
32 | volumes:
33 | - "/opt/mongodb:/data/db:rw"
34 | labels:
35 | "com.github.cloudbox.cloudbox_managed": "true"
36 | networks:
37 | - name: cloudbox
38 | aliases:
39 | - "mongodb"
40 | purge_networks: yes
41 | restart_policy: unless-stopped
42 | state: started
43 |
--------------------------------------------------------------------------------
/roles/monitorr/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Monitorr #
3 | # Author(s): Superduper09, Kalroth #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): monitorr/monitorr #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: monitorr
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: monitorr
22 | state: absent
23 |
24 | - name: Create monitorr directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/monitorr
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: monitorr
32 | image: monitorr/monitorr:develop
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | VIRTUAL_HOST: "monitorr.{{ user.domain }}"
39 | VIRTUAL_PORT: "80"
40 | LETSENCRYPT_HOST: "monitorr.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | volumes:
43 | - "/opt/monitorr:/app"
44 | labels:
45 | "com.github.cloudbox.cloudbox_managed": "true"
46 | networks:
47 | - name: cloudbox
48 | aliases:
49 | - monitorr
50 | restart_policy: unless-stopped
51 | state: started
52 |
--------------------------------------------------------------------------------
/roles/moviematch/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: MovieMatch #
3 | # Author(s): Jolbol1 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lukechannings/moviematch #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: "{{ moviematch.subdomain|default('moviematch',true) }}"
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing containers
20 | docker_container: "name={{ item }} state=absent"
21 | with_items:
22 | - moviematch
23 |
24 | - name: Settings | Import Plex Auth Token role
25 | import_role:
26 | name: plex_auth_token
27 | when: plex_account_enabled
28 |
29 | - name: Create and start moviematch container
30 | docker_container:
31 | name: moviematch
32 | image: "lukechannings/moviematch"
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | VIRTUAL_HOST: "{{ moviematch.subdomain|default('moviematch',true) }}.{{ user.domain }}"
39 | VIRTUAL_PORT: "8000"
40 | PLEX_URL: "{{ moviematch.plex_url }}"
41 | PLEX_TOKEN: "{{ plex_auth_token | default('') }}"
42 | LETSENCRYPT_EMAIL: "{{ user.email }}"
43 | LETSENCRYPT_HOST: "{{ moviematch.subdomain|default('moviematch',true) }}.{{ user.domain }}"
44 | LOG_LEVEL: DEBUG
45 | LIBRARY_FILTER: "{{ moviematch.libraries }}"
46 | labels:
47 | "com.github.cloudbox.cloudbox_managed": "true"
48 | exposed_ports:
49 | - 8000/tcp
50 | networks:
51 | - name: cloudbox
52 | aliases:
53 | - moviematch
54 | purge_networks: yes
55 | restart_policy: unless-stopped
56 | state: started
57 |
--------------------------------------------------------------------------------
/roles/mylar/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Mylar #
3 | # Author(s): fuller882 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/mylar #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: mylar
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: mylar
22 | state: absent
23 |
24 | - name: Create mylar directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/mylar
28 | - /mnt/local/Media/Comics
29 |
30 | - name: Create and start container
31 | docker_container:
32 | name: mylar
33 | image: lscr.io/linuxserver/mylar
34 | pull: yes
35 | published_ports:
36 | - "127.0.0.1:8090:8090"
37 | env:
38 | TZ: "{{ tz }}"
39 | PUID: "{{ uid }}"
40 | PGID: "{{ gid }}"
41 | VIRTUAL_HOST: "mylar.{{ user.domain }}"
42 | VIRTUAL_PORT: "8090"
43 | LETSENCRYPT_HOST: "mylar.{{ user.domain }}"
44 | LETSENCRYPT_EMAIL: "{{ user.email }}"
45 | volumes:
46 | - "/opt/mylar:/config"
47 | - "/mnt/local/downloads/nzbs:/downloads/nzbs"
48 | - "/mnt/unionfs/Media/Comics:/comics"
49 | labels:
50 | "com.github.cloudbox.cloudbox_managed": "true"
51 | networks:
52 | - name: cloudbox
53 | aliases:
54 | - mylar
55 | purge_networks: yes
56 | restart_policy: unless-stopped
57 | state: started
58 |
--------------------------------------------------------------------------------
/roles/mylar3/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Mylar3 #
3 | # Author(s): theotocopulitos,owine #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/mylar3 #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: mylar3
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: mylar3
22 | state: absent
23 |
24 | - name: Create mylar3 directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/mylar3
28 | - /mnt/local/Media/Comics
29 |
30 | - name: Create and start container
31 | docker_container:
32 | name: mylar3
33 | image: lscr.io/linuxserver/mylar3
34 | pull: yes
35 | env:
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | TZ: "{{ tz }}"
39 | VIRTUAL_HOST: "mylar3.{{ user.domain }}"
40 | VIRTUAL_PORT: "8090"
41 | LETSENCRYPT_HOST: "mylar3.{{ user.domain }}"
42 | LETSENCRYPT_EMAIL: "{{ user.email }}"
43 | volumes:
44 | - "/opt/mylar3:/config"
45 | - "/mnt/local/downloads:/downloads"
46 | - "/mnt/unionfs/Media/Comics:/comics"
47 | - "/mnt:/mnt"
48 | labels:
49 | "com.github.cloudbox.cloudbox_managed": "true"
50 | networks:
51 | - name: cloudbox
52 | aliases:
53 | - mylar3
54 | purge_networks: yes
55 | restart_policy: unless-stopped
56 | state: started
57 |
--------------------------------------------------------------------------------
/roles/navidrome/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Navidrome #
3 | # Author: finch #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): deluan/navidrome:latest #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: navidrome
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: navidrome
22 | state: absent
23 |
24 | - name: Create navidrome directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/navidrome
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: navidrome
32 | image: deluan/navidrome:latest
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | GUID: "{{ gid }}"
38 | VIRTUAL_HOST: "navidrome.{{ user.domain }}"
39 | VIRTUAL_PORT: "4533"
40 | LETSENCRYPT_HOST: "navidrome.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | volumes:
43 | - "{{ navidrome.musicfolder }}:/music"
44 | - "/opt/navidrome:/data"
45 | - "/mnt:/mnt"
46 | labels:
47 | "com.github.cloudbox.cloudbox_managed": "true"
48 | networks:
49 | - name: cloudbox
50 | aliases:
51 | - navidrome
52 | purge_networks: yes
53 | restart_policy: unless-stopped
54 | state: started
55 |
--------------------------------------------------------------------------------
/roles/nowshowing/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: NowShowing Role #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image: ninthwalker/nowshowing:v2 #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: nowshowing
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: nowshowing
22 | state: absent
23 |
24 | - name: Create NowShowing directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/nowshowing
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: nowshowing
32 | image: ninthwalker/nowshowing:v2
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | VIRTUAL_HOST: "nowshowing.{{ user.domain }}"
39 | VIRTUAL_PORT: "6878"
40 | LETSENCRYPT_HOST: "nowshowing.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | volumes:
43 | - "/opt/nowshowing:/config"
44 | labels:
45 | "com.github.cloudbox.cloudbox_managed": "true"
46 | networks:
47 | - name: cloudbox
48 | aliases:
49 | - nowshowing
50 | purge_networks: yes
51 | restart_policy: unless-stopped
52 | state: started
53 |
--------------------------------------------------------------------------------
/roles/ombix/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: OmbiX #
3 | # Author(s): FML128 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): cr.hotio.dev/hotio/ombi #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Gather list of OmbiX Docker containers"
13 | shell: "docker ps -a --format '{{ '{{' }} .Names{{ '}}' }}' --filter label=com.github.cloudbox.community=ombix | xargs echo -n"
14 | register: cloudbox_community_ombix
15 | ignore_errors: yes
16 |
17 | - name: "Stop all OmbiX Docker containers"
18 | shell: "docker stop {{ cloudbox_community_ombix.stdout }}"
19 | ignore_errors: yes
20 | when: (cloudbox_community_ombix.stdout | trim | length > 0)
21 |
22 | - name: "Remove all OmbiX Docker containers"
23 | shell: "docker rm {{ cloudbox_community_ombix.stdout }}"
24 | ignore_errors: yes
25 | when: (cloudbox_community_ombix.stdout | trim | length > 0)
26 |
27 | - name: "Execute OmbiX roles"
28 | include_tasks: template.yml
29 | vars:
30 | rolename: "{{ role }}"
31 | with_items: "{{ ombix.roles }}"
32 | loop_control:
33 | loop_var: role
34 |
--------------------------------------------------------------------------------
/roles/ombix/tasks/template.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: OmbiX #
3 | # Author(s): FML128 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/ombi #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Install named Ombi role"
13 | debug:
14 | msg: "Installing {{ rolename }}"
15 |
16 | - name: "Set DNS Record on CloudFlare"
17 | include_role:
18 | name: cloudflare-dns
19 | vars:
20 | record: "ombi{{ rolename }}"
21 | when: cloudflare_enabled
22 |
23 | - name: Create ombi directories
24 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
25 | with_items:
26 | - "/opt/ombi{{ rolename }}"
27 |
28 | - name: Create and start container
29 | docker_container:
30 | name: ombi{{ rolename }}
31 | image: "lscr.io/linuxserver/ombi"
32 | pull: yes
33 | env:
34 | BACKUP: "no"
35 | PUID: "{{ uid }}"
36 | PGID: "{{ gid }}"
37 | UMASK: "002"
38 | VIRTUAL_HOST: "ombi{{ rolename }}.{{ user.domain }}"
39 | VIRTUAL_PORT: "3579"
40 | LETSENCRYPT_HOST: "ombi{{ rolename }}.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | TZ: "{{ tz }}"
43 | volumes:
44 | - "/opt/ombi{{ rolename }}:/config"
45 | labels:
46 | "com.github.cloudbox.cloudbox_managed": "true"
47 | "com.github.cloudbox.community": "ombix"
48 | networks:
49 | - name: cloudbox
50 | aliases:
51 | - "ombi{{ rolename }}"
52 | purge_networks: yes
53 | restart_policy: unless-stopped
54 | state: started
55 |
--------------------------------------------------------------------------------
/roles/ouroboros/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Ouroboros Role #
3 | # Author(s): owine #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image: pyouroboros/ouroboros #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Stop and remove any existing container
13 | docker_container:
14 | name: ouroboros
15 | state: absent
16 |
17 | - name: Create ouroboros directories
18 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }} recurse=yes"
19 | with_items:
20 | - /opt/ouroboros
21 |
22 | - name: "Check if ouroboros.env file exists"
23 | stat:
24 | path: "/opt/ouroboros/ouroboros.env"
25 | register: ouroboros_env
26 |
27 | - name: "Import ouroboros.env if it doesnt exist"
28 | template:
29 | src: ouroboros.env.j2
30 | dest: /opt/ouroboros/ouroboros.env
31 | force: yes
32 | owner: "{{ user.name }}"
33 | group: "{{ user.name }}"
34 | mode: 0775
35 | when: not ouroboros_env.stat.exists
36 |
37 | - name: Create container
38 | docker_container:
39 | name: ouroboros
40 | image: "pyouroboros/ouroboros"
41 | pull: yes
42 | env_file: /opt/ouroboros/ouroboros.env
43 | env:
44 | TZ: "{{ tz }}"
45 | volumes:
46 | - "/var/run/docker.sock:/var/run/docker.sock"
47 | labels:
48 | "com.github.cloudbox.cloudbox_managed": "true"
49 | networks:
50 | - name: cloudbox
51 | aliases:
52 | - ouroboros
53 | purge_networks: yes
54 | restart_policy: unless-stopped
55 | state: started
56 |
--------------------------------------------------------------------------------
/roles/ouroboros/templates/ouroboros.env.j2:
--------------------------------------------------------------------------------
1 | SELF_UPDATE=true
2 | CLEANUP=true
3 | INTERVAL=86400
4 |
--------------------------------------------------------------------------------
/roles/overseerrx/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: overseerrx #
3 | # Author(s): rar0ch #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): sctx/overseerr #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Gather list of overseerrx Docker containers"
13 | shell: "docker ps -a --format '{{ '{{' }} .Names{{ '}}' }}' --filter label=com.github.cloudbox.community=overseerrx | xargs echo -n"
14 | register: cloudbox_community_overseerrx
15 | ignore_errors: yes
16 |
17 | - name: "Stop all overseerrx Docker containers"
18 | shell: "docker stop {{ cloudbox_community_overseerrx.stdout }}"
19 | ignore_errors: yes
20 | when: (cloudbox_community_overseerrx.stdout | trim | length > 0)
21 |
22 | - name: "Remove all overseerrx Docker containers"
23 | shell: "docker rm {{ cloudbox_community_overseerrx.stdout }}"
24 | ignore_errors: yes
25 | when: (cloudbox_community_overseerrx.stdout | trim | length > 0)
26 |
27 | - name: "Execute overseerrx roles"
28 | include_tasks: template.yml
29 | vars:
30 | rolename: "{{ role }}"
31 | with_items: "{{ overseerrx.roles }}"
32 | loop_control:
33 | loop_var: role
34 |
--------------------------------------------------------------------------------
/roles/petio/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Petio #
3 | # Author(s): chazlarson #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): cr.hotio.dev/hotio/petio #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: MongoDB Role
13 | include_role:
14 | name: mongodb
15 |
16 | - name: "Setting CloudFlare DNS Record"
17 | include_role:
18 | name: cloudflare-dns
19 | vars:
20 | record: petio
21 | when: cloudflare_enabled
22 |
23 | - name: Stop and remove any existing container
24 | docker_container: "name={{ item }} state=absent"
25 | with_items:
26 | - petio
27 |
28 | - name: Create required directories
29 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
30 | with_items:
31 | - "/opt/petio"
32 |
33 | - name: Create and start petio container
34 | docker_container:
35 | name: "petio"
36 | image: "ghcr.io/petio-team/petio"
37 | pull: yes
38 | user: "{{ uid }}:{{ gid }}"
39 | env:
40 | TZ: "{{ tz }}"
41 | VIRTUAL_HOST: "petio.{{ user.domain }}"
42 | VIRTUAL_PORT: "7777"
43 | LETSENCRYPT_HOST: "petio.{{ user.domain }}"
44 | LETSENCRYPT_EMAIL: "{{ user.email }}"
45 | volumes:
46 | - "/opt/petio:/app/api/config:rw"
47 | - "/mnt:/mnt"
48 | labels:
49 | "com.github.cloudbox.cloudbox_managed": "true"
50 | networks:
51 | - name: cloudbox
52 | aliases:
53 | - "petio"
54 | purge_networks: yes
55 | restart_policy: unless-stopped
56 | state: started
--------------------------------------------------------------------------------
/roles/plex2/tasks/subtasks/claim_server.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Plex2 | Claim Server Task #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): cloudb0x/plex #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Claim Server | Get Plex Media Server claim code via API
13 | block:
14 |
15 | - name: "Claim Server | Get Plex Media Server claim code"
16 | uri:
17 | url: https://plex.tv/api/claim/token.json
18 | user: "{{ plex.user }}"
19 | password: "{{ plex.pass }}"
20 | force_basic_auth: yes
21 | register: plex2_claim
22 |
23 | - name: "Claim Server | Set 'plex2_claim_code' variable"
24 | set_fact:
25 | plex2_claim_code: "{{ plex2_claim.json.token }}"
26 |
27 | when: (plex_account_enabled)
28 |
29 | - name: Claim Server | Get Plex Media Server claim code via prompts
30 | block:
31 |
32 | - name: "Claim Server | Ask user for Plex Media Server claim code"
33 | pause:
34 | prompt: "Please visit 'https://plex.tv/claim', login with your Plex account,
35 | copy the 'Claim Code', paste it below, and press ENTER."
36 | register: plex2_claim_code_prompt
37 |
38 | - name: "Claim Server | Set 'plex_claim_code' variable"
39 | set_fact:
40 | plex2_claim_code: "{{ plex2_claim_code_prompt.user_input }}"
41 |
42 | when: (not plex_account_enabled)
43 |
44 | - name: Claim Server | Assert Plex Media Server claim code exists
45 | assert:
46 | that:
47 | - "plex2_claim_code is defined"
48 | - "plex2_claim_code is not none"
49 | - "plex2_claim_code | trim | length > 0"
50 |
51 | - name: "Claim Server | Display Plex Media Server claim code"
52 | debug:
53 | msg: "Using Plex Claim Code{{ ':' }} {{ plex2_claim_code }}"
54 |
--------------------------------------------------------------------------------
/roles/postgres/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Postgres #
3 | # Author(s): Jolbol1 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): postgres #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 |
13 | - name: Stop and remove any existing containers
14 | docker_container: "name={{ item }} state=absent"
15 | with_items:
16 | - postgres
17 |
18 | - name: Create required directories
19 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
20 | with_items:
21 | - /opt/postgres
22 |
23 | - name: Create and start postgres container
24 | docker_container:
25 | name: postgres
26 | image: "postgres"
27 | pull: yes
28 | env:
29 | TZ: "{{ tz }}"
30 | PUID: "{{ uid }}"
31 | PGID: "{{ gid }}"
32 | LOG_LEVEL: DEBUG
33 | POSTGRES_PASSWORD: mysecretpassword
34 | volumes:
35 | - /opt/postgres/data:/var/lib/postgresql/data
36 | labels:
37 | "com.github.cloudbox.cloudbox_managed": "true"
38 | networks:
39 | - name: cloudbox
40 | purge_networks: yes
41 | restart_policy: unless-stopped
42 | state: started
43 |
--------------------------------------------------------------------------------
/roles/pre_tasks/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Pre-Tasks Role #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: APT Tasks
12 | import_tasks: "subtasks/apt.yml"
13 | tags: always
14 |
--------------------------------------------------------------------------------
/roles/pre_tasks/tasks/subtasks/apt.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Pre-Tasks: APT Task #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: APT | Remove APT locks
12 | file:
13 | path: "{{ item }}"
14 | state: absent
15 | loop:
16 | - "/var/lib/apt/lists/lock"
17 | - "/var/cache/apt/archives/lock"
18 | - "/var/lib/dpkg/lock"
19 |
--------------------------------------------------------------------------------
/roles/prowlarr/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Prowlarr #
3 | # Author(s): TABLE #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): cr.hotio.dev/hotio/prowlarr #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: prowlarr
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: prowlarr
22 | state: absent
23 |
24 | - name: Create prowlarr directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/prowlarr
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: prowlarr
32 | image: cr.hotio.dev/hotio/prowlarr:testing
33 | pull: yes
34 | exposed_ports:
35 | - "9696"
36 | env:
37 | TZ: "{{ tz }}"
38 | PUID: "{{ uid }}"
39 | PGID: "{{ gid }}"
40 | UMASK: "002"
41 | VIRTUAL_HOST: "prowlarr.{{ user.domain }}"
42 | VIRTUAL_PORT: "9696"
43 | LETSENCRYPT_HOST: "prowlarr.{{ user.domain }}"
44 | LETSENCRYPT_EMAIL: "{{ user.email }}"
45 | volumes:
46 | - "/opt/prowlarr:/config"
47 | labels:
48 | "com.github.cloudbox.cloudbox_managed": "true"
49 | networks:
50 | - name: cloudbox
51 | aliases:
52 | - prowlarr
53 | purge_networks: yes
54 | restart_policy: unless-stopped
55 | state: started
56 |
--------------------------------------------------------------------------------
/roles/radarrx/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Radarrx #
3 | # Author(s): Superduper09, Migz93 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): cr.hotio.dev/hotio/radarr #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Gather list of radarrx Docker containers"
13 | shell: "docker ps -a --format '{{ '{{' }} .Names{{ '}}' }}' --filter label=com.github.cloudbox.community=radarrx | xargs echo -n"
14 | register: cloudbox_community_radarrx
15 | ignore_errors: yes
16 |
17 | - name: "Stop all radarrx Docker containers"
18 | shell: "docker stop {{ cloudbox_community_radarrx.stdout }}"
19 | ignore_errors: yes
20 | when: (cloudbox_community_radarrx.stdout | trim | length > 0)
21 |
22 | - name: "Remove all radarrx Docker containers"
23 | shell: "docker rm {{ cloudbox_community_radarrx.stdout }}"
24 | ignore_errors: yes
25 | when: (cloudbox_community_radarrx.stdout | trim | length > 0)
26 |
27 | - name: Stop and remove radarr4k Docker container if it exists
28 | docker_container:
29 | name: radarr4k
30 | state: absent
31 |
32 | - name: "Execute RadarrX roles"
33 | include_tasks: template.yml
34 | vars:
35 | rolename: "{{ role }}"
36 | with_items: "{{ radarrx.roles }}"
37 | loop_control:
38 | loop_var: role
39 |
--------------------------------------------------------------------------------
/roles/radarrx/tasks/subtasks/darkerr.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: RadarrX | Darkerr Tasks #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: Darkerr | Darkerr theme location block
12 | blockinfile:
13 | path: "/opt/nginx-proxy/vhost.d/radarr{{ rolename }}.{{ user.domain }}_location"
14 | marker: "### {mark} CLOUDBOX - DARKERR THEME ###"
15 | block: |
16 | # https://github.com/gilbN/theme.park
17 | proxy_set_header Accept-Encoding "";
18 | sub_filter
19 | ''
20 | '
21 | ';
22 | sub_filter_once on;
23 | owner: "{{ user.name }}"
24 | group: "{{ user.name }}"
25 | mode: 0664
26 | create: yes
27 | state: "{{ (darkerr.enable | default(false,true)) | ternary('present','absent') }}"
28 |
--------------------------------------------------------------------------------
/roles/radarrx/tasks/subtasks/suitarr_migration.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: RadarrX | Suitarr Migration Tasks #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: Suitarr Migration | Check folder exists
12 | stat:
13 | path: "/opt/radarr{{ rolename }}"
14 | register: folder
15 |
16 | - name: Suitarr Migration | Check subfolder1 exists
17 | stat:
18 | path: "/opt/radarr{{ rolename }}/Radarr"
19 | register: subfolder1
20 |
21 | - name: Suitarr Migration | Check subfolder2 exists
22 | stat:
23 | path: "/opt/radarr{{ rolename }}/app"
24 | register: subfolder2
25 |
26 | - name: Suitarr Migration | Move 'app' subfolder contents to 'radarrx' folder
27 | shell: |
28 | mv "/opt/radarr{{ rolename }}/app" "/tmp/radarr{{ rolename }}"
29 | mkdir "/opt/radarr{{ rolename }}"
30 | mv "/tmp/radarr{{ rolename }}/*" "/opt/radarr{{ rolename }}/"
31 | find "/opt/radarr{{ rolename }}/*" -type d -empty -delete
32 | chown -R {{ user.name }}:{{ user.name }} "/opt/radarr{{ rolename }}"
33 | when: (folder.stat.exists) and (subfolder2.stat.exists) and (not subfolder1.stat.exists)
34 |
35 | - name: Suitarr Migration | Move 'Radarr' subfolder contents to 'radarrx' folder
36 | shell: |
37 | mv "/opt/radarr{{ rolename }}/Radarr/*" "/opt/radarr{{ rolename }}/"
38 | chown -R {{ user.name }}:{{ user.name }} "/opt/radarr{{ rolename }}"
39 | when: (folder.stat.exists) and (subfolder1.stat.exists) and (not subfolder2.stat.exists)
40 |
--------------------------------------------------------------------------------
/roles/readarrx/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: ReadarrX #
3 | # Author(s): salty #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): cr.hotio.dev/hotio/readarr #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Gather list of readarrx Docker containers"
13 | shell: "docker ps -a --format '{{ '{{' }} .Names{{ '}}' }}' --filter label=com.github.cloudbox.community=readarrx | xargs echo -n"
14 | register: cloudbox_community_readarrx
15 | ignore_errors: yes
16 |
17 | - name: "Stop all readarrx Docker containers"
18 | shell: "docker stop {{ cloudbox_community_readarrx.stdout }}"
19 | ignore_errors: yes
20 | when: (cloudbox_community_readarrx.stdout | trim | length > 0)
21 |
22 | - name: "Remove all readarrx Docker containers"
23 | shell: "docker rm {{ cloudbox_community_readarrx.stdout }}"
24 | ignore_errors: yes
25 | when: (cloudbox_community_readarrx.stdout | trim | length > 0)
26 |
27 | - name: "Execute ReadarrX roles"
28 | include_tasks: template.yml
29 | vars:
30 | rolename: "{{ role }}"
31 | with_items: "{{ readarrx.roles }}"
32 | loop_control:
33 | loop_var: role
34 |
--------------------------------------------------------------------------------
/roles/redbot/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Red Discord Bot #
3 | # Author(s): sil3ntc #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): phasecorex/red-discordbot #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Stop and remove any existing container
13 | docker_container:
14 | name: redbot
15 | state: absent
16 |
17 | - name: Create redbot directories
18 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
19 | with_items:
20 | - /opt/redbot
21 |
22 | - name: Create and start container
23 | docker_container:
24 | name: redbot
25 | image: phasecorex/red-discordbot
26 | pull: yes
27 | env:
28 | PUID: "{{ uid }}"
29 | PGID: "{{ gid }}"
30 | TOKEN: "{{ redbot.token }}"
31 | PREFIX: "{{ redbot.prefix }}"
32 | volumes:
33 | - "/opt/redbot:/data/"
34 | labels:
35 | "com.github.cloudbox.cloudbox_managed": "true"
36 | networks:
37 | restart_policy: unless-stopped
38 | state: started
39 |
--------------------------------------------------------------------------------
/roles/redis/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Redis #
3 | # Author(s): Jolbol1 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): redis #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 |
13 | - name: Stop and remove any existing containers
14 | docker_container: "name={{ item }} state=absent"
15 | with_items:
16 | - redis
17 |
18 | - name: Create and start redis container
19 | docker_container:
20 | name: redis
21 | image: "redis"
22 | pull: yes
23 | env:
24 | TZ: "{{ tz }}"
25 | PUID: "{{ uid }}"
26 | PGID: "{{ gid }}"
27 | LOG_LEVEL: DEBUG
28 | labels:
29 | "com.github.cloudbox.cloudbox_managed": "true"
30 | networks:
31 | - name: cloudbox
32 | purge_networks: yes
33 | restart_policy: unless-stopped
34 | state: started
35 |
--------------------------------------------------------------------------------
/roles/requestrr/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Requestrr #
3 | # Author(s): nostyle #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): darkalfx/requestrr #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: requestrr
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: requestrr
22 | state: absent
23 |
24 | - name: Create requestrr directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/requestrr
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: requestrr
32 | image: darkalfx/requestrr
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | VIRTUAL_HOST: "requestrr.{{ user.domain }}"
39 | VIRTUAL_PORT: "4545"
40 | LETSENCRYPT_HOST: "requestrr.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | volumes:
43 | - "/opt/requestrr:/root/config"
44 | labels:
45 | "com.github.cloudbox.cloudbox_managed": "true"
46 | networks:
47 | - name: cloudbox
48 | aliases:
49 | - requestrr
50 | purge_networks: yes
51 | restart_policy: unless-stopped
52 | state: started
53 |
--------------------------------------------------------------------------------
/roles/requestrrx/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: RequestrrX #
3 | # Author(s): Kalroth, Migz93, no5tyle, Mbryde #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): darkalfx/requestrr #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Gather list of requestrrx Docker containers"
13 | shell: "docker ps -a --format '{{ '{{' }} .Names{{ '}}' }}' --filter label=com.github.cloudbox.community=requestrrx | xargs echo -n"
14 | register: cloudbox_community_requestrrx
15 | ignore_errors: yes
16 |
17 | - name: "Stop all requestrrx Docker containers"
18 | shell: "docker stop {{ cloudbox_community_requestrrx.stdout }}"
19 | ignore_errors: yes
20 | when: (cloudbox_community_requestrrx.stdout | trim | length > 0)
21 |
22 | - name: "Remove all requestrrx Docker containers"
23 | shell: "docker rm {{ cloudbox_community_requestrrx.stdout }}"
24 | ignore_errors: yes
25 | when: (cloudbox_community_requestrrx.stdout | trim | length > 0)
26 |
27 | - name: "Execute requestrrX roles"
28 | include_tasks: template.yml
29 | vars:
30 | rolename: "{{ role }}"
31 | with_items: "{{ requestrrx.roles }}"
32 | loop_control:
33 | loop_var: role
34 |
--------------------------------------------------------------------------------
/roles/requestrrx/tasks/template.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: RequestrrX | Template #
3 | # Author(s): Kalroth, Migz93, no5tyle, Mbryde #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): darkalfx/requestrr #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Install named requestrrx role"
13 | debug:
14 | msg: "Installing {{ rolename }}"
15 |
16 | - name: Stop and remove any existing container
17 | docker_container:
18 | name: "requestrr{{ rolename }}"
19 | state: absent
20 |
21 | - name: "Set DNS Record on CloudFlare"
22 | include_role:
23 | name: cloudflare-dns
24 | vars:
25 | record: "requestrr{{ rolename }}"
26 | when: cloudflare_enabled
27 |
28 | - name: Create requestrrx directories
29 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
30 | with_items:
31 | - "/opt/requestrr{{ rolename }}"
32 |
33 | - name: Create and start container
34 | docker_container:
35 | name: "requestrr{{ rolename }}"
36 | image: darkalfx/requestrr
37 | pull: yes
38 | env:
39 | TZ: "{{ tz }}"
40 | PUID: "{{ uid }}"
41 | PGID: "{{ gid }}"
42 | VIRTUAL_HOST: "requestrr{{ rolename }}.{{ user.domain }}"
43 | VIRTUAL_PORT: "4545"
44 | LETSENCRYPT_HOST: "requestrr{{ rolename }}.{{ user.domain }}"
45 | LETSENCRYPT_EMAIL: "{{ user.email }}"
46 | volumes:
47 | - "/opt/requestrr{{ rolename }}:/root/config"
48 | labels:
49 | "com.github.cloudbox.cloudbox_managed": "true"
50 | "com.github.cloudbox.community": "requestrrx"
51 | networks:
52 | - name: cloudbox
53 | aliases:
54 | - "requestrr{{ rolename }}"
55 | purge_networks: yes
56 | restart_policy: unless-stopped
57 | state: started
58 |
--------------------------------------------------------------------------------
/roles/resilio-sync/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Resilio Sync #
3 | # Author(s): l3uddz, desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image: resilio/sync #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Legacy Migration Tasks
13 | import_tasks: "subtasks/legacy_migration.yml"
14 |
15 | - name: "Setting CloudFlare DNS Record"
16 | include_role:
17 | name: cloudflare-dns
18 | vars:
19 | record: resilio-sync
20 | when: cloudflare_enabled
21 |
22 | - name: Stop and remove any existing container
23 | docker_container:
24 | name: resilio-sync
25 | state: absent
26 |
27 | - name: Create directories
28 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
29 | with_items:
30 | - /opt/resilio-sync
31 |
32 | - name: Create and start container
33 | docker_container:
34 | name: resilio-sync
35 | image: "resilio/sync"
36 | pull: yes
37 | published_ports:
38 | - "55555:55555"
39 | user: "{{ uid }}:{{ gid }}"
40 | env:
41 | VIRTUAL_HOST: "resilio-sync.{{ user.domain }}"
42 | VIRTUAL_PORT: "8888"
43 | LETSENCRYPT_HOST: "resilio-sync.{{ user.domain }}"
44 | LETSENCRYPT_EMAIL: "{{ user.email }}"
45 | TZ: "{{ tz }}"
46 | volumes:
47 | - "/opt/resilio-sync:/mnt/sync"
48 | - "/mnt:/mnt/mounted_folders/mnt"
49 | - "/home:/mnt/mounted_folders/home"
50 | labels:
51 | "com.github.cloudbox.cloudbox_managed": "true"
52 | networks:
53 | - name: cloudbox
54 | aliases:
55 | - resilio-sync
56 | purge_networks: yes
57 | restart_policy: unless-stopped
58 | state: started
59 |
--------------------------------------------------------------------------------
/roles/resilio-sync/tasks/subtasks/legacy_migration.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Resilio Sync | Legacy Migration #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: Remove legacy subdomains
12 | cloudflare_dns:
13 | account_api_token: "{{ cloudflare.api }}"
14 | account_email: "{{ cloudflare.email }}"
15 | zone: "{{ user.domain }}"
16 | state: absent
17 | type: A
18 | record: "{{ item }}"
19 | loop:
20 | - resilio
21 | - resiliosync
22 | when: cloudflare_enabled
23 |
24 | - name: Stop and remove legacy containers
25 | docker_container:
26 | name: resilio
27 | state: absent
28 |
29 | - name: Check if legacy folder exists
30 | stat:
31 | path: "/opt/resilio"
32 | register: old_folder
33 |
34 | - name: Check if new folder exists
35 | stat:
36 | path: "/opt/resilio-sync"
37 | register: new_folder
38 |
39 | - name: Rename old folder to new one
40 | shell: |
41 | mv /opt/resilio /opt/resilio-sync
42 | when: (old_folder.stat.exists) and (not new_folder.stat.exists)
43 |
--------------------------------------------------------------------------------
/roles/sanity_check/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Sanity Check #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: "Cloudbox Check"
12 | import_tasks: "subtasks/cloudbox_check.yml"
13 |
14 | - name: "Backup Check"
15 | import_tasks: "subtasks/backup_check.yml"
16 |
17 | - name: "Tags Check"
18 | import_tasks: "subtasks/tags_check.yml"
19 |
--------------------------------------------------------------------------------
/roles/sanity_check/tasks/subtasks/backup_check.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Sanity Check | Backup Check #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: "Check if 'backup.lock' is present in the 'cloudbox' folder"
12 | stat:
13 | path: "/home/{{ user.name }}/cloudbox/backup.lock"
14 | register: backup_lock
15 |
16 | # Age in hours
17 | - name: "Get age of 'backup.lock' file"
18 | set_fact:
19 | backup_lock_age: "{{ ( ( ( (ansible_date_time.epoch|int) - (backup_lock.stat.ctime|int) ) / (60*60) ) | int ) }}"
20 | when: backup_lock.stat.exists
21 |
22 | # Delete if older than 2 hours.
23 | - name: "Delete stale 'backup.lock'"
24 | file:
25 | path: "/home/{{ user.name }}/cloudbox/backup.lock"
26 | state: absent
27 | when: (backup_lock.stat.exists) and (backup_lock_age|int >= 2)
28 |
29 | - name: "Fail when 'backup.lock' exists."
30 | fail:
31 | msg: "A Backup task is currently in progress. Please wait for it to complete."
32 | when: (backup_lock.stat.exists) and (backup_lock_age|int < 1)
33 |
--------------------------------------------------------------------------------
/roles/sanity_check/tasks/subtasks/cloudbox_check.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Sanity Check | Cloudbox Check #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: "Check if 'cloudbox' folder is present"
12 | stat:
13 | path: "/home/{{ user.name }}/cloudbox"
14 | register: cloudbox_path
15 |
16 | - name: "Fail when 'cloudbox' folder does not exist"
17 | fail:
18 | msg: "Cloudbox installation is required before running the Cloudbox Community roles."
19 | when: not cloudbox_path.stat.exists
20 |
--------------------------------------------------------------------------------
/roles/sanity_check/tasks/subtasks/tags_check.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Sanity Check | Tags Check #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | # Source: http://blog.leifmadsen.com/blog/2017/01/04/finding-available-ansible-tags-in-playbooks-and-roles/
12 | - name: "Get all available tags"
13 | shell: |
14 | ansible-playbook community.yml --list-tags 2>&1 | grep "TASK TAGS" \
15 | | cut -d":" -f2 | awk '{sub(/\[/, "")sub(/\]/, "")}1' | sed -e 's/,//g' | xargs -n 1 | sort -u
16 | register: tags
17 | changed_when: no
18 |
19 | - name: "List available tags"
20 | debug:
21 | msg: "{{ tags.stdout_lines | join(', ') }}"
22 |
23 | - name: "Ensure valid tags were provided."
24 | assert:
25 | that:
26 | - '"{{ item }}" in tags.stdout_lines'
27 | msg: "You must supply valid tags.')"
28 | with_items: "{{ ansible_run_tags }}"
29 |
--------------------------------------------------------------------------------
/roles/sanity_check/tasks/subtasks/touch_logs.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Sanity Check | Touch Logs #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: "Touch Logs | Get 'community.yml' info."
12 | stat:
13 | path: "{{ playbook_dir }}/community.yml"
14 | register: community_yml
15 |
16 | - name: "Touch Logs | Touch 'community.log'"
17 | file:
18 | path: "{{ playbook_dir }}/community.log"
19 | state: touch
20 | owner: "{{ community_yml.stat.uid }}"
21 | group: "{{ community_yml.stat.gid }}"
22 | mode: 0664
23 |
--------------------------------------------------------------------------------
/roles/searx/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Searx #
3 | # Author(s): Jolbol1 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): searx/searx:latest #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: "{{ searx.subdomain|default('searx',true) }}"
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing containers
20 | docker_container: "name={{ item }} state=absent"
21 | with_items:
22 | - searx
23 |
24 | - name: Create and start SearX container
25 | docker_container:
26 | name: searx
27 | image: "searx/searx:latest"
28 | pull: yes
29 | env:
30 | TZ: "{{ tz }}"
31 | PUID: "{{ uid }}"
32 | PGID: "{{ gid }}"
33 | VIRTUAL_HOST: "{{ searx.subdomain|default('searx',true) }}.{{ user.domain }}"
34 | VIRTUAL_PORT: "8888"
35 | LETSENCRYPT_HOST: "{{ searx.subdomain|default('searx',true) }}.{{ user.domain }}"
36 | LETSENCRYPT_EMAIL: "{{ user.email }}"
37 | LOG_LEVEL: DEBUG
38 | labels:
39 | "com.github.cloudbox.cloudbox_managed": "true"
40 | networks:
41 | - name: cloudbox
42 | aliases:
43 | - searx
44 | purge_networks: yes
45 | restart_policy: unless-stopped
46 | state: started
47 |
--------------------------------------------------------------------------------
/roles/settings/tasks/ansible_config_2.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Settings | Ansible Config #
3 | # Author(s): l3uddz, desimaniac, Migz93 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: "Settings Role updated 'ansible.cfg'."
12 | debug:
13 | msg:
14 | - "Settings Role updated 'ansible.cfg'"
15 | - "You will need to re-run your previous tag to continue."
16 |
17 | - name: "Exit so that user can check updated config files"
18 | debug:
19 | msg: "Cloudbox Installer will now exit."
20 |
21 | - name: "Exit"
22 | meta: end_play
23 |
--------------------------------------------------------------------------------
/roles/settings/tasks/exit.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Settings | Exit After Changes #
3 | # Author(s): l3uddz, desimaniac, Migz93 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | # Exit When settings have been updated
12 | - block:
13 |
14 | - name: "Check 'settings-updater.py' for new settings."
15 | debug:
16 | msg: "The 'settings_updater.py' script updated the following file{{ files_updated_successfully | pluralize }}: '{{ files_updated_successfully | join(', ') | trim }}'. Please check {{ files_updated_successfully | pluralize('this file','these files') }} for the newly added settings. You can also review the log file, 'settings-updater.log'."
17 | when: files_updated_successfully | length > 0
18 |
19 | - name: "Check 'settings-updater.py' run status for errors."
20 | debug:
21 | msg: "The 'settings_updater.py' script exited with an error when updating the following file{{ files_updated_unsuccessfully | pluralize }}: '{{ files_updated_unsuccessfully | join(', ') | trim }}'. Please check 'settings-updater.log' for details."
22 | when: files_updated_unsuccessfully | length > 0
23 |
24 | - name: "Exit so that user can check updated files and/or 'settings-updater.log'."
25 | fail:
26 | msg: "Community Installer will now exit."
27 |
28 | when: exit_is_necessary
29 |
--------------------------------------------------------------------------------
/roles/settings/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Settings #
3 | # Author(s): l3uddz, desimaniac, Migz93 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: "Install ruamel.yaml"
12 | pip:
13 | name: ruamel.yaml
14 | executable: pip3
15 |
16 | - name: "Get 'community.yml' info."
17 | stat:
18 | path: "{{ playbook_dir }}/community.yml"
19 | register: community_yml
20 |
21 | - name: "Settings: Ansible Config"
22 | include_tasks: "ansible_config.yml"
23 | with_items:
24 | - "ansible.cfg"
25 |
26 | - name: Initialize empty lists and vars
27 | set_fact:
28 | files_updated_successfully: []
29 | files_updated_unsuccessfully: []
30 | exit_is_necessary: false
31 |
32 | - name: "Setting: Settings Updater"
33 | include_tasks: "settings_updater.yml"
34 | with_items:
35 | - "settings.yml"
36 | - "telly.yml"
37 |
38 | - name: "Settings: Exit After Changes"
39 | include_tasks: "exit.yml"
40 |
--------------------------------------------------------------------------------
/roles/sonarrx/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: SonarrX #
3 | # Author(s): Kalroth, Migz93 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): cr.hotio.dev/hotio/sonarr, cr.hotio.dev/hotio/sonarr3 #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Gather list of sonarrx Docker containers"
13 | shell: "docker ps -a --format '{{ '{{' }} .Names{{ '}}' }}' --filter label=com.github.cloudbox.community=sonarrx | xargs echo -n"
14 | register: cloudbox_community_sonarrx
15 | ignore_errors: yes
16 |
17 | - name: "Stop all sonarrx Docker containers"
18 | shell: "docker stop {{ cloudbox_community_sonarrx.stdout }}"
19 | ignore_errors: yes
20 | when: (cloudbox_community_sonarrx.stdout | trim | length > 0)
21 |
22 | - name: "Remove all sonarrx Docker containers"
23 | shell: "docker rm {{ cloudbox_community_sonarrx.stdout }}"
24 | ignore_errors: yes
25 | when: (cloudbox_community_sonarrx.stdout | trim | length > 0)
26 |
27 | - name: Stop and remove sonarr4k Docker container if it exists
28 | docker_container:
29 | name: sonarr4k
30 | state: absent
31 |
32 | - name: "Execute SonarrX roles"
33 | include_tasks: template.yml
34 | vars:
35 | rolename: "{{ role }}"
36 | with_items: "{{ sonarrx.roles }}"
37 | loop_control:
38 | loop_var: role
39 |
--------------------------------------------------------------------------------
/roles/sonarrx/tasks/subtasks/darkerr.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: SonarrX | Darkerr Tasks #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: Darkerr | Darkerr theme location block
12 | blockinfile:
13 | path: "/opt/nginx-proxy/vhost.d/sonarr{{ rolename }}.{{ user.domain }}_location"
14 | marker: "### {mark} CLOUDBOX - DARKERR THEME ###"
15 | block: |
16 | # https://github.com/gilbN/theme.park
17 | proxy_set_header Accept-Encoding "";
18 | sub_filter
19 | ''
20 | '
21 | ';
22 | sub_filter_once on;
23 | owner: "{{ user.name }}"
24 | group: "{{ user.name }}"
25 | mode: 0664
26 | create: yes
27 | state: "{{ (darkerr.enable | default(false,true)) | ternary('present','absent') }}"
28 |
--------------------------------------------------------------------------------
/roles/sonarrx/tasks/subtasks/suitarr_migration.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: SonarrX | Suitarr Migration Tasks #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: Suitarr Migration | Check folder exists
12 | stat:
13 | path: "/opt/sonarr{{ rolename }}"
14 | register: folder
15 |
16 | - name: Suitarr Migration | Check subfolder1 exists
17 | stat:
18 | path: "/opt/sonarr{{ rolename }}/Sonarr"
19 | register: subfolder1
20 |
21 | - name: Suitarr Migration | Check subfolder2 exists
22 | stat:
23 | path: "/opt/sonarr{{ rolename }}/app"
24 | register: subfolder2
25 |
26 | - name: Suitarr Migration | Move 'app' subfolder contents to 'sonarrx' folder
27 | shell: |
28 | mv "/opt/sonarr{{ rolename }}/app" "/tmp/sonarr{{ rolename }}"
29 | mkdir "/opt/sonarr{{ rolename }}"
30 | mv "/tmp/sonarr{{ rolename }}/*" "/opt/sonarr{{ rolename }}/"
31 | find "/opt/sonarr{{ rolename }}/*" -type d -empty -delete
32 | chown -R {{ user.name }}:{{ user.name }} "/opt/sonarr{{ rolename }}"
33 | when: (folder.stat.exists) and (subfolder2.stat.exists) and (not subfolder1.stat.exists)
34 |
35 | - name: Suitarr Migration | Move 'Sonarr' subfolder contents to 'sonarrx' folder
36 | shell: |
37 | mv "/opt/sonarr{{ rolename }}/Sonarr/*" "/opt/sonarr{{ rolename }}/"
38 | chown -R {{ user.name }}:{{ user.name }} "/opt/sonarr{{ rolename }}"
39 | when: (folder.stat.exists) and (subfolder1.stat.exists) and (not subfolder2.stat.exists)
40 |
--------------------------------------------------------------------------------
/roles/speedtest/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Speedtest Server #
3 | # Author(s): Satz #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): satzisa/html5-speedtest #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: speedtest
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: speedtest
22 | state: absent
23 |
24 | - name: Create speedtest directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }} recurse=yes"
26 | with_items:
27 | - /opt/speedtest/
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: speedtest
32 | image: "satzisa/html5-speedtest"
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | UID: "{{ uid }}"
37 | GID: "{{ gid }}"
38 | VIRTUAL_HOST: "speedtest.{{ user.domain }}"
39 | VIRTUAL_PORT: "80"
40 | LETSENCRYPT_HOST: "speedtest.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | volumes:
43 | - "/opt/speedtest:/var/www/html:rw"
44 | networks:
45 | - name: cloudbox
46 | aliases:
47 | - speedtest
48 | purge_networks: yes
49 | restart_policy: unless-stopped
50 | state: started
51 |
--------------------------------------------------------------------------------
/roles/sshwifty/templates/sshwifty.conf.json.j2:
--------------------------------------------------------------------------------
1 | {
2 | "HostName": "",
3 | "SharedKey": "{{user.pass}}",
4 | "DialTimeout": 5,
5 | "Socks5": "",
6 | "Socks5User": "",
7 | "Socks5Password": "",
8 | "Servers": [
9 | {
10 | "ListenInterface": "0.0.0.0",
11 | "ListenPort": 8182,
12 | "InitialTimeout": 3,
13 | "ReadTimeout": 60,
14 | "WriteTimeout": 60,
15 | "HeartbeatTimeout": 20,
16 | "ReadDelay": 10,
17 | "WriteDelay": 10,
18 | "TLSCertificateFile": "",
19 | "TLSCertificateKeyFile": ""
20 | }
21 | ]
22 | }
--------------------------------------------------------------------------------
/roles/stash/tasks/main.yml:
--------------------------------------------------------------------------------
1 | ###################################################################
2 | # Title: Community: Stash #
3 | # Author(s): -SK #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): stashapp/stash #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | ###################################################################
9 | # GNU General Public License v3.0 #
10 | ###################################################################
11 | ---
12 | - name: Setting CloudFlare DNS Record
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: stash
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: stash
22 | state: absent
23 |
24 | - name: Create stash directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/stash
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: stash
32 | image: stashapp/stash:development
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | UID: "{{ uid }}"
37 | GID: "{{ gid }}"
38 | VIRTUAL_HOST: "stash.{{ user.domain }}"
39 | VIRTUAL_PORT: "9999"
40 | LETSENCRYPT_HOST: "stash.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | STASH_STASH: "/data/"
43 | STASH_GENERATED: "/generated/"
44 | STASH_METADATA: "/metadata/"
45 | STASH_CACHE: "/cache/"
46 | volumes:
47 | - "/mnt/unionfs/Media/adult:/data"
48 | - "/opt/stash/config:/root/.stash"
49 | - "/opt/stash/metadata:/metadata"
50 | - "/opt/stash/cache:/cache"
51 | - "/opt/stash/generated:/generated"
52 | - "/mnt:/mnt"
53 | labels:
54 | "com.github.cloudbox.cloudbox_managed": "true"
55 | networks:
56 | - name: cloudbox
57 | aliases:
58 | - stash
59 | purge_networks: yes
60 | restart_policy: unless-stopped
61 | state: started
62 |
--------------------------------------------------------------------------------
/roles/subsonic/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Subsonic #
3 | # Author(s): Migz93 #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): theultimatecoder/subsonic #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: subsonic
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: subsonic
22 | state: absent
23 |
24 | - name: Create subsonic directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/subsonic
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: subsonic
32 | image: theultimatecoder/subsonic
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | SUBSONIC_UID: "{{ uid }}"
37 | SUBSONIC_GID: "{{ gid }}"
38 | VIRTUAL_HOST: "subsonic.{{ user.domain }}"
39 | VIRTUAL_PORT: "4040"
40 | LETSENCRYPT_HOST: "subsonic.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | SUBSONIC_MAX_MEMORY: "1024"
43 | volumes:
44 | - "/opt/subsonic:/opt/app/state"
45 | - "/mnt:/mnt"
46 | - "/mnt/unionfs/Media/Music:/mnt/music"
47 | labels:
48 | "com.github.cloudbox.cloudbox_managed": "true"
49 | networks:
50 | - name: cloudbox
51 | aliases:
52 | - subsonic
53 | purge_networks: yes
54 | restart_policy: unless-stopped
55 | state: started
56 |
--------------------------------------------------------------------------------
/roles/telegraf/files/telegraf.conf:
--------------------------------------------------------------------------------
1 | [agent]
2 | interval = "10s"
3 | round_interval = true
4 | metric_batch_size = 1000
5 | metric_buffer_limit = 10000
6 | collection_jitter = "0s"
7 | flush_interval = "10s"
8 | flush_jitter = "0s"
9 | precision = ""
10 | debug = false
11 | quiet = false
12 | logfile = ""
13 | hostname = ""
14 | omit_hostname = false
15 |
16 | [[outputs.influxdb]]
17 | urls = ["http://influxdb:8086"]
18 |
19 | [[inputs.cpu]]
20 | ## Whether to report per-cpu stats or not
21 | percpu = true
22 | ## Whether to report total system cpu stats or not
23 | totalcpu = true
24 | ## If true, collect raw CPU time metrics.
25 | collect_cpu_time = false
26 | ## If true, compute and report the sum of all non-idle CPU states.
27 | report_active = false
28 |
29 | [[inputs.net]]
30 | # ## By default, telegraf gathers stats from any up interface (excluding loopback)
31 | # ## Setting interfaces will tell it to gather these explicit interfaces,
32 | # ## regardless of status.
33 | # ##
34 | # # interfaces = ["eth0"]
35 | # ##
36 | # ## On linux systems telegraf also collects protocol stats.
37 | # ## Setting ignore_protocol_stats to true will skip reporting of protocol metrics.
38 | # ##
39 | # # ignore_protocol_stats = false
40 | # ##
41 |
42 | [[inputs.disk]]
43 | ## By default stats will be gathered for all mount points.
44 | ## Set mount_points will restrict the stats to only the specified mount points.
45 | mount_points = ["/host/"]
46 |
47 | ## Ignore mount points by filesystem type.
48 | ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"]
49 |
50 | [[inputs.kernel]]
51 | # no configuration
52 |
53 |
54 | [[inputs.mem]]
55 | # no configuration
56 |
57 |
58 | [[inputs.processes]]
59 | # no configuration
60 |
61 |
62 | [[inputs.swap]]
63 | # no configuration
64 |
65 |
66 | [[inputs.system]]
67 | # no configuration
68 |
69 | [[inputs.docker]]
70 | endpoint = "unix:///var/run/docker.sock"
71 |
--------------------------------------------------------------------------------
/roles/telegraf/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Cloudbox: Telegraf Role #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/cloudbox/cloudbox #
5 | # Docker Image(s): telegraf #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Stop and remove any existing containers
13 | docker_container:
14 | name: telegraf
15 | state: absent
16 |
17 | - name: Create required directories
18 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
19 | with_items:
20 | - /opt/telegraf
21 |
22 | - name: Check if telegraf config exists
23 | stat:
24 | path: "/opt/telegraf/telegraf.conf"
25 | register: telegraf_conf
26 |
27 | - name: Import telegraf config if needed
28 | copy:
29 | src: "telegraf.conf"
30 | dest: "/opt/telegraf/telegraf.conf"
31 | owner: "{{ uid }}"
32 | group: "{{ gid }}"
33 | mode: 0775
34 | when: not telegraf_conf.stat.exists
35 |
36 | - name: Create and start telegraf container
37 | docker_container:
38 | name: telegraf
39 | image: "telegraf"
40 | pull: yes
41 | env:
42 | PUID: "{{ uid }}"
43 | PGID: "{{ gid }}"
44 | volumes:
45 | - "/opt/telegraf:/etc/telegraf:ro"
46 | - "/var/run/docker.sock:/var/run/docker.sock:ro"
47 | - "/var/run/utmp:/var/run/utmp"
48 | - "/:/host:ro"
49 | - "/sys:/host/sys:ro"
50 | - "/proc:/host/proc:ro"
51 | - "/etc:/host/etc:ro"
52 | labels:
53 | "com.github.cloudbox.cloudbox_managed": "true"
54 | networks:
55 | - name: cloudbox
56 | aliases:
57 | - telegraf
58 | purge_networks: yes
59 | restart_policy: unless-stopped
60 | state: started
61 |
--------------------------------------------------------------------------------
/roles/telly/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Telly #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # -- #
6 | # Part of the Cloudbox project: https://cloudbox.works #
7 | #########################################################################
8 | # GNU General Public License v3.0 #
9 | #########################################################################
10 | ---
11 | - name: Import vars
12 | include_vars: "{{ item }}"
13 | with_first_found:
14 | - "../../telly.yml"
15 | - "../../defaults/telly.yml.default"
16 |
17 | - name: Installing Telly 1.0
18 | include_tasks: "telly10.yml"
19 | when: telly.version == "1.0" or telly.version == 1.0
20 |
21 | - name: Installing Telly 1.1
22 | include_tasks: "telly11.yml"
23 | when: telly.version == "1.1" or telly.version == 1.1
24 |
25 | - name: Installing Telly 1.5
26 | include_tasks: "telly15.yml"
27 | when: telly.version == "1.5" or telly.version == 1.5
28 |
--------------------------------------------------------------------------------
/roles/telly/tasks/telly15.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Telly | Telly 1.5 #
3 | # Author(s): EnorMOZ, Desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image: tellytv/telly #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Version Info
13 | debug:
14 | msg: "Installing Telly version: {{ telly.version }}"
15 |
16 | - name: "Set DNS Record on CloudFlare"
17 | include_role:
18 | name: cloudflare-dns
19 | vars:
20 | record: telly
21 | when: cloudflare_enabled
22 |
23 | - name: Stop and remove any existing container
24 | docker_container:
25 | name: telly
26 | state: absent
27 |
28 | - name: Create telly directories
29 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
30 | with_items:
31 | - "/opt/telly"
32 | - "/opt/telly/telly.db"
33 |
34 | - name: Create and start container
35 | docker_container:
36 | name: telly
37 | image: "tellytv/telly:v1.5.0"
38 | pull: yes
39 | user: "{{ uid }}:{{ gid }}"
40 | command: --database.file="/telly/telly.db"
41 | env:
42 | TZ: "{{ tz }}"
43 | TELLY_LOG_LEVEL: "debug"
44 | VIRTUAL_HOST: "telly.{{ user.domain }}"
45 | VIRTUAL_PORT: "6077"
46 | LETSENCRYPT_HOST: "telly.{{ user.domain }}"
47 | LETSENCRYPT_EMAIL: "{{ user.email }}"
48 | volumes:
49 | - "/opt/telly/telly.db:/telly/"
50 | labels:
51 | "com.github.cloudbox.cloudbox_managed": "true"
52 | networks:
53 | - name: cloudbox
54 | aliases:
55 | - telly
56 | purge_networks: yes
57 | restart_policy: unless-stopped
58 | state: started
59 |
--------------------------------------------------------------------------------
/roles/telly/templates/telly11.config.json.j2:
--------------------------------------------------------------------------------
1 | {
2 | "Discovery": {
3 | "Device-Auth": "telly123",
4 | "Device-ID": 12345678,
5 | "Device-UUID": "",
6 | "Device-Firmware-Name": "hdhomeruntc_atsc",
7 | "Device-Firmware-Version": "20150826",
8 | "Device-Friendly-Name": "telly",
9 | "Device-Manufacturer": "Silicondust",
10 | "Device-Model-Number": "HDTC-2US",
11 | "SSDP": true
12 | },
13 | "IPTV": {
14 | "Streams": {{ telly11.streams }},
15 | "Starting-Channel": 10000,
16 | "XMLTV-Channels": true
17 | },
18 | "Log": {
19 | "Level": "info",
20 | "Requests": true
21 | },
22 | "Web": {
23 | "Base-Address": "telly:6077",
24 | "Listen-Address": "0.0.0.0:6077"
25 | },
26 | "Source": [
27 | {
28 | "Name": "{{ telly11.provider_name }}",
29 | "Provider": "Custom",
30 | "M3U": "{{ telly11.m3u_url }}",
31 | "EPG": "{{ telly11.epg_url }}",
32 | "Filter": "{{ telly11.filter }}",
33 | "FilterKey": "group-title",
34 | "FilterRaw": false,
35 | "Sort": "group-title"
36 | }
37 | ]
38 | }
39 |
--------------------------------------------------------------------------------
/roles/thelounge/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: TheLounge Role #
3 | # Author(s): l3uddz #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image: lscr.io/linuxserver/thelounge #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: thelounge
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: thelounge
22 | state: absent
23 |
24 | - name: Create thelounge directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/thelounge
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: thelounge
32 | image: "lscr.io/linuxserver/thelounge"
33 | pull: yes
34 | env:
35 | TZ: "{{ tz }}"
36 | PUID: "{{ uid }}"
37 | PGID: "{{ gid }}"
38 | VIRTUAL_HOST: "thelounge.{{ user.domain }}"
39 | VIRTUAL_PORT: "9000"
40 | LETSENCRYPT_HOST: "thelounge.{{ user.domain }}"
41 | LETSENCRYPT_EMAIL: "{{ user.email }}"
42 | volumes:
43 | - "/opt/thelounge:/config"
44 | labels:
45 | "com.github.cloudbox.cloudbox_managed": "true"
46 | networks:
47 | - name: cloudbox
48 | aliases:
49 | - thelounge
50 | purge_networks: yes
51 | restart_policy: unless-stopped
52 | state: started
53 |
--------------------------------------------------------------------------------
/roles/transmissionx/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: TransmissionX #
3 | # Author(s): giosann,saltydk #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image: lscr.io/linuxserver/trasmission #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Gather list of transmissionx Docker containers"
13 | shell: "docker ps -a --format '{{ '{{' }} .Names{{ '}}' }}' --filter label=com.github.cloudbox.community=transmissionx | xargs echo -n"
14 | register: cloudbox_community_transmissionx
15 | ignore_errors: yes
16 |
17 | - name: "Stop all transmissionx Docker containers"
18 | shell: "docker stop {{ cloudbox_community_transmissionx.stdout }}"
19 | ignore_errors: yes
20 | when: (cloudbox_community_transmissionx.stdout | trim | length > 0)
21 |
22 | - name: "Remove all transmissionx Docker containers"
23 | shell: "docker rm {{ cloudbox_community_transmissionx.stdout }}"
24 | ignore_errors: yes
25 | when: (cloudbox_community_transmissionx.stdout | trim | length > 0)
26 |
27 | - name: "Execute transmissionx roles"
28 | include_tasks: template.yml
29 | vars:
30 | rolename: "{{ role }}"
31 | roleport: "{{ 51513 + index }}"
32 | with_items: "{{ transmissionx.roles }}"
33 | loop_control:
34 | loop_var: role
35 | index_var: index
36 |
--------------------------------------------------------------------------------
/roles/transmissionx/tasks/settings/dynamic.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: transmissionx | Dynamic Settings Tasks #
3 | # Author(s): giosann #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image: lscr.io/linuxserver/trasmission #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | # settings.json
13 |
14 | # Change Published Port
15 | - name: Settings | Dynamic | Set peer-port
16 | lineinfile:
17 | path: "/opt/transmission{{ rolename }}/settings.json"
18 | regexp: '^\s*\"peer\-port\"\:.*'
19 | line: ' "peer-port": {{ roleport }},'
20 | state: present
21 |
--------------------------------------------------------------------------------
/roles/transmissionx/tasks/settings/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: transmissionx | Settings Tasks #
3 | # Author(s): giosann #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image: lscr.io/linuxserver/trasmission #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | ## Checks
13 |
14 | - name: Settings | Wait for 'settings.json' to be created
15 | wait_for:
16 | path: "/opt/transmission{{ rolename }}/settings.json"
17 | state: present
18 |
19 | - name: Settings | Wait for 10 seconds before stopping transmissionx container
20 | wait_for:
21 | timeout: 10
22 |
23 | - name: Settings | Stop container
24 | docker_container:
25 | name: transmission{{ rolename }}
26 | state: stopped
27 |
28 | ## transmissionx Static Settings Tasks
29 |
30 | - name: Settings | transmissionx Static Settings Tasks
31 | include_tasks: "static.yml"
32 | when: (not settings_json.stat.exists)
33 |
34 | ## transmissionx Dynamic Settings Tasks
35 |
36 | - name: Settings | transmissionx Dynamic Settings Tasks
37 | include_tasks: "dynamic.yml"
38 |
39 | ## Start container
40 |
41 | - name: Settings | Start container
42 | docker_container:
43 | name: transmission{{ rolename }}
44 | state: started
45 |
--------------------------------------------------------------------------------
/roles/ubooquity/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Ubooquity #
3 | # Author(s): theotocopulitos #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/ubooquity #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: ubooquity
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: ubooquity
22 | state: absent
23 |
24 | - name: Create ubooquity directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/ubooquity
28 | - /mnt/local/Media/Comics
29 |
30 | - name: Create and start container
31 | docker_container:
32 | name: ubooquity
33 | image: lscr.io/linuxserver/ubooquity
34 | pull: yes
35 | published_ports:
36 | - "2203:2203"
37 | env:
38 | TZ: "{{ tz }}"
39 | PUID: "{{ uid }}"
40 | PGID: "{{ gid }}"
41 | VIRTUAL_HOST: "ubooquity.{{ user.domain }}"
42 | VIRTUAL_PORT: "2202"
43 | LETSENCRYPT_HOST: "ubooquity.{{ user.domain }}"
44 | LETSENCRYPT_EMAIL: "{{ user.email }}"
45 | volumes:
46 | - "/opt/ubooquity:/config"
47 | - "/mnt/unionfs/Media/Comics:/comics"
48 | - "/mnt/unionfs/Media/Books:/books"
49 | - "/mnt/unionfs/Media/Files:/files"
50 | - "/mnt:/mnt"
51 |
52 | labels:
53 | "com.github.cloudbox.cloudbox_managed": "true"
54 | networks:
55 | - name: cloudbox
56 | aliases:
57 | - ubooquity
58 | purge_networks: yes
59 | restart_policy: unless-stopped
60 | state: started
61 |
--------------------------------------------------------------------------------
/roles/unifi/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Unifi Controller #
3 | # Author(s): maximuskowalski #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): lscr.io/linuxserver/unifi-controller #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: unifi
17 | when: cloudflare_enabled
18 |
19 | - name: "Create unifi directories"
20 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
21 | with_items:
22 | - "/opt/unifi"
23 |
24 | - name: "Stop and remove any existing container"
25 | docker_container:
26 | name: unifi
27 | state: absent
28 |
29 | - name: "Pull unifi Docker image"
30 | docker_image:
31 | name: "lscr.io/linuxserver/unifi-controller:latest"
32 |
33 | - name: Create and start unifi container
34 | docker_container:
35 | name: unifi
36 | image: "lscr.io/linuxserver/unifi-controller:latest"
37 | published_ports:
38 | - 3478:3478/udp
39 | - "{{ unifi.port|default('8089',true) }}:8080"
40 | env:
41 | TZ: "{{ tz }}"
42 | PUID: "{{ uid }}"
43 | PGID: "{{ gid }}"
44 | VIRTUAL_HOST: "unifi.{{ user.domain }}"
45 | VIRTUAL_PORT: "8443"
46 | VIRTUAL_PROTO: "https"
47 | LETSENCRYPT_HOST: "unifi.{{ user.domain }}"
48 | LETSENCRYPT_EMAIL: "{{ user.email }}"
49 | volumes:
50 | - "/opt/unifi:/config"
51 | labels:
52 | "com.github.cloudbox.cloudbox_managed": "true"
53 | networks:
54 | - name: cloudbox
55 | aliases:
56 | - unifi
57 | purge_networks: yes
58 | restart_policy: unless-stopped
59 | state: started
60 |
--------------------------------------------------------------------------------
/roles/unmanic/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: unmanic #
3 | # Author(s): chazlarson #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): josh5/unmanic #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: unmanic
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: unmanic
22 | state: absent
23 |
24 | - name: Create unmanic directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/unmanic
28 | - "{{ plex.transcodes }}/unmanic"
29 |
30 | - name: Create and start container
31 | docker_container:
32 | name: unmanic
33 | image: josh5/unmanic:latest
34 | pull: yes
35 | env:
36 | TZ: "{{ tz }}"
37 | PUID: "{{ uid }}"
38 | PGID: "{{ gid }}"
39 | VIRTUAL_HOST: "unmanic.{{ user.domain }}"
40 | VIRTUAL_PORT: "8888"
41 | LETSENCRYPT_HOST: "unmanic.{{ user.domain }}"
42 | LETSENCRYPT_EMAIL: "{{ user.email }}"
43 | volumes:
44 | - "/opt/unmanic:/config"
45 | - "{{ plex.transcodes }}/unmanic:/tmp/unmanic"
46 | - "/mnt/unionfs/Media:/library"
47 | - "/mnt:/mnt"
48 | labels:
49 | "com.github.cloudbox.cloudbox_managed": "true"
50 | networks:
51 | - name: cloudbox
52 | aliases:
53 | - unmanic
54 | exposed_ports:
55 | - 8888
56 | purge_networks: yes
57 | restart_policy: unless-stopped
58 | state: started
59 |
--------------------------------------------------------------------------------
/roles/varken/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Cloudbox: Varken Role #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/cloudbox/cloudbox #
5 | # Docker Image(s): boerderij/varken #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: InfluxDB Role
13 | include_role:
14 | name: influxdb
15 |
16 | - name: Telegraf Role
17 | include_role:
18 | name: telegraf
19 |
20 | - name: Grafana Role
21 | include_role:
22 | name: grafana
23 |
24 | - name: Stop and remove any existing containers
25 | docker_container:
26 | name: varken
27 | state: absent
28 |
29 | - name: Create required directories
30 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
31 | with_items:
32 | - /opt/varken
33 |
34 | - name: Check if varken config exists
35 | stat:
36 | path: "/opt/varken/config.json"
37 | register: varken_config
38 |
39 | - name: Import config tasks
40 | import_tasks: config.yml
41 | when: not varken_config.stat.exists
42 |
43 | - name: Create and start varken container
44 | docker_container:
45 | name: varken
46 | image: "boerderij/varken"
47 | pull: yes
48 | env:
49 | PUID: "{{ uid }}"
50 | PGID: "{{ gid }}"
51 | TZ: "{{ tz }}"
52 | volumes:
53 | - "/opt/varken:/config"
54 | labels:
55 | "com.github.cloudbox.cloudbox_managed": "true"
56 | networks:
57 | - name: cloudbox
58 | aliases:
59 | - varken
60 | purge_networks: yes
61 | restart_policy: unless-stopped
62 | state: started
63 |
--------------------------------------------------------------------------------
/roles/varken/templates/varken.ini.js2:
--------------------------------------------------------------------------------
1 | # Notes:
2 | # - Sonarr + Radarr scripts support multiple servers. You can remove the second
3 | # server by putting a # in front of the lines and section name, and removing
4 | # that number from your server_ids list
5 | # - fallback_ip, This is used when there is no IP listed in tautulli.
6 | # This can happen when you are streaming locally. This is usually your public IP.
7 |
8 | [global]
9 | sonarr_server_ids = 1
10 | radarr_server_ids = 1
11 | tautulli_server_ids = 1
12 | ombi_server_ids = 1
13 |
14 | [influxdb]
15 | url = influxdb
16 | port = 8086
17 | username =
18 | password =
19 |
20 | [tautulli-1]
21 | url = {{ varken.tautulli_subdomain }}.{{ user.domain }}
22 | fallback_ip = {{ ip }}
23 | apikey = {{ tautulli_api_key }}
24 | ssl = false
25 | verify_ssl = false
26 | get_activity = true
27 | get_activity_run_seconds = 30
28 | get_stats = true
29 | get_stats_run_seconds = 3600
30 |
31 | [sonarr-1]
32 | url = sonarr.{{ user.domain }}
33 | apikey = {{ sonarr_api_key }}
34 | ssl = false
35 | verify_ssl = false
36 | missing_days = 7
37 | missing_days_run_seconds = 300
38 | future_days = 1
39 | future_days_run_seconds = 300
40 | queue = true
41 | queue_run_seconds = 300
42 |
43 | [radarr-1]
44 | url = radarr.{{ user.domain }}
45 | apikey = {{ radarr_api_key }}
46 | ssl = false
47 | verify_ssl = false
48 | queue = true
49 | queue_run_seconds = 300
50 | get_missing = true
51 | get_missing_run_seconds = 300
52 |
53 | [ombi-1]
54 | url = {{ ombi.subdomain|default('ombi',true) }}.{{ user.domain }}
55 | apikey = {{ ombi_api_key }}
56 | ssl = false
57 | verify_ssl = false
58 | get_request_type_counts = true
59 | request_type_run_seconds = 300
60 | get_request_total_counts = true
61 | request_total_run_seconds = 300
62 |
--------------------------------------------------------------------------------
/roles/vnstat/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Vnstat Dashboard #
3 | # Author(s): desimaniac #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): amarston/vnstat-dashboard #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Set CloudFlare DNS Record
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: vnstat
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: vnstat
22 | state: absent
23 |
24 | - name: Lookup htpasswd
25 | stat:
26 | path: "/opt/nginx-proxy/htpasswd/vnstat.{{ user.domain }}"
27 | register: htpasswd_lookup
28 |
29 | - name: Create htpasswd
30 | htpasswd:
31 | path: "/opt/nginx-proxy/htpasswd/vnstat.{{ user.domain }}"
32 | name: "{{ user.name }}"
33 | password: "{{ user.pass }}"
34 | owner: "{{ user.name }}"
35 | group: "{{ user.name }}"
36 | mode: 0664
37 | when: not htpasswd_lookup.stat.exists
38 |
39 | - name: Create and start container
40 | docker_container:
41 | name: vnstat
42 | image: amarston/vnstat-dashboard
43 | pull: yes
44 | env:
45 | TZ: "{{ tz }}"
46 | VIRTUAL_HOST: "vnstat.{{ user.domain }}"
47 | VIRTUAL_PORT: "80"
48 | LETSENCRYPT_HOST: "vnstat.{{ user.domain }}"
49 | LETSENCRYPT_EMAIL: "{{ user.email }}"
50 | volumes:
51 | - "/usr/bin/vnstat:/usr/bin/vnstat:ro"
52 | - "/var/lib/vnstat:/var/lib/vnstat:ro"
53 | labels:
54 | "com.github.cloudbox.cloudbox_managed": "true"
55 | networks:
56 | - name: cloudbox
57 | aliases:
58 | - vnstat
59 | purge_networks: yes
60 | restart_policy: unless-stopped
61 | state: started
62 |
--------------------------------------------------------------------------------
/roles/wallabag/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Wallabag #
3 | # Author(s): addbee #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image(s): wallabag/wallabag #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Setting CloudFlare DNS Record"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: bag
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing containers
20 | docker_container: "name={{ item }} state=absent"
21 | with_items:
22 | - wallabag
23 |
24 | - name: Create required directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/wallabag
28 | - /opt/wallabag/data
29 | - /opt/wallabag/images
30 |
31 | - name: Create and start Wallabag container
32 | docker_container:
33 | name: wallabag
34 | image: "wallabag/wallabag:latest"
35 | pull: yes
36 | env:
37 | TZ: "{{ tz }}"
38 | PUID: "{{ uid }}"
39 | PGID: "{{ gid }}"
40 | PASSWORD: "{{ user.pass }}"
41 | VIRTUAL_HOST: "bag.{{ user.domain }}"
42 | VIRTUAL_PORT: "80"
43 | LETSENCRYPT_HOST: "bag.{{ user.domain }}"
44 | LETSENCRYPT_EMAIL: "{{ user.email }}"
45 | SYMFONY__ENV__DOMAIN_NAME: "https://bag.{{ user.domain }}"
46 | volumes:
47 | - "/opt/wallabag/data:/var/www/wallabag/data:rw"
48 | - "/opt/wallabag/images:/var/www/wallabag/web/assets/images:rw"
49 | labels:
50 | "com.github.cloudbox.cloudbox_managed": "true"
51 | networks:
52 | - name: cloudbox
53 | aliases:
54 | - wallabag
55 | purge_networks: yes
56 | restart_policy: unless-stopped
57 | state: started
58 |
59 |
60 |
--------------------------------------------------------------------------------
/roles/watchtower/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: Watchower Role #
3 | # Author(s): l3uddz #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image: containrrr/watchtower #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: Stop and remove any existing container
13 | docker_container:
14 | name: watchtower
15 | state: absent
16 |
17 | - name: Create watchtower directories
18 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }} recurse=yes"
19 | with_items:
20 | - /opt/watchtower
21 |
22 | - name: "Check if watchtower.env file exists"
23 | stat:
24 | path: "/opt/watchtower/watchtower.env"
25 | register: watchtower_env
26 |
27 | - name: "Import watchtower.env if it doesnt exist"
28 | template:
29 | src: watchtower.env.j2
30 | dest: /opt/watchtower/watchtower.env
31 | force: yes
32 | owner: "{{ user.name }}"
33 | group: "{{ user.name }}"
34 | mode: 0775
35 | when: not watchtower_env.stat.exists
36 |
37 | - name: Create container
38 | docker_container:
39 | name: watchtower
40 | image: "containrrr/watchtower"
41 | pull: yes
42 | env_file: /opt/watchtower/watchtower.env
43 | env:
44 | TZ: "{{ tz }}"
45 | volumes:
46 | - "/var/run/docker.sock:/var/run/docker.sock"
47 | labels:
48 | "com.github.cloudbox.cloudbox_managed": "true"
49 | networks:
50 | - name: cloudbox
51 | aliases:
52 | - watchtower
53 | purge_networks: yes
54 | state: started
55 | restart_policy: unless-stopped
56 |
--------------------------------------------------------------------------------
/roles/watchtower/templates/watchtower.env.j2:
--------------------------------------------------------------------------------
1 | TZ={{ tz }}
2 | WATCHTOWER_CLEANUP=true
3 | WATCHTOWER_POLL_INTERVAL=86400
4 |
--------------------------------------------------------------------------------
/roles/znc/tasks/main.yml:
--------------------------------------------------------------------------------
1 | #########################################################################
2 | # Title: Community: ZNC Role #
3 | # Author(s): l3uddz, horjulf #
4 | # URL: https://github.com/Cloudbox/Community #
5 | # Docker Image: horjulf/docker-znc #
6 | # -- #
7 | # Part of the Cloudbox project: https://cloudbox.works #
8 | #########################################################################
9 | # GNU General Public License v3.0 #
10 | #########################################################################
11 | ---
12 | - name: "Set DNS Record on CloudFlare"
13 | include_role:
14 | name: cloudflare-dns
15 | vars:
16 | record: znc
17 | when: cloudflare_enabled
18 |
19 | - name: Stop and remove any existing container
20 | docker_container:
21 | name: znc
22 | state: absent
23 |
24 | - name: Create znc directories
25 | file: "path={{ item }} state=directory mode=0775 owner={{ user.name }} group={{ user.name }}"
26 | with_items:
27 | - /opt/znc
28 |
29 | - name: Create and start container
30 | docker_container:
31 | name: znc
32 | image: horjulf/docker-znc
33 | pull: yes
34 | published_ports:
35 | - "6502:6502"
36 | env:
37 | TZ: "{{ tz }}"
38 | PUID: "{{ uid }}"
39 | PGID: "{{ gid }}"
40 | VIRTUAL_HOST: "znc.{{ user.domain }}"
41 | VIRTUAL_PORT: "6501"
42 | LETSENCRYPT_HOST: "znc.{{ user.domain }}"
43 | LETSENCRYPT_EMAIL: "{{ user.email }}"
44 | volumes:
45 | - "/opt/znc:/config"
46 | labels:
47 | "com.github.cloudbox.cloudbox_managed": "true"
48 | networks:
49 | - name: cloudbox
50 | aliases:
51 | - znc
52 | purge_networks: yes
53 | restart_policy: unless-stopped
54 | state: started
55 |
--------------------------------------------------------------------------------