├── .ansible-lint ├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── BUG_REPORT.md │ └── FEATURE_REQUEST.md ├── dependabot.yml ├── labels.json ├── scripts │ └── notify.py ├── stale.yml └── workflows │ ├── contributors.yml │ ├── notify.yml │ ├── requirements.yml │ ├── retry.yml │ ├── saltbox-os.yml │ └── saltbox.yml ├── .gitignore ├── LICENSE.md ├── README.md ├── backup.yml ├── bin └── git │ ├── hooks-wrapper │ ├── hooks │ └── post-merge-01-alert-to-changes │ └── init-hooks ├── defaults ├── accounts.yml.default ├── adv_settings.yml.default ├── ansible.cfg.default ├── backup_config.yml.default ├── hetzner_vlan.yml.default ├── providers.yml.default └── settings.yml.default ├── filter_plugins ├── plex_filters.py ├── rclone_filters.py └── traefik_host_rule.py ├── inventories ├── group_vars │ └── all.yml ├── host_vars │ └── .gitkeep └── local ├── library ├── find_open_port.py ├── migrate_folder.py ├── qbittorrent_passwd.py └── saltbox_facts.py ├── pictures ├── jetbrains-white.svg └── jetbrains.svg ├── requirements.yml ├── requirements ├── requirements-docker-controller.txt ├── requirements-lint.txt ├── requirements-notify.txt └── requirements-saltbox.txt ├── resources ├── roles │ └── dns │ │ ├── defaults │ │ └── main.yml │ │ ├── files │ │ ├── fetch_cloudflare_records.py │ │ └── requirements.txt │ │ └── tasks │ │ ├── cloudflare │ │ ├── main.yml │ │ └── subtasks │ │ │ ├── add_dns_record.yml │ │ │ ├── add_dns_record │ │ │ ├── ipv4_disabled.yml │ │ │ ├── ipv4_enabled.yml │ │ │ ├── ipv6_disabled.yml │ │ │ └── ipv6_enabled.yml │ │ │ ├── checksum.yml │ │ │ ├── remove_dns_record.yml │ │ │ └── setup.yml │ │ ├── main.yml │ │ └── main2.yml └── tasks │ ├── directories │ └── create_directories.yml │ ├── dns │ ├── tasker.yml │ └── tasker2.yml │ ├── docker │ ├── create_docker_container.yml │ ├── network_container_health_status.yml │ ├── remove_docker_container.yml │ ├── restart_docker_container.yml │ ├── set_docker_devices_variable.yml │ ├── start_docker_container.yml │ ├── start_saltbox_docker_containers.yml │ ├── stop_docker_container.yml │ └── stop_saltbox_docker_containers.yml │ ├── git │ └── clone_git_repo.yml │ ├── instances │ ├── get_info.yml │ ├── lidarr.yml │ ├── overseerr.yml │ ├── plex.yml │ ├── radarr.yml │ ├── readarr.yml │ └── sonarr.yml │ └── systemd │ ├── delete_service.yml │ ├── disable_service.yml │ ├── stop_service.yml │ └── update_service_credentials.yml ├── roles ├── arr_db │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── arr.yml │ │ ├── main.yml │ │ └── tautulli.yml ├── asshama │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ └── loop.yml ├── authelia │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ └── subtasks │ │ │ ├── auth_backend.yml │ │ │ ├── file_backend.yml │ │ │ ├── ldap_backend.yml │ │ │ └── settings.yml │ └── templates │ │ ├── configuration.yml.j2 │ │ └── users_database.yml.j2 ├── authentik │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ └── setup.yml ├── authentik_worker │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── autobrr │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── config.toml.j2 ├── autoheal │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── autoscan │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ │ └── settings.yml │ └── templates │ │ └── config.yml.j2 ├── backup │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── backup_excludes_list.txt │ └── tasks │ │ ├── cron.yml │ │ ├── main.yml │ │ ├── restore_service.yml │ │ ├── sanity_check.yml │ │ ├── snapshot.yml │ │ ├── variables.yml │ │ └── wipe_restore_service.yml ├── backup2 │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── backup_excludes_list.txt │ └── tasks │ │ ├── cron.yml │ │ ├── main.yml │ │ ├── restore_service.yml │ │ ├── sanity_check.yml │ │ ├── snapshot.yml │ │ ├── upload.yml │ │ └── variables.yml ├── bazarr │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── main2.yml ├── btop │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── btrfsmaintenance │ └── tasks │ │ └── main.yml ├── cadvisor │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── cloudflare │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ ├── configuration_rules.yml │ │ ├── configuration_rules │ │ ├── add_configuration_rule.yml │ │ └── remove_configuration_rule.yml │ │ ├── purge_cache.yml │ │ ├── subdomains.yml │ │ ├── subdomains │ │ ├── add_subdomain.yml │ │ └── remove_subdomain.yml │ │ ├── variables.yml │ │ └── zone.yml ├── cloudplow │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ └── subtasks │ │ │ ├── disable.yml │ │ │ └── settings.yml │ └── templates │ │ ├── cloudplow.service.j2 │ │ ├── cloudplow.sh.j2 │ │ └── config.json.j2 ├── common │ ├── defaults │ │ └── main.yml │ ├── files │ │ ├── localhost.yml │ │ └── pip.conf │ └── tasks │ │ ├── btrfs.yml │ │ └── main.yml ├── crowdsec │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── acquis.yaml.j2 │ │ ├── config.yaml.j2 │ │ ├── saltbox-ip-whitelist.yml.j2 │ │ └── saltbox.yml.j2 ├── ctop │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── custom │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── ddclient │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── ddclient.conf.j2 ├── ddns │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── deluge │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ ├── post-install │ │ ├── main.yml │ │ └── settings │ │ │ └── main.yml │ │ └── pre-install │ │ └── main.yml ├── diag │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── cloudflare_ssl.py │ └── tasks │ │ └── main.yml ├── diun │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── diun.yml │ └── tasks │ │ └── main.yml ├── docker │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── docker-update-hosts.py │ ├── tasks │ │ ├── main.yml │ │ └── subtasks │ │ │ ├── binary │ │ │ ├── binary.yml │ │ │ └── binary2.yml │ │ │ ├── btrfs │ │ │ ├── cleanup.yml │ │ │ └── pseudo_file_system.yml │ │ │ ├── compose.yml │ │ │ ├── controller.yml │ │ │ ├── daemon.yml │ │ │ ├── dns.yml │ │ │ ├── dockerhub.yml │ │ │ ├── housekeeping.yml │ │ │ ├── network.yml │ │ │ └── nvidia.yml │ └── templates │ │ ├── docker-controller-helper.service.j2 │ │ ├── docker-controller.service.j2 │ │ ├── docker-update-hosts.service.j2 │ │ └── override.conf.j2 ├── docker_socket_proxy │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── download_clients │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── download_indexers │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── dozzle │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── emby │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── dlna.xml │ └── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ ├── post-install.yml │ │ └── settings.yml ├── error_pages │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── glances │ └── tasks │ │ └── main.yml ├── gluetun │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── main2.yml ├── grafana │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── hetzner │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ ├── grub_edits.yml │ │ ├── hetzner.yml │ │ └── restart.yml ├── hetzner_nfs │ ├── defaults │ │ └── main.yml │ ├── 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 ├── hetzner_vlan │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── iperf3 │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── jackett │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── jaeger │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── jellyfin │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── dlna.xml │ └── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ ├── postinstall.yml │ │ ├── preinstall.yml │ │ └── settings.yml ├── kernel │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ ├── 01_preinstall.yml │ │ ├── 02_cron.yml │ │ ├── 03_update_focal.yml │ │ ├── 04_update_jammy.yml │ │ ├── 05_update_noble.yml │ │ └── 06_restart.yml ├── lidarr │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ └── auth.yml ├── lldap │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── lldap_config.toml.j2 ├── main_tags │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── mainline │ └── tasks │ │ └── main.yml ├── mariadb │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ ├── post-migration.yml │ │ └── pre-migration.yml ├── media_server │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── mongodb │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── main2.yml ├── motd │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── config.json.j2 ├── mount_templates │ └── tasks │ │ └── main.yml ├── netdata │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ └── settings.yml ├── nginx │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── main2.yml ├── node_exporter │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── node_exporter.service.j2 ├── notify │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ ├── apprise.yml │ │ └── variables.yml ├── nvidia │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ ├── driver.yml │ │ ├── kernel.yml │ │ ├── nvtop.yml │ │ └── patch.yml ├── nzbget │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ └── post-install │ │ ├── main.yml │ │ ├── scripts │ │ └── main.yml │ │ └── settings │ │ └── main.yml ├── nzbhydra2 │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ └── post-install │ │ ├── main.yml │ │ ├── sabnzbd.yml │ │ └── settings.yml ├── nzbthrottle │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ └── subtasks │ │ │ └── pre-install.yml │ └── templates │ │ └── config.json.j2 ├── organizr │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── overseerr │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── main2.yml ├── permissions │ └── tasks │ │ └── main.yml ├── petio │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── plex │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ ├── pre-install │ │ └── main.yml │ │ └── preferences │ │ ├── claim_server.yml │ │ └── preferences.yml ├── plex_auth_token │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── plex_db │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── main2.yml ├── plex_extra_tasks │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── main2.yml ├── plex_fix_futures │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── main2.yml ├── portainer │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ └── setup.yml ├── postgres │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── main2.yml ├── pre_tasks │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ ├── apt.yml │ │ ├── git.yml │ │ └── variables.yml ├── prometheus │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── prometheus.yml.j2 ├── prowlarr │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ └── auth.yml ├── python │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── qbittorrent │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ │ ├── legacy.yml │ │ │ ├── post-install │ │ │ ├── main.yml │ │ │ └── settings │ │ │ │ └── main.yml │ │ │ └── pre-install │ │ │ └── main.yml │ └── templates │ │ ├── qbittorrent.service.j2 │ │ └── qbittorrent.yml.j2 ├── radarr │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ └── auth.yml ├── rclone │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ ├── 01_build_url.yml │ │ ├── 02_install_binary.yml │ │ ├── 03_import_config.yml │ │ └── 99_preinstall.yml ├── readarr │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ └── auth.yml ├── reboot │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── redis │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── main2.yml ├── remote │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ ├── cleanup.yml │ │ ├── main.yml │ │ ├── nfs.yml │ │ └── remote.yml │ └── templates │ │ ├── dropbox.j2 │ │ ├── google.j2 │ │ ├── rclone_refresh.service.j2 │ │ ├── rclone_refresh.timer.j2 │ │ └── sftp.j2 ├── restore │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── btrfs.yml │ │ ├── main.yml │ │ ├── permissions.yml │ │ ├── restore_remote.yml │ │ ├── restore_tar.yml │ │ └── variables.yml ├── rutorrent │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── plugins.ini │ ├── tasks │ │ ├── main.yml │ │ └── subtasks │ │ │ ├── post-install │ │ │ ├── main.yml │ │ │ └── settings │ │ │ │ ├── main.yml │ │ │ │ └── new_installs.yml │ │ │ └── pre-install │ │ │ ├── existing_installs.yml │ │ │ └── main.yml │ └── templates │ │ └── diskspace_conf.php.j2 ├── sabnzbd │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ └── post-install │ │ ├── main.yml │ │ ├── settings.yml │ │ └── web.yml ├── saltbox_mod │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── sandbox │ └── tasks │ │ └── main.yml ├── sanity_check │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ ├── 01_system.yml │ │ ├── 02_ansible_version.yml │ │ ├── 03_python_version.yml │ │ ├── 05_backup.yml │ │ ├── 06_logs.yml │ │ ├── 07_tmp.yml │ │ ├── 08_skipped_tags.yml │ │ ├── 09_repo.yml │ │ └── 10_cpu.yml ├── scripts │ ├── files │ │ ├── frontail_custom_preset.json │ │ ├── plex_autoscan_url.sh │ │ ├── plexsql.sh │ │ └── restart_containers.sh │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── download_torrents_from_rclone_remote.sh.j2 │ │ └── sync_torrents_to_rclone_remote.sh.j2 ├── scrutiny │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── settings │ ├── files │ │ └── settings-updater.py │ └── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ ├── copy.yml │ │ ├── finish.yml │ │ ├── migrator.yml │ │ ├── migrator │ │ ├── accounts_yml │ │ │ └── migration_01.yml │ │ ├── adv_settings_yml │ │ │ └── migration_01.yml │ │ ├── all │ │ │ └── migration_01.yml │ │ ├── backup_config_yml │ │ │ └── migration_01.yml │ │ ├── providers_yml │ │ │ └── migration_01.yml │ │ └── settings_yml │ │ │ └── migration_01.yml │ │ ├── start.yml │ │ └── updater.yml ├── shell │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ ├── misc.yml │ │ ├── shell │ │ ├── bash.yml │ │ └── zsh.yml │ │ └── z.yml ├── sonarr │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ └── auth.yml ├── sub_zero │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── subliminal │ └── tasks │ │ └── main.yml ├── system │ ├── defaults │ │ └── main.yml │ ├── files │ │ ├── etc │ │ │ ├── fuse.conf │ │ │ └── rc.local │ │ └── saltbox.conf │ ├── handlers │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ ├── apt.yml │ │ ├── cpufrequency.yml │ │ ├── locale.yml │ │ ├── logrotate.yml │ │ ├── mounts.yml │ │ ├── network.yml │ │ ├── pam_limits.yml │ │ ├── remove_cpupower.yml │ │ ├── sysctl.yml │ │ └── timezone.yml ├── tautulli │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ └── main2.yml ├── traefik │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── ban.html │ ├── tasks │ │ ├── main.yml │ │ └── subtasks │ │ │ ├── config.yml │ │ │ ├── crowdsec.yml │ │ │ └── zerossl.yml │ └── templates │ │ └── dynamic.yml.j2 ├── traefik_file_template │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── traefik_template │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── traktarr │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ └── main2.yml │ └── templates │ │ ├── config.json.j2 │ │ ├── traktarr.j2 │ │ └── traktarr.service.j2 ├── transfer │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── unionfs │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ └── subtasks │ │ │ ├── docker │ │ │ ├── containers_start.yml │ │ │ ├── containers_stop.yml │ │ │ └── daemon.yml │ │ │ ├── legacy.yml │ │ │ ├── mergerfs.yml │ │ │ ├── mount_path.yml │ │ │ └── variables.yml │ └── templates │ │ ├── mergerfs.service.j2 │ │ └── mergerfs.sh.j2 ├── unpackerr │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ └── subtasks │ │ │ └── settings.yml │ └── templates │ │ └── unpackerr.conf.j2 ├── user │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── etc │ │ │ └── skel │ │ │ ├── .bash_logout │ │ │ ├── .bashrc │ │ │ └── .profile │ └── tasks │ │ ├── main.yml │ │ └── subtasks │ │ └── user_account.yml ├── user_check │ └── tasks │ │ └── main.yml ├── webtools │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── whisparr │ ├── defaults │ │ └── main.yml │ └── tasks │ │ ├── main.yml │ │ ├── main2.yml │ │ └── subtasks │ │ └── auth.yml └── yyq │ ├── defaults │ └── main.yml │ └── tasks │ └── main.yml ├── saltbox.yml └── scripts ├── saltbox_docker_controller.py ├── saltbox_docker_controller_helper.py └── salty-linter.py /.ansible-lint: -------------------------------------------------------------------------------- 1 | exclude_paths: 2 | - .github/ 3 | - .idea/ 4 | - .vscode/ 5 | - ansible_facts.d/ 6 | - bin/ 7 | - defaults/ 8 | - filter_plugins/ 9 | - library/ 10 | - scripts/ 11 | - inventories/host_vars/ 12 | 13 | offline: false 14 | 15 | mock_modules: 16 | - find_open_port 17 | - saltbox_facts 18 | - qbittorrent_passwd 19 | - migrate_folder 20 | - cloudflare_dns_custom 21 | 22 | skip_list: 23 | - braces 24 | - git-latest 25 | - no-changed-when 26 | - ignore-errors 27 | - risky-shell-pipe 28 | - package-latest 29 | - no-handler 30 | - command-instead-of-module 31 | - command-instead-of-shell 32 | - deprecated-command-syntax 33 | - yaml[line-length] 34 | - yaml[truthy] 35 | - schema[tasks] 36 | - name[casing] 37 | - name[template] 38 | - var-naming[no-role-prefix] 39 | - schema[playbook] 40 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # 2010 2 | *.txt -crlf 3 | 4 | # 2020 5 | *.txt text eol=lf -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [saltydk] 2 | custom: ["https://www.paypal.me/saltydk", "https://patreon.com/saltydk", "https://ko-fi.com/saltydk"] 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 7 | 8 | ## Bug Report 9 | 10 | Use https://github.com/saltyorg/Saltbox/issues/new?template=bug_report.md 11 | 12 | ## Feature Request 13 | 14 | Use https://github.com/saltyorg/Saltbox/issues/new?template=feature_request.md 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/BUG_REPORT.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a report to help us improve Saltbox 4 | labels: Bug 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Screenshots** 21 | If applicable, add screenshots to help explain your problem. 22 | 23 | **Logs** 24 | Link to debug or trace log files. 25 | 26 | If issue occurs during Ansible playbook, run playbook with `-vv` to output detailed debug log. 27 | 28 | **System Information** 29 | 30 | - Operating System: [e.g. Ubuntu Server 20.04 LTS] 31 | - Linux Kernel: [e.g. 5.8] 32 | 33 | **Additional context** 34 | Add any other context about the problem here. 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea for Saltbox 4 | labels: Feature Request 5 | --- 6 | --- 7 | 8 | **Describe the problem** 9 | A clear and concise description of the problem you're looking to solve. 10 | 11 | **Describe any solutions you think might work** 12 | A clear and concise description of any solutions or features you've considered. 13 | 14 | **Additional context** 15 | Add any other context or screenshots about the feature request here. 16 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "pip" 4 | directory: "/requirements" 5 | schedule: 6 | interval: "daily" 7 | versioning-strategy: auto 8 | rebase-strategy: auto 9 | groups: 10 | ansible: 11 | applies-to: version-updates 12 | update-types: 13 | - "minor" 14 | - "patch" 15 | ansible-security: 16 | applies-to: security-updates 17 | update-types: 18 | - "minor" 19 | - "patch" 20 | - package-ecosystem: "pip" 21 | directory: "/resources/roles/dns/files" 22 | schedule: 23 | interval: "daily" 24 | versioning-strategy: auto 25 | rebase-strategy: auto 26 | groups: 27 | dns: 28 | applies-to: version-updates 29 | update-types: 30 | - "minor" 31 | - "patch" 32 | dns-security: 33 | applies-to: security-updates 34 | update-types: 35 | - "minor" 36 | - "patch" 37 | - package-ecosystem: 'github-actions' 38 | directory: '/' 39 | schedule: 40 | interval: 'weekly' 41 | groups: 42 | gha: 43 | applies-to: version-updates 44 | update-types: 45 | - "minor" 46 | - "patch" 47 | gha-security: 48 | applies-to: security-updates 49 | update-types: 50 | - "minor" 51 | - "patch" 52 | -------------------------------------------------------------------------------- /.github/labels.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Bug", 4 | "color": "#ee0701" 5 | }, 6 | { 7 | "name": "Docs", 8 | "color": "#abfcee" 9 | }, 10 | { 11 | "name": "Duplicate", 12 | "color": "#cccccc" 13 | }, 14 | { 15 | "name": "Expected Behavior", 16 | "color": "#cccccc" 17 | }, 18 | { 19 | "name": "Feature Request", 20 | "color": "#2f58b7" 21 | }, 22 | { 23 | "name": "Invalid", 24 | "color": "#e6e6e6" 25 | }, 26 | { 27 | "name": "Support", 28 | "color": "#cc317c" 29 | }, 30 | { 31 | "name": "Waiting-For-Info", 32 | "color": "#13db34" 33 | }, 34 | { 35 | "name": "Won't Fix", 36 | "color": "#ffffff" 37 | }, 38 | { 39 | "name": "Work-In-Progress", 40 | "color": "#dd3087" 41 | } 42 | ] 43 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 360 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 14 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | # Label to use when marking an issue as stale 10 | staleLabel: stale 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /.github/workflows/contributors.yml: -------------------------------------------------------------------------------- 1 | name: Add contributors 2 | on: 3 | schedule: 4 | - cron: '20 20 * * *' 5 | workflow_dispatch: 6 | 7 | jobs: 8 | add-contributors: 9 | runs-on: ubuntu-24.04 10 | steps: 11 | - uses: actions/checkout@v4 12 | 13 | - uses: BobAnkh/add-contributors@master 14 | with: 15 | REPO_NAME: 'saltyorg/Saltbox' 16 | CONTRIBUTOR: '### Contributors' 17 | COLUMN_PER_ROW: '6' 18 | ACCESS_TOKEN: ${{ secrets.GH_TOKEN }} 19 | IMG_WIDTH: '100' 20 | FONT_SIZE: '14' 21 | PATH: '/README.md' 22 | COMMIT_MESSAGE: 'docs(README): update contributors' 23 | AVATAR_SHAPE: 'square' 24 | -------------------------------------------------------------------------------- /.github/workflows/notify.yml: -------------------------------------------------------------------------------- 1 | name: Notify 2 | on: 3 | workflow_run: 4 | workflows: ["CI", "CI - Every OS"] 5 | types: 6 | - completed 7 | 8 | permissions: 9 | contents: read 10 | actions: read 11 | 12 | jobs: 13 | notify: 14 | runs-on: ubuntu-24.04 15 | if: github.event.repository.fork == false && (github.event.workflow_run.conclusion == 'success' || (github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt >= 3) || github.event.workflow_run.conclusion == 'cancelled') 16 | steps: 17 | - uses: actions/checkout@v4 18 | 19 | - name: Send notification 20 | env: 21 | GITHUB_TOKEN: ${{ github.token }} 22 | DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} 23 | WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }} 24 | run: python .github/scripts/notify.py 25 | -------------------------------------------------------------------------------- /.github/workflows/requirements.yml: -------------------------------------------------------------------------------- 1 | name: Requirements 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | paths: 8 | - requirements/requirements-saltbox.txt 9 | workflow_dispatch: 10 | 11 | jobs: 12 | requirements: 13 | runs-on: ubuntu-24.04 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v4 17 | with: 18 | path: saltbox 19 | 20 | - name: Checkout tools repo 21 | uses: actions/checkout@v4 22 | with: 23 | repository: saltyorg/sb 24 | path: sb 25 | token: ${{ secrets.GH_PAT }} 26 | 27 | - name: Copy requirements-saltbox.txt 28 | run: cp -f ./saltbox/requirements/requirements-saltbox.txt ./sb/requirements-saltbox.txt 29 | 30 | - name: Commit changes 31 | uses: EndBug/add-and-commit@v9 32 | with: 33 | author_name: Continuous Integration 34 | author_email: username@users.noreply.github.com 35 | message: 'Continuous Integration Updated requirements-saltbox.txt' 36 | add: 'requirements-saltbox.txt' 37 | cwd: './sb/' 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### MacOS ### 2 | .DS_Store 3 | 4 | ### Python ### 5 | *.pyc 6 | 7 | ### Ansible ### 8 | /backup.lock 9 | /ansible_facts.d/saltbox.fact 10 | /.ansible/* 11 | 12 | # Vars 13 | /inventories/host_vars/* 14 | !/inventories/host_vars/.gitkeep 15 | /roles/*/vars/* 16 | 17 | # Cache 18 | /cache.json 19 | 20 | # Settings 21 | /ansible.cfg 22 | /accounts.yml 23 | /adv_settings.yml 24 | /backup_config.yml 25 | /backup_excludes_list.txt 26 | /hetzner_vlan.yml 27 | /hetzner_nfs.yml 28 | /localhost.yml 29 | /providers.yml 30 | /rclone.conf 31 | /settings.yml 32 | /motd.yml 33 | 34 | ### Misc ### 35 | /.idea 36 | /*.log 37 | /*.log.* 38 | .vscode/settings.json 39 | -------------------------------------------------------------------------------- /backup.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost # noqa name[play] 3 | vars_files: 4 | - ['accounts.yml', 'defaults/accounts.yml.default'] 5 | - ['settings.yml', 'defaults/settings.yml.default'] 6 | - ['adv_settings.yml', 'defaults/adv_settings.yml.default'] 7 | - ['backup_config.yml', 'defaults/backup_config.yml.default'] 8 | roles: 9 | - { role: backup, tags: ['backup'] } 10 | - { role: backup2, tags: ['backup2'] } 11 | -------------------------------------------------------------------------------- /bin/git/hooks-wrapper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Runs all executable pre-commit-* hooks and exits after, 4 | # if any of them was not successful. 5 | # 6 | # Based on 7 | # https://github.com/ELLIOTTCABLE/Paws.js/blob/Master/Scripts/git-hooks/chain-hooks.sh 8 | # http://osdir.com/ml/git/2009-01/msg00308.html 9 | # 10 | # assumes your scripts are located at /bin/git/hooks 11 | 12 | exitcodes=() 13 | hookname=`basename $0` 14 | # our special hooks folder 15 | CUSTOM_HOOKS_DIR=$(git rev-parse --show-toplevel)/bin/git/hooks 16 | # find gits native hooks folder 17 | NATIVE_HOOKS_DIR=$(git rev-parse --show-toplevel)/.git/hooks 18 | 19 | # Run each hook, passing through STDIN and storing the exit code. 20 | # We don't want to bail at the first failure, as the user might 21 | # then bypass the hooks without knowing about additional issues. 22 | 23 | for hook in $CUSTOM_HOOKS_DIR/$(basename $0)-*; do 24 | test -x "$hook" || continue 25 | out=`$hook "$@"` 26 | exitcodes+=($?) 27 | echo "$out" 28 | done 29 | 30 | # check if there was a local hook that was moved previously 31 | if [ -f "$NATIVE_HOOKS_DIR/$hookname.local" ]; then 32 | out=`$NATIVE_HOOKS_DIR/$hookname.local "$@"` 33 | exitcodes+=($?) 34 | echo "$out" 35 | fi 36 | 37 | # If any exit code isn't 0, bail. 38 | for i in "${exitcodes[@]}"; do 39 | [ "$i" == 0 ] || exit $i 40 | done 41 | -------------------------------------------------------------------------------- /bin/git/hooks/post-merge-01-alert-to-changes: -------------------------------------------------------------------------------- 1 | echo "**************************************************" 2 | echo "* *" 3 | echo "* Please use \"sb update\" instead of git to *" 4 | echo "* update Saltbox. The update script does *" 5 | echo "* other actions such as updating settings *" 6 | echo "* that may cause problems if skipped. *" 7 | echo "* *" 8 | echo "* It would be a good idea for you to run *" 9 | echo "* sb install settings *" 10 | echo "* before you try to run any other tags *" 11 | echo "* *" 12 | echo "**************************************************" 13 | -------------------------------------------------------------------------------- /bin/git/init-hooks: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # based on http://stackoverflow.com/a/3464399/1383268 3 | # assumes that the hooks-wrapper script is located at /bin/git/hooks-wrapper 4 | 5 | HOOK_NAMES="applypatch-msg pre-applypatch post-applypatch pre-commit prepare-commit-msg commit-msg post-commit pre-rebase post-checkout post-merge pre-receive update post-receive post-update pre-auto-gc pre-push" 6 | # find git's native hooks folder 7 | REPO_ROOT_DIR=$(git rev-parse --show-toplevel) 8 | HOOKS_DIR=$(git rev-parse --show-toplevel)/.git/hooks 9 | 10 | for hook in $HOOK_NAMES; do 11 | # If the hook already exists, is a file, and is not a symlink 12 | if [ ! -h $HOOKS_DIR/$hook ] && [ -f $HOOKS_DIR/$hook ]; then 13 | mv $HOOKS_DIR/$hook $HOOKS_DIR/$hook.local 14 | fi 15 | # create the symlink, overwriting the file if it exists 16 | # probably the only way this would happen is if you're using an old version of git 17 | # -- back when the sample hooks were not executable, instead of being named ____.sample 18 | ln -s -f $REPO_ROOT_DIR/bin/git/hooks-wrapper $HOOKS_DIR/$hook 19 | done 20 | -------------------------------------------------------------------------------- /defaults/accounts.yml.default: -------------------------------------------------------------------------------- 1 | --- 2 | apprise: 3 | cloudflare: 4 | api: 5 | email: 6 | dockerhub: 7 | token: 8 | user: 9 | user: 10 | domain: testsaltbox.ml 11 | email: your@email.com 12 | name: seed 13 | pass: password1234 14 | ssh_key: 15 | -------------------------------------------------------------------------------- /defaults/adv_settings.yml.default: -------------------------------------------------------------------------------- 1 | --- 2 | dns: 3 | ipv4: yes 4 | ipv6: no 5 | proxied: no 6 | docker: 7 | json_driver: no 8 | gpu: 9 | intel: yes 10 | mounts: 11 | ipv4_only: no 12 | system: 13 | timezone: auto 14 | traefik: 15 | cert: 16 | http_validation: no 17 | zerossl: no 18 | error_pages: no 19 | hsts: no 20 | metrics: no 21 | provider: cloudflare 22 | subdomains: 23 | dash: dash 24 | metrics: metrics 25 | -------------------------------------------------------------------------------- /defaults/ansible.cfg.default: -------------------------------------------------------------------------------- 1 | [defaults] 2 | inventory = ./inventories/local 3 | roles_path = roles:resources/roles 4 | log_path = ./saltbox.log 5 | callbacks_enabled = profile_tasks 6 | interpreter_python = /srv/ansible/venv/bin/python3 7 | remote_tmp = /tmp/ansible 8 | force_color = True 9 | -------------------------------------------------------------------------------- /defaults/backup_config.yml.default: -------------------------------------------------------------------------------- 1 | --- 2 | backup: 3 | cron: 4 | cron_time: weekly 5 | local: 6 | destination: /home/{{ user.name }}/Backups/Saltbox 7 | enable: true 8 | misc: 9 | snapshot: true 10 | rclone: 11 | destination: google:/Backups/Saltbox 12 | enable: true 13 | template: google 14 | restore_service: 15 | pass: 16 | user: 17 | rsync: 18 | destination: rsync://somehost.com/Backups/Saltbox 19 | enable: false 20 | port: 22 21 | -------------------------------------------------------------------------------- /defaults/hetzner_vlan.yml.default: -------------------------------------------------------------------------------- 1 | --- 2 | hetzner_vlan: 3 | client_number: 2 4 | vlan_id: 4000 5 | -------------------------------------------------------------------------------- /defaults/providers.yml.default: -------------------------------------------------------------------------------- 1 | --- 2 | cloudns: 3 | client_id: 4 | email: 5 | password: 6 | duckdns: 7 | token: 8 | godaddy: 9 | api_key: 10 | api_secret: 11 | hetzner: 12 | api_key: 13 | linode: 14 | token: 15 | namecheap: 16 | api_key: 17 | api_user: 18 | namedotcom: 19 | api_token: 20 | server: api.name.com 21 | username: 22 | netcup: 23 | api_key: 24 | api_password: 25 | customer_number: 26 | porkbun: 27 | api_key: 28 | secret_key: 29 | powerdns: 30 | api_key: 31 | api_url: 32 | -------------------------------------------------------------------------------- /defaults/settings.yml.default: -------------------------------------------------------------------------------- 1 | --- 2 | authelia: 3 | master: yes 4 | subdomain: login 5 | downloads: /mnt/unionfs/downloads 6 | rclone: 7 | enabled: yes 8 | remotes: 9 | - remote: google 10 | settings: 11 | enable_refresh: yes 12 | mount: yes 13 | template: google 14 | union: yes 15 | upload: yes 16 | upload_from: /mnt/local/Media 17 | vfs_cache: 18 | enabled: no 19 | max_age: 504h 20 | size: 50G 21 | version: latest 22 | shell: bash 23 | transcodes: /mnt/local/transcodes 24 | -------------------------------------------------------------------------------- /filter_plugins/plex_filters.py: -------------------------------------------------------------------------------- 1 | from ansible.errors import AnsibleFilterError 2 | import os 3 | import configparser 4 | 5 | class FilterModule(object): 6 | def filters(self): 7 | return { 8 | 'check_plex_ini': self.check_plex_ini 9 | } 10 | 11 | def check_plex_ini(self, file_path, plex_name): 12 | if not os.path.exists(file_path): 13 | return {'exists': False, 'identifier': '', 'token': ''} 14 | 15 | config = configparser.ConfigParser() 16 | config.read(file_path) 17 | 18 | if plex_name not in config.sections(): 19 | return {'exists': True, 'identifier': '', 'token': ''} 20 | 21 | section = config[plex_name] 22 | return { 23 | 'exists': True, 24 | 'identifier': section.get('client_identifier', ''), 25 | 'token': section.get('token', '') 26 | } 27 | -------------------------------------------------------------------------------- /filter_plugins/rclone_filters.py: -------------------------------------------------------------------------------- 1 | def filter_rclone_remote_name(item): 2 | if 'settings' in item and 'name' in item['settings'] and item['settings']['template'] == 'nfs': 3 | return item['settings']['name'] 4 | else: 5 | remote = item['remote'] 6 | return remote.split(':')[0] if ':' in remote else remote 7 | 8 | def filter_rclone_remote_with_path(item): 9 | remote = item['remote'] 10 | return remote if ':' in remote else remote + ':' 11 | 12 | def filter_rclone_first_remote_name(rclone): 13 | remote = rclone['remotes'][0]['remote'] 14 | return remote.split(':')[0] if ':' in remote else remote 15 | 16 | def filter_rclone_first_remote_name_with_path(rclone): 17 | remote = rclone['remotes'][0]['remote'] 18 | return remote if ':' in remote else remote + ':Media' 19 | 20 | class FilterModule(object): 21 | def filters(self): 22 | return { 23 | 'filter_rclone_remote_name': filter_rclone_remote_name, 24 | 'filter_rclone_remote_with_path': filter_rclone_remote_with_path, 25 | 'filter_rclone_first_remote_name': filter_rclone_first_remote_name, 26 | 'filter_rclone_first_remote_name_with_path': filter_rclone_first_remote_name_with_path, 27 | } 28 | -------------------------------------------------------------------------------- /filter_plugins/traefik_host_rule.py: -------------------------------------------------------------------------------- 1 | def traefik_host_rule(host, host_override, fqdn_override_list): 2 | """ 3 | Ansible filter to generate Traefik host rule. 4 | 5 | Args: 6 | host (str): The base host. 7 | host_override (str): The host override. 8 | fqdn_override_list (list): The FQDN override list. 9 | 10 | Returns: 11 | str: The generated Traefik host rule. 12 | """ 13 | if host_override: 14 | return f'({host_override})' 15 | elif fqdn_override_list: 16 | formatted_fqdn_overrides = [f"Host(`{fqdn}`)" for fqdn in fqdn_override_list] 17 | fqdn_override_string = " || ".join(formatted_fqdn_overrides) 18 | return f"({fqdn_override_string})" 19 | else: 20 | return f"Host(`{host}`)" 21 | 22 | class FilterModule(object): 23 | """ Ansible filter module """ 24 | 25 | def filters(self): 26 | """ return list of filters """ 27 | return { 28 | 'traefik_host_rule': traefik_host_rule, 29 | } 30 | -------------------------------------------------------------------------------- /inventories/host_vars/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saltyorg/Saltbox/6ae1ce145392e90ee3962ec03e7142577d0d9733/inventories/host_vars/.gitkeep -------------------------------------------------------------------------------- /inventories/local: -------------------------------------------------------------------------------- 1 | [local] 2 | localhost ansible_connection=local 3 | -------------------------------------------------------------------------------- /library/qbittorrent_passwd.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | from ansible.module_utils.basic import AnsibleModule 3 | import base64 4 | import hashlib 5 | import os 6 | 7 | def qbittorrent_passwd(plain_passwd): 8 | try: 9 | ITERATIONS = 100_000 10 | SALT_SIZE = 16 11 | 12 | salt = os.urandom(SALT_SIZE) 13 | h = hashlib.pbkdf2_hmac("sha512", plain_passwd.encode(), salt, ITERATIONS) 14 | return "@ByteArray({}:{})".format(base64.b64encode(salt).decode(), base64.b64encode(h).decode()) 15 | except Exception as e: 16 | raise ValueError(f"Error generating password hash: {str(e)}") 17 | 18 | def main(): 19 | module_args = dict( 20 | password=dict(type='str', required=True, no_log=True) 21 | ) 22 | 23 | result = dict( 24 | changed=False, 25 | msg='' 26 | ) 27 | 28 | module = AnsibleModule( 29 | argument_spec=module_args, 30 | supports_check_mode=True 31 | ) 32 | 33 | try: 34 | result['msg'] = qbittorrent_passwd(module.params['password']) 35 | except ValueError as err: 36 | module.fail_json(msg=str(err)) 37 | 38 | module.exit_json(**result) 39 | 40 | if __name__ == '__main__': 41 | main() 42 | -------------------------------------------------------------------------------- /requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - community.general 4 | - community.docker 5 | - ansible.posix 6 | -------------------------------------------------------------------------------- /requirements/requirements-docker-controller.txt: -------------------------------------------------------------------------------- 1 | docker==7.1.0 2 | uvicorn==0.34.0 3 | fastapi==0.115.12 4 | requests==2.32.3 5 | -------------------------------------------------------------------------------- /requirements/requirements-lint.txt: -------------------------------------------------------------------------------- 1 | ansible==11.3.0 2 | ansible-lint==25.2.1 3 | jmespath==1.0.1 4 | -------------------------------------------------------------------------------- /requirements/requirements-notify.txt: -------------------------------------------------------------------------------- 1 | requests==2.32.3 2 | -------------------------------------------------------------------------------- /requirements/requirements-saltbox.txt: -------------------------------------------------------------------------------- 1 | ansible==11.3.0 2 | ansible-lint==25.2.1 3 | apprise==1.9.3 4 | argon2_cffi==23.1.0 5 | certbot==4.0.0 6 | dnspython==2.7.0 7 | docker==7.1.0 8 | jinja2==3.1.6 9 | jmespath==1.0.1 10 | lxml==5.3.2 11 | ndg-httpsclient==0.5.1 12 | netaddr==1.3.0 13 | passlib==1.7.4 14 | pexpect==4.9.0 15 | PyMySQL==1.1.1 16 | pyOpenSSL==25.0.0 17 | requests==2.32.3 18 | ruamel.yaml==0.18.10 19 | tld==0.13 20 | -------------------------------------------------------------------------------- /resources/roles/dns/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: DNS | Defaults # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | cloudflare_allow_nested_proxy: false 11 | cloudflare_reinstall: false 12 | cloudflare_path: "/srv/cloudflare-helper" 13 | cloudflare_venv_path: "{{ cloudflare_path }}/venv" 14 | cloudflare_python_path: "{{ cloudflare_bin_folder }}/python3" 15 | cloudflare_script_path: "{{ cloudflare_path }}/fetch_cloudflare_records.py" 16 | cloudflare_requirements_path: "{{ cloudflare_path }}/requirements.txt" 17 | cloudflare_files: 18 | - "fetch_cloudflare_records.py" 19 | - "requirements.txt" 20 | -------------------------------------------------------------------------------- /resources/roles/dns/files/requirements.txt: -------------------------------------------------------------------------------- 1 | requests==2.32.3 2 | cloudflare==4.1.0 3 | -------------------------------------------------------------------------------- /resources/roles/dns/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: DNS Role # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Cloudflare | Include DNS Tasks 11 | ansible.builtin.include_tasks: "main2.yml" 12 | vars: 13 | dns_record: "{{ _dns_role_record }}" 14 | dns_zone: "{{ _dns_role_zone }}" 15 | dns_proxy: "{{ _dns_role_proxy }}" 16 | dns_action: "{{ _dns_role_action }}" 17 | -------------------------------------------------------------------------------- /resources/roles/dns/tasks/main2.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: DNS Role # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Cloudflare | DNS Tasks 11 | ansible.builtin.include_tasks: "cloudflare/main.yml" 12 | when: cloudflare_is_enabled 13 | -------------------------------------------------------------------------------- /resources/tasks/directories/create_directories.yml: -------------------------------------------------------------------------------- 1 | ################################################################################## 2 | # Title: Saltbox: Resources | Tasks | Directories | Create Directories # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ################################################################################## 7 | # GNU General Public License v3.0 # 8 | ################################################################################## 9 | --- 10 | - name: Resources | Tasks | Directories | Create directories 11 | ansible.builtin.file: 12 | path: "{{ item }}" 13 | state: directory 14 | owner: "{{ lookup('vars', role_name + '_paths_owner', default=user.name) }}" 15 | group: "{{ lookup('vars', role_name + '_paths_group', default=user.name) }}" 16 | mode: "{{ lookup('vars', role_name + '_paths_permissions', default='0775') }}" 17 | recurse: "{{ lookup('vars', role_name + '_paths_recursive', default=false) }}" 18 | with_items: "{{ lookup('vars', role_name + '_paths_folders_list') 19 | + lookup('vars', role_name + '_paths_folders_list_custom', default=[]) }}" 20 | -------------------------------------------------------------------------------- /resources/tasks/dns/tasker.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Resources | Tasks | DNS | Tasker # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Resources | Tasks | DNS | Tasker | Import 11 | ansible.builtin.include_tasks: "tasker2.yml" 12 | when: cloudflare_records_enabled and role_dns_enabled and not skip_dns 13 | -------------------------------------------------------------------------------- /resources/tasks/instances/plex.yml: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # Title: Saltbox: Resources | Tasks | Instances | Get Plex Info # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################### 7 | # GNU General Public License v3.0 # 8 | ########################################################################### 9 | --- 10 | - name: Resources | Tasks | Instances | Get Info | Set 'plex_auth_token' default value 11 | ansible.builtin.set_fact: 12 | plex_auth_token: "not installed" 13 | 14 | - name: Resources | Tasks | Instances | Get Info | Import Plex Auth Token role 15 | ansible.builtin.include_role: 16 | name: plex_auth_token 17 | when: plex_account_is_enabled 18 | 19 | - name: Resources | Tasks | Instances | Get Info | Set 'plex_info' variable 20 | ansible.builtin.set_fact: 21 | plex_info: "{{ plex_info | default({}) | combine({plex_name: {'name': plex_name, 'url': plex_web_url, 'token': plex_auth_token}}) }}" 22 | -------------------------------------------------------------------------------- /roles/asshama/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: HTTP Anidb Metadata Agent (HAMA) & # 3 | # Absolute Series Scanner (ASS) # 4 | # Author(s): maximuskowalski, salty # 5 | # URL: https://github.com/saltyorg/Saltbox # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | --- 11 | - name: Gather list of running Docker containers 12 | ansible.builtin.shell: "docker ps --format '{{ '{{' }} .Names{{ '}}' }}' | xargs echo -n" 13 | register: docker_running_containers 14 | ignore_errors: true 15 | 16 | - name: Convert to list 17 | ansible.builtin.set_fact: 18 | docker_running_containers: "{{ (docker_running_containers.stdout).split() }}" 19 | 20 | - name: Loop tasks 21 | ansible.builtin.include_tasks: subtasks/loop.yml 22 | loop: "{{ plex_instances }}" 23 | loop_control: 24 | loop_var: plex_instance 25 | vars: 26 | plex_name: "{{ plex_instance }}" 27 | -------------------------------------------------------------------------------- /roles/authelia/tasks/subtasks/auth_backend.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Authelia | Authentication Backend Task # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | - name: Auth | Import File Backend Task 11 | ansible.builtin.import_tasks: "subtasks/file_backend.yml" 12 | when: (authelia_authentication_backend == 'file') 13 | 14 | - name: Auth | Import LDAP Backend Task 15 | ansible.builtin.import_tasks: "subtasks/ldap_backend.yml" 16 | when: (authelia_authentication_backend == 'ldap') 17 | -------------------------------------------------------------------------------- /roles/authelia/templates/users_database.yml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | ############################################################### 3 | # Users Database # 4 | ############################################################### 5 | 6 | # This file can be used if you do not have an LDAP set up. 7 | 8 | # List of users 9 | users: 10 | {{ user.name }}: 11 | disabled: false 12 | displayname: "{{ user.name }}" 13 | password: "{{ authelia_password.stdout }}" 14 | email: {{ user.email }} 15 | groups: 16 | - admins 17 | ... -------------------------------------------------------------------------------- /roles/authentik_worker/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Authentik Worker Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Remove existing Docker container 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 12 | 13 | - name: Create Docker container 14 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 15 | -------------------------------------------------------------------------------- /roles/autobrr/templates/config.toml.j2: -------------------------------------------------------------------------------- 1 | # config.toml 2 | 3 | # Hostname / IP 4 | # 5 | # Default: "localhost" 6 | # 7 | host = "0.0.0.0" 8 | 9 | # Port 10 | # 11 | # Default: 7474 12 | # 13 | port = 7474 14 | 15 | # Base url 16 | # Set custom baseUrl eg /autobrr/ to serve in subdirectory. 17 | # Not needed for subdomain, or by accessing with the :port directly. 18 | # 19 | # Optional 20 | # 21 | #baseUrl = "/autobrr/" 22 | 23 | # autobrr logs file 24 | # If not defined, logs to stdout 25 | # 26 | # Optional 27 | # 28 | logPath = "log/autobrr.log" 29 | 30 | # Log level 31 | # 32 | # Default: "DEBUG" 33 | # 34 | # Options: "ERROR", "DEBUG", "INFO", "WARN", "TRACE" 35 | # 36 | logLevel = "INFO" 37 | 38 | # Session secret 39 | # Can be generated by running: head /dev/urandom | tr -dc A-Za-z0-9 | head -c16 40 | sessionSecret = "{{ autobrr_secret.stdout }}" 41 | -------------------------------------------------------------------------------- /roles/autoheal/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Autoheal Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Remove existing Docker container 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 12 | 13 | - name: Create Docker container 14 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 15 | -------------------------------------------------------------------------------- /roles/autoscan/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Autoscan # 3 | # Author(s): Salty, TABLE # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Autoscan roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | autoscan_name: "{{ instance }}" 14 | with_items: "{{ autoscan_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/backup/files/backup_excludes_list.txt: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Backup Excludes List # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | 10 | ./bazarr/log/* 11 | 12 | ./cloudplow/cloudplow.log 13 | ./cloudplow/cloudplow.log.* 14 | ./cloudplow/locks/* 15 | 16 | ./drive_strm/*.log* 17 | 18 | ./lidarr/logs/* 19 | 20 | ./nvidia/* 21 | 22 | ./plex/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder/* 23 | ./plex/Library/Application Support/Plex Media Server/Cache/Transcode/* 24 | 25 | ./plex_autoscan/plex_autoscan.log 26 | ./plex_autoscan/plex_autoscan.log.* 27 | 28 | ./plex_dupefinder/activity.log 29 | ./plex_dupefinder/decisions.log 30 | 31 | ./python-plexlibrary/plexlibrary.log 32 | 33 | ./tautulli/logs/* 34 | 35 | ./radarr/logs/* 36 | 37 | ./radarr4k/logs/* 38 | 39 | ./sonarr/logs/* 40 | 41 | ./sonarr4k/logs/* 42 | -------------------------------------------------------------------------------- /roles/backup/tasks/cron.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Backup | Cron Tasks # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Get ansible-playbook binary path." 11 | ansible.builtin.shell: "which ansible-playbook" 12 | register: playbook_binary 13 | 14 | - name: "Schedule cron backup." # noqa args[module] 15 | ansible.builtin.cron: 16 | name: "Saltbox Backup" 17 | special_time: "{{ backup.cron.cron_time }}" 18 | job: > 19 | sudo PATH='/usr/bin:/bin:/usr/local/bin' env ANSIBLE_CONFIG='{{ playbook_dir }}/ansible.cfg' '{{ playbook_binary.stdout }}' 20 | {{ playbook_dir }}/backup.yml --tags backup >> '{{ playbook_dir }}/saltbox_backup.log' 2>&1 21 | state: "{{ ('set-backup' in ansible_run_tags) | ternary('present', 'absent') }}" 22 | user: "{{ user.name }}" 23 | -------------------------------------------------------------------------------- /roles/backup/tasks/wipe_restore_service.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Backup | Saltbox Restore Service Cleanup # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Restore Service Cleanup | Install 'curl' 11 | ansible.builtin.apt: 12 | name: curl 13 | state: present 14 | 15 | - name: Restore Service Cleanup | Set variables 16 | ansible.builtin.set_fact: 17 | restore_service_username: "{{ backup.restore_service.user | hash('sha1') }}" 18 | 19 | - name: Restore Service Cleanup | Delete Restore Service Files 20 | ansible.builtin.shell: "curl -X POST 'https://crs.saltbox.dev/delete/{{ restore_service_username }}'" 21 | register: restore_service_delete 22 | 23 | - name: Restore Service Cleanup | Print Output 24 | ansible.builtin.debug: 25 | var: restore_service_delete.stdout 26 | -------------------------------------------------------------------------------- /roles/backup2/files/backup_excludes_list.txt: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Backup Excludes List # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | 10 | ./bazarr/log/* 11 | 12 | ./cloudplow/cloudplow.log 13 | ./cloudplow/cloudplow.log.* 14 | ./cloudplow/locks/* 15 | 16 | ./drive_strm/*.log* 17 | 18 | ./lidarr/logs/* 19 | 20 | ./nvidia/* 21 | 22 | ./plex/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder/* 23 | ./plex/Library/Application Support/Plex Media Server/Cache/Transcode/* 24 | 25 | ./plex_autoscan/plex_autoscan.log 26 | ./plex_autoscan/plex_autoscan.log.* 27 | 28 | ./plex_dupefinder/activity.log 29 | ./plex_dupefinder/decisions.log 30 | 31 | ./python-plexlibrary/plexlibrary.log 32 | 33 | ./tautulli/logs/* 34 | 35 | ./radarr/logs/* 36 | 37 | ./radarr4k/logs/* 38 | 39 | ./sonarr/logs/* 40 | 41 | ./sonarr4k/logs/* 42 | -------------------------------------------------------------------------------- /roles/bazarr/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Bazarr Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Bazarr roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | bazarr_name: "{{ instance }}" 14 | with_items: "{{ bazarr_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/bazarr/tasks/main2.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Bazarr # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Add DNS record 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/dns/tasker.yml" 12 | vars: 13 | dns_record: "{{ lookup('vars', role_name + '_dns_record') }}" 14 | dns_zone: "{{ lookup('vars', role_name + '_dns_zone') }}" 15 | dns_proxy: "{{ lookup('vars', role_name + '_dns_proxy') }}" 16 | 17 | - name: Remove existing Docker container 18 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 19 | 20 | - name: Create directories 21 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 22 | 23 | - name: Create Docker container 24 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 25 | -------------------------------------------------------------------------------- /roles/btop/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: btop | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | btop_releases_url: "{{ svm }}https://api.github.com/repos/aristocratos/btop/releases/latest" 11 | 12 | btop_releases_download_url: https://github.com/aristocratos/btop/releases/download 13 | 14 | btop_release_lookup_command: | 15 | curl -s {{ btop_releases_url }} \ 16 | | jq -r ".assets[] | select(.name | test(\"btop-x86_64-linux-musl.tbz\")) \ 17 | | .browser_download_url" 18 | 19 | btop_version_lock: false 20 | btop_version_lock_url: https://github.com/aristocratos/btop/releases/download/v1.2.12/btop-x86_64-linux-musl.tbz 21 | -------------------------------------------------------------------------------- /roles/cadvisor/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: cAdvisor Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | ######################################################################### 6 | # GNU General Public License v3.0 # 7 | ######################################################################### 8 | --- 9 | - name: Add DNS record 10 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/dns/tasker.yml" 11 | vars: 12 | dns_record: "{{ lookup('vars', role_name + '_dns_record') }}" 13 | dns_zone: "{{ lookup('vars', role_name + '_dns_zone') }}" 14 | dns_proxy: "{{ lookup('vars', role_name + '_dns_proxy') }}" 15 | 16 | - name: Remove existing Docker container 17 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 18 | 19 | - name: Create Docker container 20 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 21 | -------------------------------------------------------------------------------- /roles/cloudflare/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Cloudflare Role # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Variables Task 11 | ansible.builtin.import_tasks: "subtasks/variables.yml" 12 | 13 | - name: Saltbox Subdomains Task 14 | ansible.builtin.import_tasks: "subtasks/subdomains.yml" 15 | when: (saltbox_type | length > 0) and not skip_dns 16 | 17 | - name: Purge Cache Task 18 | ansible.builtin.import_tasks: "subtasks/purge_cache.yml" 19 | 20 | - name: Configuration Rules Task 21 | ansible.builtin.import_tasks: "subtasks/configuration_rules.yml" 22 | -------------------------------------------------------------------------------- /roles/cloudflare/tasks/subtasks/purge_cache.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Cloudflare | Purge Cache Task # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Purge Cache | Purge Cloudflare Cache for '{{ fld.stdout }}' 11 | ansible.builtin.uri: 12 | url: 'https://api.cloudflare.com/client/v4/zones/{{ cloudflare_zone }}/purge_cache' 13 | method: 'POST' 14 | headers: 15 | X-Auth-Email: '{{ cloudflare.email }}' 16 | X-Auth-Key: '{{ cloudflare.api }}' 17 | body_format: json 18 | body: { purge_everything: true } 19 | status_code: 200 20 | register: cf_purge 21 | 22 | - name: Purge Cache | Print Result of Cloudflare Cache Purge 23 | ansible.builtin.debug: 24 | msg: "{{ ((cf_purge.json.success is defined) and (cf_purge.json.success)) 25 | | ternary('Successfully', 'Unsuccessfully') }} 26 | purged Cloudflare cache for '{{ fld.stdout }}'" 27 | -------------------------------------------------------------------------------- /roles/cloudflare/tasks/subtasks/subdomains.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Cloudflare | Subdomains Task # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | ## Add 'saltbox_type' subdomain 11 | - name: "Cloudflare | Subdomains | Add '{{ saltbox_type }}' subdomain to '{{ fld.stdout }}'" 12 | ansible.builtin.import_tasks: "subdomains/add_subdomain.yml" 13 | 14 | ## Remove 'saltbox' subdomain for Mediabox/Feederbox setups. 15 | - name: "Cloudflare | Subdomains | Remove 'saltbox' subdomain from '{{ fld.stdout }}'" 16 | ansible.builtin.import_tasks: "subdomains/remove_subdomain.yml" 17 | when: saltbox_type is regex('mediabox|feederbox') 18 | -------------------------------------------------------------------------------- /roles/cloudflare/tasks/subtasks/subdomains/remove_subdomain.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Cloudflare | Subdomains | Remove Subdomain # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Subdomains | Remove Subdomain | Cloudflare: Remove 'saltbox' A record from '{{ fld.stdout }}'" 11 | community.general.cloudflare_dns: 12 | account_api_token: "{{ cloudflare.api }}" 13 | account_email: "{{ cloudflare.email }}" 14 | zone: "{{ fld.stdout }}" 15 | state: absent 16 | type: A 17 | record: "saltbox" 18 | when: dns.ipv4 19 | 20 | - name: "Subdomains | Remove Subdomain | Cloudflare: Remove 'saltbox' AAAA record from '{{ fld.stdout }}'" 21 | community.general.cloudflare_dns: 22 | account_api_token: "{{ cloudflare.api }}" 23 | account_email: "{{ cloudflare.email }}" 24 | zone: "{{ fld.stdout }}" 25 | state: absent 26 | type: AAAA 27 | record: "saltbox" 28 | when: dns.ipv6 29 | -------------------------------------------------------------------------------- /roles/cloudplow/tasks/subtasks/disable.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Cloudplow | Disable Task # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Delete Service 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/systemd/delete_service.yml" 12 | vars: 13 | _service_name: "{{ cloudplow_service_name }}" 14 | -------------------------------------------------------------------------------- /roles/cloudplow/templates/cloudplow.service.j2: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/{{ cloudplow_service_name }}.service 2 | ######################################################################### 3 | # Title: Saltbox: Cloudplow Service # 4 | # Author(s): l3uddz, desimaniac, salty # 5 | # URL: https://github.com/saltyorg/Saltbox # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | 11 | [Unit] 12 | Description=Cloudplow 13 | After=network-online.target 14 | 15 | [Service] 16 | User={{ user.name }} 17 | Group={{ user.name }} 18 | Type=simple 19 | Environment=LC_ALL=C.UTF-8 20 | Environment=LANG=C.UTF-8 21 | WorkingDirectory={{ cloudplow_path }}/ 22 | ExecStart={{ cloudplow_python_path }} {{ cloudplow_script_path }} run --loglevel=INFO 23 | ExecStopPost=/bin/rm -rf {{ cloudplow_path }}/locks 24 | Restart=always 25 | RestartSec=10 26 | 27 | [Install] 28 | WantedBy=default.target 29 | -------------------------------------------------------------------------------- /roles/cloudplow/templates/cloudplow.sh.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd {{ cloudplow_path }} 3 | {{ cloudplow_python_path }} {{ cloudplow_script_path }} "$@" 4 | -------------------------------------------------------------------------------- /roles/common/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Common # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | nano_syntax_highlighting_enabled: true 11 | common_create_media_subfolders: true 12 | -------------------------------------------------------------------------------- /roles/common/files/localhost.yml: -------------------------------------------------------------------------------- 1 | # Instructions on how to utilize this file can be found here https://docs.saltbox.dev/saltbox/inventory/ 2 | -------------------------------------------------------------------------------- /roles/common/files/pip.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | disable-pip-version-check = true 3 | no-cache-dir = false 4 | -------------------------------------------------------------------------------- /roles/crowdsec/templates/acquis.yaml.j2: -------------------------------------------------------------------------------- 1 | filenames: 2 | - /var/log/auth.log 3 | labels: 4 | type: syslog 5 | --- 6 | filenames: 7 | - /var/log/syslog 8 | - /var/log/kern.log 9 | labels: 10 | type: syslog 11 | --- 12 | filenames: 13 | - /opt/traefik/*.log 14 | labels: 15 | type: traefik 16 | --- 17 | -------------------------------------------------------------------------------- /roles/crowdsec/templates/saltbox-ip-whitelist.yml.j2: -------------------------------------------------------------------------------- 1 | name: saltbox/ip-whitelist 2 | description: "Whitelist events from my ip addresses" 3 | whitelist: 4 | reason: "my ip ranges" 5 | {% if crowdsec_whitelisted_ips | length > 0 %} 6 | ip: 7 | {% for item in crowdsec_whitelisted_ips %} 8 | - "{{ item }}" 9 | {% endfor %} 10 | {% endif %} 11 | {% if crowdsec_whitelisted_cidrs | length > 0 %} 12 | cidr: 13 | {% for item in crowdsec_whitelisted_cidrs %} 14 | - "{{ item }}" 15 | {% endfor %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /roles/crowdsec/templates/saltbox.yml.j2: -------------------------------------------------------------------------------- 1 | name: saltbox/traefik-router-allowlist 2 | description: "Allowlist events from specific Traefik routers" 3 | filter: "evt.Meta.service == 'http' && evt.Meta.log_type in ['http_access-log', 'http_error-log']" 4 | whitelist: 5 | reason: "Traefik Router Allowlist" 6 | expression: 7 | {% for item in crowdsec_whitelisted_routers %} 8 | - evt.Meta.traefik_router_name == '{{ item }}' 9 | {% endfor %} 10 | -------------------------------------------------------------------------------- /roles/ctop/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: ctop | Default Variables # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | ctop_download_url_lookup_command: | 11 | curl -s {{ svm }}https://api.github.com/repos/bcicen/ctop/releases/latest \ 12 | | jq -r ".assets[] | select(.name | test(\"linux-amd64\")) | .browser_download_url" 13 | ctop_download_url_backup: https://github.com/bcicen/ctop/releases/download/v0.7.3/ctop-0.7.3-linux-amd64 14 | 15 | ctop_binary_path: /usr/local/bin/ctop 16 | 17 | ctop_binary_version_lookup_command: | 18 | {{ ctop_binary_path }} -v \ 19 | | head -n 1 | awk '{ print $3 }' | sed 's/,$//' 20 | -------------------------------------------------------------------------------- /roles/custom/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Custom | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | custom_apt: [] 11 | 12 | custom_deb: [] 13 | 14 | custom_pip: [] 15 | -------------------------------------------------------------------------------- /roles/custom/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Custom # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | - name: Custom | Update apt cache 11 | ansible.builtin.apt: 12 | update_cache: true 13 | 14 | - name: Custom | Install custom apt packages 15 | ansible.builtin.apt: 16 | state: latest 17 | name: "{{ custom_apt }}" 18 | 19 | - name: Custom | Install custom deb packages 20 | ansible.builtin.apt: 21 | state: present 22 | deb: "{{ item }}" 23 | loop: "{{ custom_deb }}" 24 | 25 | - name: Install custom pip modules 26 | ansible.builtin.shell: "pip install {{ item }}" 27 | loop: "{{ custom_pip }}" 28 | when: ansible_distribution_version is version('22.04', '<=') 29 | -------------------------------------------------------------------------------- /roles/ddns/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Cloudflare DNS Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Fail if no DNS management is enabled" 11 | ansible.builtin.fail: 12 | msg: 13 | - "IPv4 or IPv6 DNS management has to be enabled." 14 | - "Check your 'adv_settings.yml' config." 15 | when: not (dns.ipv4 or dns.ipv6) 16 | 17 | - name: "Fail if not using Cloudflare" 18 | ansible.builtin.fail: 19 | msg: 20 | - "You do not have Cloudflare enabled, this only works with Cloudflare." 21 | when: not cloudflare_is_enabled 22 | 23 | - name: Remove existing Docker container 24 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 25 | 26 | - name: Create Docker container 27 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 28 | -------------------------------------------------------------------------------- /roles/deluge/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Deluge Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Deluge roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | deluge_name: "{{ instance }}" 14 | with_items: "{{ deluge_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/deluge/tasks/subtasks/post-install/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Deluge | Post-Install Tasks # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Post-Install | Wait for config to be created 11 | ansible.builtin.wait_for: 12 | path: "{{ deluge_paths_conf }}" 13 | state: present 14 | 15 | - name: Post-Install | Wait for 10 seconds 16 | ansible.builtin.wait_for: 17 | timeout: 10 18 | 19 | - name: Post-Install | Stop container 20 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/stop_docker_container.yml" 21 | 22 | - name: Post-Install | Settings Task 23 | ansible.builtin.import_tasks: "settings/main.yml" 24 | 25 | - name: Post-Install | Start container 26 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/start_docker_container.yml" 27 | -------------------------------------------------------------------------------- /roles/deluge/tasks/subtasks/pre-install/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Deluge | Pre-Install Tasks # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Pre-Install | Get next available port within the range of '58112-58132' # noqa fqcn[action] 11 | find_open_port: 12 | low_bound: 58112 13 | high_bound: 58132 14 | protocol: both 15 | register: port_lookup_58112 16 | ignore_errors: true 17 | 18 | - name: Pre-Install | Check if existing config file exists 19 | ansible.builtin.stat: 20 | path: "{{ deluge_paths_conf }}" 21 | register: deluge_paths_conf_stat 22 | -------------------------------------------------------------------------------- /roles/diun/files/diun.yml: -------------------------------------------------------------------------------- 1 | # https://crazymax.dev/diun/ for reference 2 | 3 | db: 4 | path: diun.db 5 | 6 | watch: 7 | workers: 20 8 | schedule: "0 */6 * * *" 9 | firstCheckNotif: false 10 | compareDigest: true 11 | # healthchecks: 12 | # baseURL: https://hc-ping.com/ 13 | # uuid: 5bf66975-d4c7-4bf5-bcc8-b8d8a82ea278 14 | 15 | providers: 16 | docker: 17 | endpoint: "unix:///var/run/docker.sock" 18 | watchByDefault: false 19 | watchStopped: false 20 | 21 | # regopts: 22 | # - name: "docker.io" 23 | # selector: image 24 | # username: foo 25 | # password: bar 26 | 27 | # notif: 28 | # discord: 29 | # webhookURL: https://discordapp.com/api/webhooks/1234567890/Abcd-eFgh-iJklmNo_pqr 30 | # mentions: 31 | # - "@here" 32 | # - "@everyone" 33 | # - "<@124>" 34 | # - "<@125>" 35 | # - "<@&200>" 36 | # renderFields: true 37 | # timeout: 10s 38 | # templateBody: | 39 | # Docker tag {{ .Entry.Image }} which you subscribed to through {{ .Entry.Provider }} provider has been released. 40 | -------------------------------------------------------------------------------- /roles/diun/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Diun Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Remove existing Docker container 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 12 | 13 | - name: Create directories 14 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 15 | 16 | - name: Import default config 17 | ansible.builtin.copy: 18 | src: "diun.yml" 19 | dest: "{{ diun_paths_location }}/diun.yml" 20 | owner: "{{ user.name }}" 21 | group: "{{ user.name }}" 22 | mode: "0664" 23 | force: false 24 | 25 | - name: Create Docker container 26 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 27 | -------------------------------------------------------------------------------- /roles/docker/tasks/subtasks/dockerhub.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Docker | Docker Hub Tasks # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Docker Hub | Login" 11 | community.docker.docker_login: 12 | username: "{{ dockerhub.user }}" 13 | password: "{{ dockerhub.token }}" 14 | 15 | - name: "Docker Hub | Login" 16 | community.docker.docker_login: 17 | username: "{{ dockerhub.user }}" 18 | password: "{{ dockerhub.token }}" 19 | become: true 20 | become_user: "{{ user.name }}" 21 | -------------------------------------------------------------------------------- /roles/docker/tasks/subtasks/housekeeping.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Docker | Housekeeping Tasks # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Housekeeping | Remove all unused docker images" 11 | ansible.builtin.shell: docker image prune -af &> /dev/null || true 12 | ignore_errors: true 13 | 14 | - name: "Housekeeping | Remove all unused docker volumes" 15 | ansible.builtin.shell: docker volume prune -f &> /dev/null || true 16 | ignore_errors: true 17 | -------------------------------------------------------------------------------- /roles/docker/templates/docker-controller-helper.service.j2: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/saltbox_managed_docker_controller_helper.service 2 | ######################################################################### 3 | # Title: Saltbox: Docker Controller Helper # 4 | # Author(s): salty # 5 | # URL: https://github.com/saltyorg/Saltbox # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | 11 | [Unit] 12 | Description=Saltbox Docker Controller Helper 13 | BindsTo=docker.service 14 | Requires=saltbox_managed_docker_controller.service 15 | After=docker.service saltbox_managed_docker_controller.service 16 | 17 | [Service] 18 | ExecStart=/srv/ansible/venv/bin/python3 /srv/git/saltbox/scripts/saltbox_docker_controller_helper.py 19 | 20 | [Install] 21 | WantedBy=multi-user.target 22 | -------------------------------------------------------------------------------- /roles/docker/templates/docker-controller.service.j2: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/saltbox_managed_docker_controller.service 2 | ######################################################################### 3 | # Title: Saltbox: Docker Controller # 4 | # Author(s): salty # 5 | # URL: https://github.com/saltyorg/Saltbox # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | 11 | [Unit] 12 | Description=Saltbox Docker Controller 13 | After=docker.service 14 | 15 | [Service] 16 | Type=simple 17 | WorkingDirectory=/srv/git/saltbox/scripts 18 | ExecStart={{ docker_controller_uvicorn_path }} saltbox_docker_controller:app --host 127.0.0.1 --port 3377 19 | Restart=on-failure 20 | RestartSec=5s 21 | 22 | [Install] 23 | WantedBy=multi-user.target 24 | -------------------------------------------------------------------------------- /roles/docker/templates/docker-update-hosts.service.j2: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/saltbox_managed_docker_update_hosts.service 2 | ######################################################################### 3 | # Title: Saltbox: Docker Host DNS Resolution # 4 | # Author(s): salty # 5 | # URL: https://github.com/saltyorg/Saltbox # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | 11 | [Unit] 12 | Description=Saltbox Docker Hosts DNS Resolution Helper 13 | BindsTo=docker.service 14 | After=docker.service 15 | 16 | [Service] 17 | ExecStart=/usr/bin/python3.10 /srv/git/saltbox/roles/docker/files/docker-update-hosts.py {{ docker_update_hosts_service_runtime_max }} 18 | 19 | [Install] 20 | WantedBy=multi-user.target 21 | -------------------------------------------------------------------------------- /roles/docker/templates/override.conf.j2: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/docker.service.d/override.conf 2 | ######################################################################### 3 | # Title: Saltbox: Docker Config Override # 4 | # Author(s): l3uddz, desimaniac, salty # 5 | # URL: https://github.com/saltyorg/Saltbox # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | 11 | [Unit] 12 | After={{ docker_service_after }} 13 | Wants=saltbox_managed_docker_controller_helper.service saltbox_managed_docker_update_hosts.service 14 | 15 | [Service] 16 | ExecStartPre=modprobe -va bridge br_netfilter 17 | ExecStartPre=/bin/sleep {{ docker_service_sleep }} 18 | -------------------------------------------------------------------------------- /roles/docker_socket_proxy/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Sandbox: docker_socket_proxy # 3 | # Author(s): salty, JigSawFr # 4 | # URL: https://github.com/saltyorg/Sandbox # 5 | # URL: https://github.com/Tecnativa/docker-socket-proxy # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | --- 11 | - name: Remove legacy Docker container 12 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 13 | vars: 14 | var_prefix: "docker-socket-proxy" 15 | 16 | - name: Remove existing Docker container 17 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 18 | 19 | - name: Create Docker container 20 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 21 | -------------------------------------------------------------------------------- /roles/download_clients/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Download Clients | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | download_clients_enabled: ["qbittorrent", "sabnzbd"] 11 | -------------------------------------------------------------------------------- /roles/download_clients/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Download Clients Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Download Client roles" 11 | ansible.builtin.include_role: 12 | name: "{{ download_client_role }}" 13 | with_items: "{{ download_clients_enabled }}" 14 | loop_control: 15 | loop_var: download_client_role 16 | -------------------------------------------------------------------------------- /roles/download_indexers/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Download Indexers | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | download_indexers_enabled: ["jackett", "nzbhydra2"] 11 | -------------------------------------------------------------------------------- /roles/download_indexers/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Download Indexers Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Download Indexers roles" 11 | ansible.builtin.include_role: 12 | name: "{{ download_indexer_role }}" 13 | with_items: "{{ download_indexers_enabled }}" 14 | loop_control: 15 | loop_var: download_indexer_role 16 | -------------------------------------------------------------------------------- /roles/emby/files/dlna.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | false 5 | false 6 | false 7 | 60 8 | 1800 9 | 10 | -------------------------------------------------------------------------------- /roles/emby/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Emby Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Emby roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | emby_name: "{{ instance }}" 14 | with_items: "{{ emby_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/emby/tasks/subtasks/post-install.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Emby | Post-Install Tasks # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | - name: Post-Install | Wait 10 seconds before continuing 11 | ansible.builtin.wait_for: 12 | timeout: 10 13 | 14 | - name: Post-Install | Ensure transcodes folder has the correct permissions 15 | ansible.builtin.file: 16 | path: "{{ emby_paths_transcodes_location }}" 17 | owner: "{{ user.name }}" 18 | group: "{{ user.name }}" 19 | mode: "0775" 20 | recurse: true 21 | 22 | - name: Post-Install | Import 'dlna.xml' 23 | ansible.builtin.copy: 24 | src: "dlna.xml" 25 | dest: "{{ emby_paths_dlna_xml_location }}" 26 | owner: "{{ user.name }}" 27 | group: "{{ user.name }}" 28 | mode: "0664" 29 | force: false 30 | 31 | - name: Post-Install | Settings Tasks 32 | ansible.builtin.import_tasks: "settings.yml" 33 | -------------------------------------------------------------------------------- /roles/emby/tasks/subtasks/settings.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Emby | Settings Task # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Post-Install | Wait for config file to be created 11 | ansible.builtin.wait_for: 12 | path: "{{ emby_paths_config_location }}" 13 | state: present 14 | 15 | - name: Settings | Stop Docker container 16 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/stop_docker_container.yml" 17 | 18 | - name: Settings | Update config file 19 | community.general.xml: 20 | path: "{{ emby_paths_config_location }}" 21 | xpath: "/ServerConfiguration/{{ item.xpath }}" 22 | value: "{{ item.value }}" 23 | become: true 24 | become_user: "{{ user.name }}" 25 | loop: "{{ emby_config_settings_list }}" 26 | 27 | - name: Settings | Start Docker container 28 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/start_docker_container.yml" 29 | -------------------------------------------------------------------------------- /roles/gluetun/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Sandbox: Gluetun # 3 | # Author(s): owine # 4 | # URL: https://github.com/saltyorg/Sandbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | - name: "Execute Gluetun roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | gluetun_name: "{{ instance }}" 14 | with_items: "{{ gluetun_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/gluetun/tasks/main2.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Sandbox: Gluetun # 3 | # Author(s): owine # 4 | # URL: https://github.com/saltyorg/Sandbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | - name: Remove existing Docker container 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 12 | 13 | - name: Create directories 14 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 15 | 16 | - name: Create Docker container 17 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 18 | -------------------------------------------------------------------------------- /roles/grafana/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Grafana Role # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | ######################################################################### 6 | # GNU General Public License v3.0 # 7 | ######################################################################### 8 | --- 9 | - name: Add DNS record 10 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/dns/tasker.yml" 11 | vars: 12 | dns_record: "{{ lookup('vars', role_name + '_dns_record') }}" 13 | dns_zone: "{{ lookup('vars', role_name + '_dns_zone') }}" 14 | dns_proxy: "{{ lookup('vars', role_name + '_dns_proxy') }}" 15 | 16 | - name: Remove existing Docker container 17 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 18 | 19 | - name: Create directories 20 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 21 | 22 | - name: Create Docker container 23 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 24 | -------------------------------------------------------------------------------- /roles/hetzner/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Hetzner Role # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Hetzner Tasks" 11 | ansible.builtin.import_tasks: "subtasks/hetzner.yml" 12 | 13 | - name: "Restart Tasks" 14 | ansible.builtin.include_tasks: "subtasks/restart.yml" 15 | when: reboot_is_necessary and (not continuous_integration) 16 | -------------------------------------------------------------------------------- /roles/hetzner_nfs/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Hetzner NFS | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | hetzner_nfs_init_overwrite_client: true 11 | hetzner_nfs_init_overwrite_server: true 12 | -------------------------------------------------------------------------------- /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.{{ hetzner_nfs.server }}/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/hetzner_vlan/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Hetzner VLAN | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | hetzner_vlan_netplan_apply: true 11 | -------------------------------------------------------------------------------- /roles/iperf3/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: iperf3 | Default Variables # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | iperf3_git_repo_url: "https://github.com/esnet/iperf.git" 11 | 12 | iperf3_git_repo_dest: "/var/tmp/iperf3" 13 | 14 | iperf3_binary_build_command: | 15 | export LD_RUN_PATH=/usr/local/lib 16 | cd {{ iperf3_git_repo_dest }} 17 | ./configure 18 | make 19 | make install 20 | ldconfig 21 | rm -rf {{ iperf3_git_repo_dest }} 22 | iperf3_binary_path: /usr/local/bin/iperf3 23 | 24 | iperf3_binary_version_lookup_command: | 25 | {{ iperf3_binary_path }} --version \ 26 | | head -n 1 | awk '{ print $2 }' 27 | -------------------------------------------------------------------------------- /roles/jackett/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Jackett Role # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Add DNS record 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/dns/tasker.yml" 12 | vars: 13 | dns_record: "{{ lookup('vars', role_name + '_dns_record') }}" 14 | dns_zone: "{{ lookup('vars', role_name + '_dns_zone') }}" 15 | dns_proxy: "{{ lookup('vars', role_name + '_dns_proxy') }}" 16 | 17 | - name: Remove existing Docker container 18 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 19 | 20 | - name: Create directories 21 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 22 | 23 | - name: Create Docker container 24 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 25 | -------------------------------------------------------------------------------- /roles/jaeger/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Jaeger Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Add DNS record 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/dns/tasker.yml" 12 | vars: 13 | dns_record: "{{ lookup('vars', role_name + '_dns_record') }}" 14 | dns_zone: "{{ lookup('vars', role_name + '_dns_zone') }}" 15 | dns_proxy: "{{ lookup('vars', role_name + '_dns_proxy') }}" 16 | 17 | - name: Remove existing Docker container 18 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 19 | 20 | - name: Create directories 21 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 22 | 23 | - name: Create Docker container 24 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 25 | -------------------------------------------------------------------------------- /roles/jellyfin/files/dlna.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | false 5 | false 6 | false 7 | 60 8 | 1800 9 | 1800 10 | false 11 | false 12 | true 13 | 14 | -------------------------------------------------------------------------------- /roles/jellyfin/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Jellyfin Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Jellyfin roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | jellyfin_name: "{{ instance }}" 14 | with_items: "{{ jellyfin_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/jellyfin/tasks/subtasks/postinstall.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Jellyfin - Post-Install Tasks # 3 | # Author(s): kowalski, desimaniac, owine # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | ######################################################################### 6 | # GNU General Public License v3.0 # 7 | ######################################################################### 8 | --- 9 | - name: Post-Install | Wait 10 seconds before continuing 10 | ansible.builtin.wait_for: 11 | timeout: 10 12 | 13 | - name: Post-Install | Ensure transcodes folder has the correct permissions 14 | ansible.builtin.file: 15 | path: "{{ jellyfin_paths_transcodes_location }}" 16 | owner: "{{ user.name }}" 17 | group: "{{ user.name }}" 18 | mode: "0775" 19 | recurse: true 20 | 21 | - name: Post-Install | Ensure config folder has the correct permissions 22 | ansible.builtin.file: 23 | path: "{{ jellyfin_paths_location }}" 24 | owner: "{{ user.name }}" 25 | group: "{{ user.name }}" 26 | mode: "0775" 27 | recurse: true 28 | 29 | - name: Post-Install | Settings Tasks 30 | ansible.builtin.import_tasks: "settings.yml" 31 | when: (not jellyfin_existing_install.stat.exists) 32 | -------------------------------------------------------------------------------- /roles/kernel/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Kernel | Default Variables # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | ################################ 11 | # Cron 12 | ################################ 13 | 14 | kernel_cron_task: "PATH='/usr/sbin:/usr/bin:/sbin:/bin' purge-old-kernels -qy" 15 | 16 | ################################ 17 | # Update 18 | ################################ 19 | 20 | kernel_update_apt_package: linux-generic-hwe-20.04 21 | 22 | kernel_update_apt_fix: apt-get --fix-broken --yes install 23 | 24 | kernel_update_apt_package_22: linux-generic-hwe-22.04 25 | 26 | kernel_update_apt_package_24: linux-generic-hwe-24.04 27 | 28 | kernel_install_hwe: false 29 | -------------------------------------------------------------------------------- /roles/kernel/tasks/subtasks/01_preinstall.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Kernel | Preinstall Tasks # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Preinstall | Saltbox pre-install has started!" 11 | ansible.builtin.debug: 12 | msg: "Saltbox pre-install has started!" 13 | 14 | - name: Preinstall | Set default preinstall variables 15 | ansible.builtin.set_fact: 16 | preinstall_kernel_restart: false 17 | preinstall_user_relogin: false 18 | -------------------------------------------------------------------------------- /roles/kernel/tasks/subtasks/02_cron.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Kernel | Cron Tasks # 3 | # Author(s): l3uddz, desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Cron | Install cron 11 | ansible.builtin.apt: 12 | name: cron 13 | state: present 14 | 15 | - name: Cron | Purge old kernels on reboot 16 | ansible.builtin.cron: 17 | name: "Remove old kernels on reboot" 18 | special_time: reboot 19 | job: "{{ kernel_cron_task }}" 20 | -------------------------------------------------------------------------------- /roles/kernel/tasks/subtasks/03_update_focal.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Kernel | Focal Update Tasks # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Update | Update linux kernel 11 | ansible.builtin.apt: 12 | name: "{{ kernel_update_apt_package }}" 13 | update_cache: true 14 | state: latest 15 | register: r 16 | 17 | - name: Update | Fix broken APT install 18 | ansible.builtin.shell: "{{ kernel_update_apt_fix }}" 19 | when: r.changed 20 | 21 | - name: Update | Set 'reboot_is_necessary' variable 22 | ansible.builtin.set_fact: 23 | reboot_is_necessary: true 24 | when: r.changed 25 | 26 | - name: Update | Kernel was updated 27 | ansible.builtin.debug: 28 | msg: "Kernel was updated." 29 | when: r.changed 30 | 31 | - name: Update | Kernel was not updated 32 | ansible.builtin.debug: 33 | msg: "Kernel was not updated." 34 | when: (not r.changed) 35 | -------------------------------------------------------------------------------- /roles/kernel/tasks/subtasks/05_update_noble.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Kernel | Nobel Update Tasks # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Update | Update linux kernel 11 | ansible.builtin.apt: 12 | name: "{{ kernel_update_apt_package_24 }}" 13 | update_cache: true 14 | state: latest 15 | register: r 16 | 17 | - name: Update | Fix broken APT install 18 | ansible.builtin.shell: "{{ kernel_update_apt_fix }}" 19 | when: r.changed 20 | 21 | - name: Update | Set 'reboot_is_necessary' variable 22 | ansible.builtin.set_fact: 23 | reboot_is_necessary: true 24 | when: r.changed 25 | 26 | - name: Update | Kernel was updated 27 | ansible.builtin.debug: 28 | msg: "Kernel was updated." 29 | when: r.changed 30 | 31 | - name: Update | Kernel was not updated 32 | ansible.builtin.debug: 33 | msg: "Kernel was not updated." 34 | when: (not r.changed) 35 | -------------------------------------------------------------------------------- /roles/lidarr/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Lidarr Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Lidarr roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | lidarr_name: "{{ instance }}" 14 | with_items: "{{ lidarr_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/main_tags/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Saltbox/Mediabox/Feederbox | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | saltbox_roles: ["media_server", "download_clients", "download_indexers", "autoscan", "tautulli", "overseerr", "portainer", "organizr", "sonarr", "radarr", "lidarr", "iperf3", "glances", "btop"] 11 | mediabox_roles: ["media_server", "autoscan", "tautulli", "overseerr", "iperf3", "glances", "btop"] 12 | feederbox_roles: ["download_clients", "download_indexers", "portainer", "organizr", "sonarr", "radarr", "lidarr", "iperf3", "glances", "btop"] 13 | -------------------------------------------------------------------------------- /roles/main_tags/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Saltbox/Mediabox/Feederbox Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Saltbox roles" 11 | ansible.builtin.include_role: 12 | name: "{{ saltbox_role }}" 13 | with_items: "{{ saltbox_roles }}" 14 | loop_control: 15 | loop_var: saltbox_role 16 | when: ('saltbox' in ansible_run_tags) 17 | 18 | - name: "Execute Mediabox roles" 19 | ansible.builtin.include_role: 20 | name: "{{ mediabox_role }}" 21 | with_items: "{{ mediabox_roles }}" 22 | loop_control: 23 | loop_var: mediabox_role 24 | when: ('mediabox' in ansible_run_tags) 25 | 26 | - name: "Execute Feederbox roles" 27 | ansible.builtin.include_role: 28 | name: "{{ feederbox_role }}" 29 | with_items: "{{ feederbox_roles }}" 30 | loop_control: 31 | loop_var: feederbox_role 32 | when: ('feederbox' in ansible_run_tags) 33 | -------------------------------------------------------------------------------- /roles/mariadb/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: MariaDB Role # 3 | # Author(s): desimaniac, l3uddz, salty, owine # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute MariaDB roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | mariadb_name: "{{ instance }}" 14 | with_items: "{{ mariadb_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/mariadb/tasks/main2.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: MariaDB Role # 3 | # Author(s): desimaniac, l3uddz, salty, owine # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Remove existing Docker container 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 12 | 13 | - name: Pre-Migration tasks 14 | ansible.builtin.include_tasks: pre-migration.yml 15 | when: mariadb_name == "mariadb" 16 | 17 | - name: Create directories 18 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 19 | 20 | - name: Create Docker container 21 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 22 | 23 | - name: Post-Migration tasks 24 | ansible.builtin.include_tasks: post-migration.yml 25 | when: mariadb_name == "mariadb" 26 | 27 | - name: Sleep for 30 seconds 28 | ansible.builtin.wait_for: 29 | timeout: 30 30 | -------------------------------------------------------------------------------- /roles/mariadb/tasks/post-migration.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: MariaDB Post-Migration # 3 | # Author(s): owine, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Check for 'dump.sql' 11 | ansible.builtin.stat: 12 | path: "/opt/mariadb_legacy/dump.sql" 13 | register: dump 14 | 15 | - name: Import databases 16 | when: subfolder.stat.exists and dump.stat.exists 17 | block: 18 | - name: Wait for 60 seconds 19 | ansible.builtin.wait_for: 20 | timeout: 60 21 | 22 | - name: Restore data from dump file 23 | ansible.builtin.shell: | 24 | docker exec -i mariadb sh -c 'exec mariadb -uroot -p"$MARIADB_ROOT_PASSWORD"' < /opt/mariadb_legacy/dump.sql 25 | 26 | - name: Force MariaDB upgrade 27 | ansible.builtin.shell: | 28 | docker exec mariadb sh -c 'exec mariadb-upgrade --force -uroot -p"$MARIADB_ROOT_PASSWORD"' 29 | -------------------------------------------------------------------------------- /roles/media_server/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Media Server | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | media_servers_enabled: ["plex"] 11 | -------------------------------------------------------------------------------- /roles/media_server/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Media Server Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Media Server roles" 11 | ansible.builtin.include_role: 12 | name: "{{ media_server_role }}" 13 | with_items: "{{ media_servers_enabled }}" 14 | loop_control: 15 | loop_var: media_server_role 16 | -------------------------------------------------------------------------------- /roles/mongodb/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: MongoDB # 3 | # Author(s): Superduper09, desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | ######################################################################### 6 | # GNU General Public License v3.0 # 7 | ######################################################################### 8 | --- 9 | - name: "Execute MongoDB roles" 10 | ansible.builtin.include_tasks: main2.yml 11 | vars: 12 | mongodb_name: "{{ instance }}" 13 | with_items: "{{ mongodb_instances }}" 14 | loop_control: 15 | loop_var: instance 16 | -------------------------------------------------------------------------------- /roles/mongodb/tasks/main2.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: MongoDB # 3 | # Author(s): Superduper09, desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | ######################################################################### 6 | # GNU General Public License v3.0 # 7 | ######################################################################### 8 | --- 9 | - name: Remove existing Docker container 10 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 11 | 12 | - name: Create directories 13 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 14 | 15 | - name: Create Docker container 16 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 17 | 18 | - name: Sleep for 30 seconds 19 | ansible.builtin.wait_for: 20 | timeout: 30 21 | -------------------------------------------------------------------------------- /roles/motd/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: MOTD | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | motd_install: true 11 | -------------------------------------------------------------------------------- /roles/motd/templates/config.json.j2: -------------------------------------------------------------------------------- 1 | { 2 | "autoscan": { 3 | "api_key": "YOUR_SERVER_PASS", 4 | "url": "http://plex.{{ user.domain }}:3468" 5 | }, 6 | "disk": { 7 | "path": "/" 8 | }, 9 | "motd": { 10 | "banner_title": "{{ (saltbox_type | default('Saltbox',true)) | capitalize }}", 11 | "banner_type": "peek", 12 | "banner_font": "ivrit", 13 | "show": { 14 | "autoscan": false, 15 | "nzbget": false, 16 | "tautulli": false, 17 | "rtorrent": false 18 | }, 19 | "text_color": "LGRN", 20 | "title_color": "LBLU" 21 | }, 22 | "nzbget": { 23 | "url": "https://{{ user.name }}:{{ user.pass }}@nzbget.{{ user.domain }}" 24 | }, 25 | "tautulli": { 26 | "url": "https://tautulli.{{ user.domain }}", 27 | "api_key": "SET_YOUR_API_KEY" 28 | }, 29 | "rtorrent": { 30 | "url": "https://{{ user.name }}:{{ user.pass }}@rutorrent.{{ user.domain }}" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /roles/netdata/tasks/subtasks/settings.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Netdata | Settings Task # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | - name: Settings | Copy Default Config if it doesn't exist 11 | ansible.builtin.shell: | 12 | docker run -d --name netdata_tmp "{{ netdata_docker_image }}" 13 | docker cp netdata_tmp:/etc/netdata/. "{{ netdata_paths_config_location }}" 14 | docker rm -f netdata_tmp 15 | 16 | - name: Chown directories 17 | ansible.builtin.file: 18 | path: "{{ netdata_paths_location }}" 19 | state: directory 20 | owner: "{{ user.name }}" 21 | group: "{{ user.name }}" 22 | mode: "0775" 23 | recurse: true 24 | -------------------------------------------------------------------------------- /roles/nginx/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Nginx Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Nginx roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | nginx_name: "{{ instance }}" 14 | with_items: "{{ nginx_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/node_exporter/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Node Exporter | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | node_exporter_path: "/opt/node_exporter" 11 | 12 | node_exporter_latest_releases_url: "{{ svm }}https://api.github.com/repos/prometheus/node_exporter/releases/latest" 13 | 14 | node_exporter_latest_release_lookup_command: | 15 | curl -s {{ node_exporter_latest_releases_url }} \ 16 | | jq -r ".assets[] |select(.name | test(\"linux-amd64.tar.gz\")) \ 17 | | .browser_download_url" 18 | -------------------------------------------------------------------------------- /roles/node_exporter/templates/node_exporter.service.j2: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/node_exporter.service 2 | ######################################################################### 3 | # Title: Saltbox: Node Exporter Service # 4 | # Author(s): salty # 5 | # URL: https://github.com/saltyorg/Saltbox # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | 11 | [Unit] 12 | Description=Node Exporter 13 | After=network-online.target docker.service 14 | 15 | [Service] 16 | User={{ user.name }} 17 | Group={{ user.name }} 18 | Type=simple 19 | ExecStartPre=/bin/sleep 60 20 | ExecStart={{ node_exporter_path }}/node_exporter --collector.systemd --collector.processes --web.listen-address="172.19.0.1:9100" 21 | Restart=always 22 | RestartSec=10 23 | 24 | [Install] 25 | WantedBy=default.target 26 | -------------------------------------------------------------------------------- /roles/notify/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Notify | Default Variables # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | ################################ 11 | # Accounts 12 | ################################ 13 | 14 | apprise_account_is_enabled: "{{ (apprise is defined) and 15 | (apprise is not none) and 16 | (apprise | trim | length > 0) }}" 17 | -------------------------------------------------------------------------------- /roles/notify/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Notify Role # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Import Variables Task 11 | ansible.builtin.import_tasks: "subtasks/variables.yml" 12 | 13 | - name: Sent Notification 14 | ansible.builtin.include_tasks: "subtasks/{{ item }}.yml" 15 | loop: "{{ notification_services }}" 16 | -------------------------------------------------------------------------------- /roles/notify/tasks/subtasks/apprise.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Notify | Apprise # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Apprise | Send Notification 11 | ansible.builtin.shell: apprise -b '{{ message }}' '{{ apprise }}' 12 | become: true 13 | become_user: "{{ user.name }}" 14 | ignore_errors: true 15 | -------------------------------------------------------------------------------- /roles/notify/tasks/subtasks/variables.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Notify | Variables # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | ################################ 11 | # Notification Services List 12 | ################################ 13 | 14 | - name: Variables | Create empty 'notification_services' list 15 | ansible.builtin.set_fact: 16 | notification_services: [] 17 | 18 | - name: Variables | Build 'notification_services' list 19 | ansible.builtin.set_fact: 20 | notification_services: "{{ notification_services + [item.service] }}" 21 | when: item.enabled 22 | loop: 23 | - { service: 'apprise', enabled: '{{ apprise_account_is_enabled }}' } 24 | -------------------------------------------------------------------------------- /roles/nzbhydra2/tasks/subtasks/post-install/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: NZBHydra2 | Post-Install Tasks # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | - name: Post-Install | Check if SABnzbd config exists 11 | ansible.builtin.stat: 12 | path: "{{ sabnzbd_paths_config_location }}" 13 | register: nzbhydra2_sabnzbd_yml_stat 14 | 15 | - name: Post-Install | SABnzbd tasks 16 | ansible.builtin.import_tasks: "sabnzbd.yml" 17 | when: (not nzbhydra2_yml_stat.stat.exists) and nzbhydra2_sabnzbd_yml_stat.stat.exists 18 | 19 | - name: Post-Install | Settings Tweaks 20 | ansible.builtin.import_tasks: "settings.yml" 21 | when: (not nzbhydra2_yml_stat.stat.exists) 22 | -------------------------------------------------------------------------------- /roles/nzbhydra2/tasks/subtasks/post-install/sabnzbd.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: NZBHydra2 | SABnzbd Tasks # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | - name: Find api_key value 11 | ansible.builtin.set_fact: 12 | nzbhydra2_sabnzbd_api_lookup: "{{ lookup('file', sabnzbd_paths_config_location) | regex_search('^api_key *= *.*', multiline=True) | regex_replace('.*= *(.*)$', '\\1') }}" 13 | -------------------------------------------------------------------------------- /roles/nzbthrottle/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: NZBThrottle # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Remove existing Docker container 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 12 | 13 | - name: Create directories 14 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 15 | 16 | - name: Pre-Install Tasks 17 | ansible.builtin.include_tasks: "subtasks/pre-install.yml" 18 | 19 | - name: Create Docker container 20 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 21 | -------------------------------------------------------------------------------- /roles/nzbthrottle/templates/config.json.j2: -------------------------------------------------------------------------------- 1 | { 2 | "plex": { 3 | "url": "{{ plex_web_url }}", 4 | "interval": 60, 5 | "token": "{{ plex_auth_token | default('') }}" 6 | }, 7 | "nzbget": { 8 | "username": "{{ user.name }}", 9 | "password": "{{ user.pass }}", 10 | "url": "http://nzbget:6789", 11 | "speeds": { 12 | "1": 50000, 13 | "2": 40000, 14 | "3": 30000, 15 | "4": 20000, 16 | "5": 10000 17 | }, 18 | "max_speed": 0 19 | }, 20 | "notifications": {} 21 | } 22 | -------------------------------------------------------------------------------- /roles/overseerr/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Overseerr Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Overseerr roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | overseerr_name: "{{ instance }}" 14 | with_items: "{{ overseerr_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/overseerr/tasks/main2.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Overseerr # 3 | # Author(s): JackDallas, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Add DNS record 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/dns/tasker.yml" 12 | vars: 13 | dns_record: "{{ lookup('vars', role_name + '_dns_record') }}" 14 | dns_zone: "{{ lookup('vars', role_name + '_dns_zone') }}" 15 | dns_proxy: "{{ lookup('vars', role_name + '_dns_proxy') }}" 16 | 17 | - name: Remove existing Docker container 18 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 19 | 20 | - name: Create directories 21 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 22 | 23 | - name: Create Docker container 24 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 25 | -------------------------------------------------------------------------------- /roles/permissions/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Permissions # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Permissions | Recursively set permissions for '/mnt/local' 11 | ansible.builtin.shell: "chown -R {{ user.name }}:{{ user.name }} /mnt/local" 12 | 13 | - name: Permissions | Recursively set permissions for '/opt' 14 | ansible.builtin.shell: "chown -R {{ user.name }}:{{ user.name }} /opt" 15 | 16 | - name: Permissions | Recursively set permissions for '/home/{{ user.name }}' 17 | ansible.builtin.shell: "chown -R {{ user.name }}:{{ user.name }} /home/{{ user.name }}" 18 | -------------------------------------------------------------------------------- /roles/plex/tasks/subtasks/pre-install/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Plex | Pre-Install Tasks # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Pre-Install | Get next available port within the range of '32400-32410' # noqa fqcn[action] 11 | find_open_port: 12 | low_bound: 32400 13 | high_bound: 32410 14 | protocol: tcp 15 | register: port_lookup_32400 16 | ignore_errors: true 17 | -------------------------------------------------------------------------------- /roles/plex_auth_token/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Plex Auth Token | Default Variables # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | ################################ 11 | # API 12 | ################################ 13 | 14 | plex_auth_token_version: "1.0.0" 15 | plex_auth_token_product: "Saltbox" 16 | plex_auth_token_platform: "Linux" 17 | plex_auth_token_platform_version: "1.0.0" 18 | plex_auth_token_device: "Ubuntu {{ ansible_distribution_version }} - {{ ansible_kernel }}" 19 | plex_auth_token_device_name: "Saltbox" 20 | -------------------------------------------------------------------------------- /roles/plex_db/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Plex DB | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | plex_db_files: 11 | - "com.plexapp.plugins.library.db" 12 | - "com.plexapp.plugins.library.blobs.db" 13 | 14 | plex_db_integrity_check_only: false 15 | plex_db_failed_integrity: false 16 | plex_db_failed_optimization: false 17 | -------------------------------------------------------------------------------- /roles/plex_extra_tasks/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Plex Extra Tasks | Default Variables # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | plex_extra_tasks_hostname: "{{ plex_name 11 | if not ('container:' in lookup('vars', plex_name + '_docker_network_mode_default', default=docker_networks_name_common)) 12 | else (lookup('vars', plex_name + '_docker_network_mode_default', default=docker_networks_name_common).split(':')[1]) }}" 13 | -------------------------------------------------------------------------------- /roles/plex_extra_tasks/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Plex Extra Tasks Role # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Gather list of installed Docker containers 11 | ansible.builtin.shell: "docker ps -a --format '{{ '{{' }} .Names{{ '}}' }}' | sort | xargs echo -n" 12 | register: docker_installed_containers_list 13 | changed_when: false 14 | 15 | - name: Set 'docker_installed_containers_list' variable 16 | ansible.builtin.set_fact: 17 | docker_installed_containers_list: "{{ (docker_installed_containers_list.stdout).split() }}" 18 | 19 | - name: "Continue when Plex Docker container exists" 20 | ansible.builtin.import_tasks: "main2.yml" 21 | when: (plex_docker_container in docker_installed_containers_list) 22 | -------------------------------------------------------------------------------- /roles/plex_fix_futures/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Plex Fix Futures | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | plex_type_mapping: 11 | movie: 1 12 | show: 2 13 | season: 3 14 | episode: 4 15 | -------------------------------------------------------------------------------- /roles/plex_fix_futures/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Plex Fix Futures Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | - name: "Execute Plex DB tasks" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | plex_name: "{{ instance }}" 14 | with_items: "{{ plex_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/portainer/tasks/subtasks/setup.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Portainer Setup Tasks # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Setup | Wait 10 seconds 11 | ansible.builtin.wait_for: 12 | timeout: 10 13 | 14 | - name: Setup | Create Saltbox user 15 | ansible.builtin.uri: 16 | url: "http://{{ portainer_name }}:9000/api/users/admin/init" 17 | method: POST 18 | return_content: yes 19 | body_format: json 20 | body: {"Username": "{{ user.name }}", "Password": "{{ user.pass }}"} 21 | -------------------------------------------------------------------------------- /roles/postgres/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: PostgreSQL Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute PostgreSQL roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | postgres_name: "{{ instance }}" 14 | with_items: "{{ postgres_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/pre_tasks/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Pre-Tasks # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: APT Tasks 11 | ansible.builtin.import_tasks: "subtasks/apt.yml" 12 | 13 | - name: Git Tasks 14 | ansible.builtin.import_tasks: "subtasks/git.yml" 15 | 16 | - name: Variables Tasks 17 | ansible.builtin.include_tasks: "subtasks/variables.yml" 18 | when: (playbook_dir != "/srv/git/saltbox" and not continuous_integration) or (playbook_dir != "/home/runner/work/Saltbox/Saltbox" and continuous_integration) 19 | -------------------------------------------------------------------------------- /roles/pre_tasks/tasks/subtasks/apt.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Pre-Tasks: APT Task # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: APT | Remove APT locks 11 | ansible.builtin.file: 12 | path: "{{ item }}" 13 | state: absent 14 | loop: 15 | - "/var/lib/apt/lists/lock" 16 | - "/var/cache/apt/archives/lock" 17 | - "/var/lib/dpkg/lock" 18 | -------------------------------------------------------------------------------- /roles/prometheus/templates/prometheus.yml.j2: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 15s 3 | 4 | scrape_configs: 5 | - job_name: node 6 | static_configs: 7 | - targets: ['172.19.0.1:9100'] 8 | 9 | - job_name: cadvisor 10 | static_configs: 11 | - targets: ['cadvisor:8080'] 12 | 13 | {% if traefik.metrics %} 14 | - job_name: traefik 15 | scheme: https 16 | metrics_path: /prometheus 17 | basic_auth: 18 | username: '{{ user.name }}' 19 | password: '{{ user.pass }}' 20 | static_configs: 21 | - targets: ['{{ traefik_metrics_subdomain }}.{{ traefik_metrics_domain }}'] 22 | {% endif %} 23 | -------------------------------------------------------------------------------- /roles/python/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Python | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | python_version: "3.8" 11 | -------------------------------------------------------------------------------- /roles/qbittorrent/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: qBittorrent Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute qBittorrent roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | qbittorrent_name: "{{ instance }}" 14 | with_items: "{{ qbittorrent_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/qbittorrent/tasks/subtasks/legacy.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: qBittorrent | Legacy Tasks # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Stop '{{ qbittorrent_name }}.service' 11 | ansible.builtin.systemd_service: 12 | name: "{{ qbittorrent_name }}.service" 13 | state: stopped 14 | 15 | - name: Remove '{{ qbittorrent_name }}.service' file 16 | ansible.builtin.file: 17 | path: "/etc/systemd/system/{{ qbittorrent_name }}.service" 18 | state: absent 19 | -------------------------------------------------------------------------------- /roles/qbittorrent/templates/qbittorrent.service.j2: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/{{ qbittorrent_name }}.service 2 | ######################################################################### 3 | # Title: Saltbox: qBittorrent # 4 | # Author(s): salty # 5 | # URL: https://github.com/saltyorg/Saltbox # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | 11 | [Unit] 12 | Description={{ qbittorrent_name }} 13 | After=network-online.target docker.service 14 | Requires=network-online.target docker.service 15 | StartLimitIntervalSec=500s 16 | StartLimitBurst=5 17 | 18 | [Service] 19 | User={{ user.name }} 20 | Group={{ user.name }} 21 | Type=exec 22 | Environment="XDG_CONFIG_HOME={{ qbittorrent_paths_location }}" "XDG_DATA_HOME={{ qbittorrent_paths_location }}" "HOME={{ qbittorrent_paths_location }}" 23 | ExecStartPre=/bin/sleep 10 24 | ExecStart=/usr/bin/{{ qbittorrent_name }}-nox --webui-port={{ qbittorrent_docker_ports_8080 }} 25 | AmbientCapabilities=CAP_NET_RAW 26 | TimeoutStopSec=1800 27 | Restart=on-failure 28 | RestartSec=5s 29 | 30 | [Install] 31 | WantedBy=default.target -------------------------------------------------------------------------------- /roles/radarr/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Radarr Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Radarr roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | radarr_name: "{{ instance }}" 14 | with_items: "{{ radarr_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/rclone/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Rclone | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | rclone_latest_releases_url: "{{ svm }}https://api.github.com/repos/rclone/rclone/releases/latest" 11 | 12 | rclone_latest_release_lookup_command: | 13 | curl -s {{ rclone_latest_releases_url }} \ 14 | | jq -r ".assets[] |select(.name | test(\"linux-amd64.zip\")) \ 15 | | .browser_download_url" 16 | -------------------------------------------------------------------------------- /roles/rclone/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Rclone Role # 3 | # Author(s): l3uddz, desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Build URL Tasks 11 | ansible.builtin.import_tasks: "subtasks/01_build_url.yml" 12 | 13 | - name: Install Binary Tasks 14 | ansible.builtin.import_tasks: "subtasks/02_install_binary.yml" 15 | 16 | - name: Import Existing Config Tasks 17 | ansible.builtin.import_tasks: "subtasks/03_import_config.yml" 18 | 19 | - name: Preinstall Tasks 20 | ansible.builtin.include_tasks: "subtasks/99_preinstall.yml" 21 | when: ('preinstall' in ansible_run_tags) 22 | -------------------------------------------------------------------------------- /roles/readarr/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Readarr Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Readarr roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | readarr_name: "{{ instance }}" 14 | with_items: "{{ readarr_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/reboot/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Reboot Checker | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | saltbox_auto_reboot: false 11 | -------------------------------------------------------------------------------- /roles/reboot/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Reboot Checker Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Check if system needs to reboot 11 | ansible.builtin.stat: 12 | path: "/var/run/reboot-required" 13 | register: reboot_required_file 14 | 15 | - name: Reboot required status 16 | ansible.builtin.debug: 17 | msg: "{{ 'Reboot is required.' if reboot_required_file.stat.exists else 'Reboot is not required.' }}" 18 | 19 | - name: Reboot 20 | ansible.builtin.shell: reboot 21 | when: reboot_required_file.stat.exists and saltbox_auto_reboot 22 | -------------------------------------------------------------------------------- /roles/redis/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Redis Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Redis roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | redis_name: "{{ instance }}" 14 | with_items: "{{ redis_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/redis/tasks/main2.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Redis Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Remove existing Docker container 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 12 | 13 | - name: Reset Redis directory 14 | ansible.builtin.file: 15 | path: "{{ redis_paths_location }}" 16 | state: absent 17 | when: ('authelia-reset' in ansible_run_tags) 18 | 19 | - name: Create directories 20 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 21 | 22 | - name: Create Docker container 23 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 24 | -------------------------------------------------------------------------------- /roles/remote/templates/rclone_refresh.service.j2: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/rclone_refresh.service 2 | ######################################################################### 3 | # Title: Saltbox: Rclone VFS Refresh # 4 | # Author(s): EnorMOZ, salty # 5 | # URL: https://github.com/saltyorg/Saltbox # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | 11 | [Unit] 12 | Description=Rclone VFS Refresh - Service 13 | Requires={{ _service_file }} 14 | After={{ _service_file }} 15 | 16 | [Service] 17 | User={{ user.name }} 18 | Group={{ user.name }} 19 | Type=oneshot 20 | ExecStartPre=/bin/sleep 10 21 | ExecStart={{ rclone_vfs_refresh_command }} 22 | 23 | [Install] 24 | WantedBy=default.target -------------------------------------------------------------------------------- /roles/remote/templates/rclone_refresh.timer.j2: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/rclone_refresh.timer 2 | ######################################################################### 3 | # Title: Saltbox: Rclone VFS Refresh - Timer # 4 | # Author(s): desimaniac, Horjulf, salty # 5 | # URL: https://github.com/saltyorg/Saltbox # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | 11 | [Unit] 12 | Description=Rclone VFS Refresh - Timer 13 | 14 | [Timer] 15 | OnUnitInactiveSec={{ rclone_vfs_refresh_interval }} 16 | 17 | [Install] 18 | WantedBy=timers.target -------------------------------------------------------------------------------- /roles/restore/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Restore | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | restore_google_template: '--drive-chunk-size=128M --drive-acknowledge-abuse' 11 | restore_dropbox_template: '--dropbox-chunk-size=128M --disable-http2 --dropbox-pacer-min-sleep=85ms' 12 | restore_user_agent: "{{ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36' if backup.rclone.template != 'sftp' else '' }}" 13 | -------------------------------------------------------------------------------- /roles/restore/tasks/permissions.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Restore: Set '/opt' Ownership and Permissions Task # 3 | # Author(s): desimaniac, l3uddz # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Set '/opt' ownership recursively 11 | ansible.builtin.shell: "chown -R {{ user.name }}:{{ user.name }} /opt" 12 | 13 | - name: Set '/opt' permissions recursively 14 | ansible.builtin.shell: "chmod -R ugo+X /opt" 15 | -------------------------------------------------------------------------------- /roles/rutorrent/files/plugins.ini: -------------------------------------------------------------------------------- 1 | ;; Plugins' permissions. 2 | ;; If flag is not found in plugin section, corresponding flag from "default" section is used. 3 | ;; If flag is not found in "default" section, it is assumed to be "yes". 4 | ;; 5 | ;; For setting individual plugin permissions you must write something like that: 6 | ;; 7 | ;; [ratio] 8 | ;; enabled = yes ;; also may be "user-defined", in this case user can control plugin's state from UI 9 | ;; canChangeToolbar = yes 10 | ;; canChangeMenu = yes 11 | ;; canChangeOptions = no 12 | ;; canChangeTabs = yes 13 | ;; canChangeColumns = yes 14 | ;; canChangeStatusBar = yes 15 | ;; canChangeCategory = yes 16 | ;; canBeShutdowned = yes 17 | 18 | [default] 19 | enabled = user-defined 20 | canChangeToolbar = yes 21 | canChangeMenu = yes 22 | canChangeOptions = yes 23 | canChangeTabs = yes 24 | canChangeColumns = yes 25 | canChangeStatusBar = yes 26 | canChangeCategory = yes 27 | canBeShutdowned = yes 28 | -------------------------------------------------------------------------------- /roles/rutorrent/tasks/subtasks/pre-install/existing_installs.yml: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # Title: Saltbox: ruTorrent | Pre-Install | Settings | Existing Installs # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | #################################################################################### 7 | # GNU General Public License v3.0 # 8 | #################################################################################### 9 | --- 10 | - name: Pre-Install | Settings | Existing Installs | Update 'rtorrent.rc' config settings 11 | community.general.ini_file: 12 | path: "{{ rutorrent_paths_rtorrent_rc_location }}" 13 | section: null 14 | option: "{{ item.option }}" 15 | value: "{{ item.value }}" 16 | no_extra_spaces: false 17 | state: present 18 | owner: "{{ user.name }}" 19 | group: "{{ user.name }}" 20 | mode: "0664" 21 | loop: "{{ rutorrent_config_existing_installs_rutorrent_rc_settings_list }}" 22 | -------------------------------------------------------------------------------- /roles/rutorrent/templates/diskspace_conf.php.j2: -------------------------------------------------------------------------------- 1 | =') 19 | 20 | # For Ansible command line utilities 21 | - name: Misc | Activate argcomplete 22 | ansible.builtin.shell: "{{ shell_misc_argcomplete_command }}" 23 | -------------------------------------------------------------------------------- /roles/shell/tasks/subtasks/z.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Shell | z (jump around) # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: z | Create 'z' directories 11 | ansible.builtin.file: 12 | path: "{{ shell_z_git_repo_dest }}" 13 | state: directory 14 | owner: "{{ user.name }}" 15 | group: "{{ user.name }}" 16 | mode: "0775" 17 | recurse: true 18 | 19 | - name: z | Clone 'z' repo 20 | ansible.builtin.git: 21 | repo: "{{ shell_z_git_repo_url }}" 22 | dest: "{{ shell_z_git_repo_dest }}" 23 | clone: true 24 | version: HEAD 25 | force: true 26 | become: true 27 | become_user: "{{ user.name }}" 28 | register: shell_z_git_clone_status 29 | ignore_errors: true 30 | 31 | - name: z | 'z' Installed 32 | ansible.builtin.debug: 33 | msg: "'z (jump around)' Installed" 34 | when: (shell_z_git_clone_status is succeeded) 35 | -------------------------------------------------------------------------------- /roles/sonarr/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Sonarr Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Sonarr roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | sonarr_name: "{{ instance }}" 14 | with_items: "{{ sonarr_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/sub_zero/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Plex Plugins / Sub-Zero | Default Variables # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | ################################ 11 | # Paths 12 | ################################ 13 | 14 | plex_plugin_subzero_paths_location: "{{ plex_paths_plugins_location }}/Sub-Zero.bundle" 15 | 16 | plex_plugin_subzero_paths_info_plist_location: "{{ plex_plugin_subzero_paths_location }}/Contents/Info.plist" 17 | 18 | ################################ 19 | # Repository 20 | ################################ 21 | 22 | plex_plugin_subzero_release_url: "{{ svm }}https://api.github.com/repos/pannal/Sub-Zero.bundle/releases/latest" 23 | 24 | plex_plugin_subzero_download_url_backup: https://github.com/pannal/Sub-Zero.bundle/releases/download/2.6.5.3152/Sub-Zero.bundle-2.6.5.3152.zip 25 | -------------------------------------------------------------------------------- /roles/subliminal/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Subliminal Role # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Install Subliminal 11 | ansible.builtin.shell: "pip install git+https://github.com/Diaoul/subliminal.git@develop" 12 | ignore_errors: true 13 | 14 | - name: "Get Subliminal version" 15 | ansible.builtin.shell: "/usr/local/bin/subliminal --version | head -n 1 | awk '{ print $3 }'" 16 | register: subliminal_version 17 | ignore_errors: true 18 | 19 | - name: "Display Subliminal version" 20 | ansible.builtin.debug: 21 | msg: "Subliminal {{ subliminal_version.stdout }} installed." 22 | -------------------------------------------------------------------------------- /roles/system/files/etc/fuse.conf: -------------------------------------------------------------------------------- 1 | # /etc/fuse.conf - Configuration file for Filesystem in Userspace (FUSE) 2 | 3 | # Set the maximum number of FUSE mounts allowed to non-root users. 4 | # The default is 1000. 5 | #mount_max = 1000 6 | 7 | # Allow non-root users to specify the allow_other or allow_root mount options. 8 | user_allow_other 9 | -------------------------------------------------------------------------------- /roles/system/files/etc/rc.local: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # 3 | # rc.local 4 | # 5 | # This script is executed at the end of each multiuser runlevel. 6 | # Make sure that the script will "exit 0" on success or any other 7 | # value on error. 8 | # 9 | # In order to enable or disable this script just change the execution 10 | # bits. 11 | # 12 | # By default this script does nothing. 13 | 14 | exit 0 15 | -------------------------------------------------------------------------------- /roles/system/files/saltbox.conf: -------------------------------------------------------------------------------- 1 | $nrconf{override_rc}->{qr(^saltbox_managed)} = 0; 2 | -------------------------------------------------------------------------------- /roles/system/handlers/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: System Handler # 3 | # Author(s): desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Handers | Update 'locales' 11 | ansible.builtin.command: dpkg-reconfigure --frontend noninteractive locales 12 | -------------------------------------------------------------------------------- /roles/system/tasks/subtasks/mounts.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: System | Mount Tasks # 3 | # Author(s): l3uddz, desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Mounts | Display system mounts 11 | ansible.builtin.debug: 12 | msg: "{{ ansible_mounts }}" 13 | verbosity: 1 14 | 15 | - name: Mounts | Set opts for '/' ext4 mount 16 | ansible.posix.mount: 17 | path: / 18 | opts: defaults,nodiratime,relatime 19 | state: present 20 | fstype: ext4 21 | src: "{{ item.device }}" 22 | with_items: 23 | - "{{ ansible_mounts }}" 24 | when: (item.mount == '/') and (item.fstype == 'ext4') 25 | 26 | - name: "Mounts | Install 'fuse3'" 27 | ansible.builtin.apt: 28 | name: "fuse3" 29 | state: present 30 | 31 | - name: Mounts | Import 'fuse.conf' 32 | ansible.builtin.copy: 33 | src: etc/fuse.conf 34 | dest: /etc/fuse.conf 35 | mode: "0664" 36 | force: true 37 | -------------------------------------------------------------------------------- /roles/system/tasks/subtasks/pam_limits.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: System | PAM limits Tasks # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: PAM limits | Set PAM limits for all users. # noqa args[module] 11 | community.general.pam_limits: 12 | domain: "*" 13 | limit_type: "{{ item.limit_type }}" 14 | limit_item: "{{ item.limit_item }}" 15 | value: "{{ item.value }}" 16 | with_items: 17 | - { limit_type: '-', limit_item: 'nofile', value: "{{ pam_limit_nofile }}" } 18 | - { limit_type: 'soft', limit_item: 'memlock', value: unlimited } 19 | - { limit_type: 'hard', limit_item: 'memlock', value: unlimited } 20 | 21 | - name: PAM limits | Reload sysctl settings. 22 | ansible.builtin.shell: sysctl --system 23 | -------------------------------------------------------------------------------- /roles/system/tasks/subtasks/remove_cpupower.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: System | Remove CPU Power Tasks # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Remove CPU Power | Check if 'cpupower.service' exists 11 | ansible.builtin.stat: 12 | path: "/etc/systemd/system/cpupower.service" 13 | register: cpupower_service 14 | 15 | - name: Remove CPU Power | Stop and disable 'cpupower.service' 16 | ansible.builtin.systemd_service: 17 | name: cpupower 18 | state: stopped 19 | enabled: false 20 | daemon_reload: true 21 | ignore_errors: true 22 | when: cpupower_service.stat.exists 23 | 24 | - name: Remove CPU Power | Delete 'cpupower.service' 25 | ansible.builtin.file: 26 | path: /etc/systemd/system/cpupower.service 27 | state: absent 28 | when: cpupower_service.stat.exists 29 | -------------------------------------------------------------------------------- /roles/tautulli/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Tautulli Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Tautulli roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | tautulli_name: "{{ instance }}" 14 | with_items: "{{ tautulli_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/tautulli/tasks/main2.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Tautulli Role # 3 | # Author(s): l3uddz, desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Add DNS record 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/dns/tasker.yml" 12 | vars: 13 | dns_record: "{{ lookup('vars', role_name + '_dns_record') }}" 14 | dns_zone: "{{ lookup('vars', role_name + '_dns_zone') }}" 15 | dns_proxy: "{{ lookup('vars', role_name + '_dns_proxy') }}" 16 | 17 | - name: Remove existing Docker container 18 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 19 | 20 | - name: Create directories 21 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 22 | 23 | - name: Create Docker container 24 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 25 | -------------------------------------------------------------------------------- /roles/traktarr/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Traktarr | Default Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | traktarr_instances: ["traktarr"] 11 | -------------------------------------------------------------------------------- /roles/traktarr/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Traktarr Role # 3 | # Author(s): l3uddz, desimaniac, salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Traktarr roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | traktarr_name: "{{ instance }}" 14 | with_items: "{{ traktarr_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/traktarr/templates/traktarr.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | {{ traktarr_bin_folder }}/python3 /opt/{{ traktarr_name }}/traktarr.py "$@" 3 | -------------------------------------------------------------------------------- /roles/traktarr/templates/traktarr.service.j2: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/{{ traktarr_name }}.service 2 | 3 | [Unit] 4 | Description={{ traktarr_name }} 5 | After=network-online.target docker.service 6 | 7 | [Service] 8 | User={{ user.name }} 9 | Group={{ user.name }} 10 | Type=simple 11 | Environment=LC_ALL=C.UTF-8 12 | Environment=LANG=C.UTF-8 13 | WorkingDirectory=/opt/{{ traktarr_name }}/ 14 | TimeoutStartSec=900 15 | ExecStart={{ traktarr_bin_folder }}/python3 /opt/{{ traktarr_name }}/traktarr.py run 16 | Restart=always 17 | RestartSec=10 18 | 19 | [Install] 20 | WantedBy=default.target 21 | -------------------------------------------------------------------------------- /roles/unionfs/tasks/subtasks/legacy.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: UnionFS | Legacy Tasks # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Legacy | Check if 'mergerfs.service' exists" 11 | ansible.builtin.stat: 12 | path: "/etc/systemd/system/mergerfs.service" 13 | register: mergerfs_status 14 | 15 | - name: "Legacy | Tasks for 'mergerfs.service'" 16 | when: mergerfs_status.stat.exists 17 | block: 18 | - name: "Legacy | Stop and disable existing 'mergerfs.service'" 19 | ansible.builtin.systemd_service: 20 | name: "mergerfs.service" 21 | state: stopped 22 | enabled: false 23 | ignore_errors: true 24 | 25 | - name: "Legacy | Delete 'mergerfs.service'" 26 | ansible.builtin.file: 27 | path: "/etc/systemd/system/mergerfs.service" 28 | state: absent 29 | -------------------------------------------------------------------------------- /roles/unionfs/templates/mergerfs.service.j2: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/{{ mergerfs_service_name }} 2 | ######################################################################### 3 | # Title: Saltbox: MergerFS Mount # 4 | # Author(s): EnorMOZ, desimaniac, salty # 5 | # URL: https://github.com/saltyorg/Saltbox # 6 | # -- # 7 | ######################################################################### 8 | # GNU General Public License v3.0 # 9 | ######################################################################### 10 | 11 | [Unit] 12 | Description=MergerFS Mount 13 | After={{ mergerfs_mount_service_after }} 14 | 15 | [Service] 16 | Type=forking 17 | GuessMainPID=no 18 | ExecStart=/srv/scripts/mergerfs.sh 19 | ExecStop={{ mergerfs_mount_stop_command }} 20 | 21 | [Install] 22 | WantedBy=default.target 23 | -------------------------------------------------------------------------------- /roles/unionfs/templates/mergerfs.sh.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | {{ mergerfs_mount_start_command }} 4 | -------------------------------------------------------------------------------- /roles/unpackerr/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: unpackerr Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Remove existing Docker container 11 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml" 12 | 13 | - name: Create directories 14 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/directories/create_directories.yml" 15 | 16 | - name: Import Settings task 17 | ansible.builtin.import_tasks: "subtasks/settings.yml" 18 | 19 | - name: Create Docker container 20 | ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/create_docker_container.yml" 21 | -------------------------------------------------------------------------------- /roles/user/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: User | Default Variables # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | # User 11 | user_paths_home_location: "/home/{{ user.name }}" 12 | user_paths_home_saltbox_location: "/srv/git/saltbox" 13 | 14 | # Overrides 15 | # user_docker_group_id: 16 | # user_group_id: 17 | # user_id: 18 | 19 | # srv 20 | srv_folder: "/srv" 21 | 22 | # Saltbox 23 | saltbox_git_repo_url: "https://github.com/saltyorg/Saltbox.git" 24 | saltbox_git_repo_dest: "/srv/git/saltbox" 25 | saltbox_git_repo_branch_primary: "master" 26 | saltbox_git_repo_branch_secondary: "master" 27 | 28 | # CB Scripts 29 | sb_git_repo_url: "https://github.com/saltyorg/sb.git" 30 | sb_git_repo_dest: "/srv/git/sb" 31 | sb_git_repo_branch_primary: "master" 32 | -------------------------------------------------------------------------------- /roles/user/files/etc/skel/.bash_logout: -------------------------------------------------------------------------------- 1 | # ~/.bash_logout: executed by bash(1) when login shell exits. 2 | 3 | # when leaving the console clear the screen to increase privacy 4 | 5 | if [ "$SHLVL" = 1 ]; then 6 | [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q 7 | fi 8 | -------------------------------------------------------------------------------- /roles/user/files/etc/skel/.profile: -------------------------------------------------------------------------------- 1 | # ~/.profile: executed by the command interpreter for login shells. 2 | # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login 3 | # exists. 4 | # see /usr/share/doc/bash/examples/startup-files for examples. 5 | # the files are located in the bash-doc package. 6 | 7 | # the default umask is set in /etc/profile; for setting the umask 8 | # for ssh logins, install and configure the libpam-umask package. 9 | #umask 022 10 | 11 | # if running bash 12 | if [ -n "$BASH_VERSION" ]; then 13 | # include .bashrc if it exists 14 | if [ -f "$HOME/.bashrc" ]; then 15 | . "$HOME/.bashrc" 16 | fi 17 | fi 18 | 19 | # set PATH so it includes user's private bin if it exists 20 | if [ -d "$HOME/bin" ] ; then 21 | PATH="$HOME/bin:$PATH" 22 | fi 23 | 24 | # set PATH so it includes user's private bin if it exists 25 | if [ -d "$HOME/.local/bin" ] ; then 26 | PATH="$HOME/.local/bin:$PATH" 27 | fi 28 | -------------------------------------------------------------------------------- /roles/user/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: User Role # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: User Account 11 | ansible.builtin.import_tasks: "subtasks/user_account.yml" 12 | -------------------------------------------------------------------------------- /roles/user_check/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: User Check # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: Fail if not running as root 11 | ansible.builtin.fail: 12 | msg: "This playbook requires root privileges to run." 13 | when: lookup('env', 'USER') != "root" 14 | -------------------------------------------------------------------------------- /roles/webtools/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # Title: Saltbox: Plex Plugins / WebTools | Default Variables # 3 | # Author(s): desimaniac # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ########################################################################## 7 | # GNU General Public License v3.0 # 8 | ########################################################################## 9 | --- 10 | ################################ 11 | # Paths 12 | ################################ 13 | 14 | plex_plugin_webtools_paths_location: "{{ plex_paths_plugins_location }}/WebTools.bundle" 15 | 16 | plex_plugin_webtools_paths_version_location: "{{ plex_plugin_webtools_paths_location }}/VERSION" 17 | 18 | plex_plugin_webtools_paths_preferences_location: "{{ plex_paths_plugin_support_location }}/Preferences/com.plexapp.plugins.WebTools.xml" 19 | 20 | ################################ 21 | # Repository 22 | ################################ 23 | 24 | plex_plugin_webtools_release_url: "{{ svm }}https://api.github.com/repos/ukdtom/WebTools.bundle/releases/latest" 25 | 26 | plex_plugin_webtools_download_url_backup: https://github.com/ukdtom/WebTools.bundle/releases/download/3.0.0/WebTools.bundle.zip 27 | -------------------------------------------------------------------------------- /roles/whisparr/tasks/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: Whisparr Role # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | - name: "Execute Whisparr roles" 11 | ansible.builtin.include_tasks: main2.yml 12 | vars: 13 | whisparr_name: "{{ instance }}" 14 | with_items: "{{ whisparr_instances }}" 15 | loop_control: 16 | loop_var: instance 17 | -------------------------------------------------------------------------------- /roles/yyq/defaults/main.yml: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Title: Saltbox: yyq Role | Defaults Variables # 3 | # Author(s): salty # 4 | # URL: https://github.com/saltyorg/Saltbox # 5 | # -- # 6 | ######################################################################### 7 | # GNU General Public License v3.0 # 8 | ######################################################################### 9 | --- 10 | yyq_install_version: "4.44.1" 11 | --------------------------------------------------------------------------------