mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-12 19:48:47 +00:00
Merge latest changes from master
This commit is contained in:
commit
6975504a6d
37 changed files with 786 additions and 75 deletions
|
@ -1,34 +1,47 @@
|
|||
For :bug: bug reports, please fill out the information below plus any additional relevant information. For feature requests, feel free to clear the form.
|
||||
---
|
||||
name: Bug Report
|
||||
about: Help us to improve Ansible-NAS
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
If you're reporting an issue with execution of the Ansible-NAS playbook, please run the playbook with `-vvv`, and ideally isolate the problematic part with `--tags <ansible tag>` where possible.
|
||||
|
||||
**Short problem description**
|
||||
|
||||
Enter a couple of lines about the issue.
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Environment**
|
||||
- Ansible-NAS revision (`git rev-parse --short HEAD`):
|
||||
- Ansible version (paste the entire output of `ansible --version` on the machine you run the playbook from):
|
||||
- Ansible-NAS operating system (`cat /etc/lsb-release` on the Ansible-NAS box) - _If this is anything other than Ubuntu 18.04 help will be limited_:
|
||||
- Ansible-NAS kernel (`cat /etc/lsb-release` on the Ansible-NAS box):
|
||||
- Ansible-NAS kernel (`uname -a` on the Ansible-NAS box):
|
||||
- Ansible-NAS Python version (`python --version` on the Ansible-NAS box):
|
||||
- Ansible-NAS Docker version (`docker --version` on the Ansible-NAS box):
|
||||
- Latest Docker logs (`journalctl -u docker.service` on the Ansible-NAS box):
|
||||
- Are you running the playbook from a remote box or the Ansible-NAS box itself?
|
||||
- Vagrant version, if testing (`vagrant --version`)
|
||||
- Vagrant version, if testing (`vagrant --version`):
|
||||
- Ansible-NAS filesystems (`df -hT` on the Ansible-NAS box):
|
||||
- Mounted filesystems (`mount` on the Ansible-NAS box)
|
||||
|
||||
**all.yml Variables**
|
||||
- `docker_image_directory`:
|
||||
- `docker_home`:
|
||||
- `docker_storage_driver`:
|
||||
- `samba_shares_root`:
|
||||
|
||||
**Expected behavior**
|
||||
|
||||
What should happen?
|
||||
|
||||
**Actual behavior**
|
||||
|
||||
What actually happens?
|
||||
|
||||
**Steps to reproduce**
|
||||
|
||||
What does someone need to do to reproduce this?
|
||||
|
||||
**Playbook Output**
|
||||
Paste the output of the playbook at the problematic point. Surround it in triple backticks so that it's formatted correctly.
|
||||
|
||||
Paste the output of the playbook at the problematic point.
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
24
README.md
24
README.md
|
@ -1,6 +1,6 @@
|
|||
# Ansible NAS
|
||||
|
||||
[![Build Status](https://img.shields.io/travis/com/davestephens/ansible-nas.svg?logo=travis&style=flat-square)](https://travis-ci.com/davestephens/ansible-nas) [![Gitter chat](https://img.shields.io/gitter/room/ansible-nas/chat.svg?logo=gitter&style=flat-square)](https://gitter.im/Ansible-NAS/Chat) [![license](https://img.shields.io/github/license/DAVFoundation/api_doc.svg?style=flat-square)](https://github.com/davestephens/ansible-nas/blob/master/LICENSE) [![Ko-fi](https://img.shields.io/static/v1.svg?label=ko-fi&message=Buy%20Me%20A%20Coffee&color=orange&style=flat-square&logo=buy-me-a-coffee)](https://ko-fi.com/davestephens)
|
||||
[![Build Status](https://img.shields.io/travis/com/davestephens/ansible-nas/master?logo=travis&style=flat-square)](https://travis-ci.com/davestephens/ansible-nas) [![Gitter chat](https://img.shields.io/gitter/room/ansible-nas/chat.svg?logo=gitter&style=flat-square)](https://gitter.im/Ansible-NAS/Chat) [![license](https://img.shields.io/github/license/DAVFoundation/api_doc.svg?style=flat-square)](https://github.com/davestephens/ansible-nas/blob/master/LICENSE) [![Ko-fi](https://img.shields.io/static/v1.svg?label=ko-fi&message=Buy%20Me%20A%20Coffee&color=orange&style=flat-square&logo=buy-me-a-coffee)](https://ko-fi.com/davestephens)
|
||||
|
||||
After getting burned by broken FreeNAS updates one too many times, I figured I
|
||||
could do a much better job myself using just a stock Ubuntu install, some clever
|
||||
|
@ -12,8 +12,8 @@ Ansible config and a bunch of Docker containers.
|
|||
* Any number of Samba shares or NFS exports for you to store your stuff
|
||||
* A BitTorrent client
|
||||
* A Usenet downloader
|
||||
* Various media management tools - Sonarr, Sickchill, CouchPotato, Radarr
|
||||
* Media streaming via Plex or Emby
|
||||
* Various media management tools - Sonarr, Sickchill, CouchPotato, Radarr, Bazarr
|
||||
* Media streaming via Plex, Emby or Jellyfin
|
||||
* Music streaming with Airsonic
|
||||
* An RSS newsfeed reader - Miniflux
|
||||
* A Dropbox replacement via Nextcloud
|
||||
|
@ -25,11 +25,17 @@ Ansible config and a bunch of Docker containers.
|
|||
* A Docker host with Portainer for image and container management
|
||||
* An automatic dynamic DNS updater if you use Cloudflare to host your domain DNS
|
||||
* A Personal finance manager
|
||||
* eBook management with calibre-web
|
||||
* Content management with Joomla
|
||||
* A dual panel local file manager
|
||||
|
||||
### Docker Containers Used
|
||||
|
||||
* [Airsonic](https://airsonic.github.io/) - catalog and stream music
|
||||
* [Bazarr](https://github.com/morpheus65535/bazarr) - companion to Radarr and Sonarr for downloading subtitles
|
||||
* [Bitwarden_rs](https://github.com/dani-garcia/bitwarden_rs) - Self-Hosting port of password manager
|
||||
* [Calibre](https://hub.docker.com/r/linuxserver/calibre-web) - eBook Library
|
||||
* [Cloud Commander](https://cloudcmd.io/) - A dual panel file manager with integrated web console and text editor
|
||||
* [Cloudflare DDNS](https://hub.docker.com/r/joshuaavalon/cloudflare-ddns/) - automatically update Cloudflare with your IP address
|
||||
* [CouchPotato](https://couchpota.to/) - for downloading and managing movies
|
||||
* [Duplicati](https://www.duplicati.com/) - for backing up your stuff
|
||||
|
@ -41,8 +47,11 @@ Ansible config and a bunch of Docker containers.
|
|||
* [Grafana](https://github.com/grafana/grafana) - Dashboarding tool
|
||||
* [Guacamole](https://guacamole.apache.org/) - Web based remote desktop gateway, supports VNC, RDP and SSH
|
||||
* [Heimdall](https://heimdall.site/) - Home server dashboard
|
||||
* [Home Assistant](https://www.home-assistant.io) - Open source home automation
|
||||
* [InfluxDB](https://github.com/influxdata/influxdb) - Time series database used for stats collection
|
||||
* [Jackett](https://github.com/Jackett/Jackett) - API Support for your favorite torrent trackers
|
||||
* [Jellyfin](https://jellyfin.github.io) - The Free Software Media System
|
||||
* [Joomla](https://www.joomla.org/) - Open source content management system
|
||||
* [MiniDlna](https://sourceforge.net/projects/minidlna/) - simple media server which is fully compliant with DLNA/UPnP-AV clients
|
||||
* [Miniflux](https://miniflux.app/) - An RSS news reader
|
||||
* [Mosquitto](https://mosquitto.org) - An open source MQTT broker
|
||||
|
@ -50,6 +59,7 @@ Ansible config and a bunch of Docker containers.
|
|||
* [Netdata](https://my-netdata.io/) - An extremely comprehensive system monitoring solution
|
||||
* [Nextcloud](https://nextcloud.com/) - A self-hosted Dropbox alternative
|
||||
* [NZBget](https://nzbget.net/) - The most efficient usenet downloader
|
||||
* [openHAB](https://www.openhab.org/) - A vendor and technology agnostic open source automation software for your home
|
||||
* [Plex](https://www.plex.tv/) - Plex Media Server
|
||||
* [Portainer](https://portainer.io/) - for managing Docker and running custom images
|
||||
* [pyLoad](https://pyload.net/) - A download manager with a friendly web-interface
|
||||
|
@ -59,7 +69,7 @@ Ansible config and a bunch of Docker containers.
|
|||
* [Tautulli](http://tautulli.com/) - Monitor Your Plex Media Server
|
||||
* [Telegraf](https://github.com/influxdata/telegraf) - Metrics collection agent
|
||||
* [The Lounge](https://thelounge.chat) - Web based always-on IRC client
|
||||
* [TimeMachine](https://github.com/mbentley/docker-timemachine) - Mac backup server
|
||||
* [TimeMachine](https://github.com/awlx/samba-timemachine) - Samba-based mac backup server
|
||||
* [Traefik](https://traefik.io/) - Web proxy and SSL certificate manager
|
||||
* [Transmission](https://transmissionbt.com/) - BitTorrent client (with OpenVPN if you have a supported VPN provider)
|
||||
* [Wallabag](https://wallabag.org/) - Save and classify articles. Read them later.
|
||||
|
@ -136,7 +146,7 @@ Assuming that your Ubuntu system disk is separate from your storage (it should b
|
|||
## Requirements
|
||||
|
||||
* Ansible NAS targets the latest Ubuntu LTS release, which is currently Ubuntu
|
||||
Server 18.04 LTS.
|
||||
Server 18.04.3 LTS.
|
||||
* You can run Ansible-NAS on whatever you like, read the docs for more info. I
|
||||
use an HP Microserver.
|
||||
|
||||
|
@ -168,3 +178,7 @@ recommended extensions and task setups if you do the same.
|
|||
## Support
|
||||
|
||||
If you've enjoyed Ansible-NAS as much as I do working on it, please consider [buying me a coffee](https://ko-fi.com/davestephens) :coffee:
|
||||
|
||||
## Thanks
|
||||
|
||||
Thanks to the awesome dudes at [JetBrains](https://www.jetbrains.com/?from=Ansible-NAS) for supplying core contributors with JetBrains Open Source licenses!
|
||||
|
|
15
docs/applications/bazarr.md
Normal file
15
docs/applications/bazarr.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Bazarr subtitle downloader
|
||||
|
||||
Homepage: [https://github.com/morpheus65535/bazarr](https://github.com/morpheus65535/bazarr)
|
||||
|
||||
|
||||
Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Set `bazarr_enabled: true` in your `group_vars/all.yml` file.
|
||||
|
||||
## Specific Configuration
|
||||
|
||||
Follow the [Wiki](https://github.com/morpheus65535/bazarr/wiki) for conecting to Sonarr and Radarr.
|
26
docs/applications/calibre.md
Normal file
26
docs/applications/calibre.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Calibre(-web) eBook Library
|
||||
|
||||
Homepage: [https://github.com/janeczku/calibre-web](https://github.com/linuxserver/docker-calibre-web)
|
||||
|
||||
|
||||
Calibre-Web is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database.
|
||||
|
||||
## Usage
|
||||
|
||||
Set `calibre_enabled: true` in your `group_vars/all.yml` file.
|
||||
|
||||
## Specific Configuration
|
||||
|
||||
### Admin login
|
||||
|
||||
**Default admin login:** Username: admin Password: admin123
|
||||
|
||||
### eBook Conversion
|
||||
|
||||
If you do not need eBook conversion you can disable it to save resources by setting the `calibre_ebook_conversion` variable in `group_vars/all.yml` file to be empty.
|
||||
|
||||
- Conversion enabled: `calibre_ebook_conversion: "linuxserver/calibre-web:calibre"`
|
||||
|
||||
- Conversion disabled: `calibre_ebook_conversion: ""`
|
||||
|
||||
You can target just Calibre by appending `-t calibre` to your `ansible-playbook` command.
|
17
docs/applications/cloudcmd.md
Normal file
17
docs/applications/cloudcmd.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Cloud Commander file manager
|
||||
|
||||
Homepage: [https://cloudcmd.io/](https://cloudcmd.io/)
|
||||
|
||||
|
||||
Cloud Commander is a file manager for the web. It includes a command-line console and a text editor. Cloud Commander helps you manage your server and work with files, directories and programs in a web browser from any computer, mobile or tablet.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Set `cloudcmd_enabled: true` in your `group_vars/all.yml` file.
|
||||
|
||||
By default your the root of your Ansible-NAS box (`/`) is mounted into `/mnt/fs` within the container. If you'd like to
|
||||
change this update `cloudcmd_browse_directory` in your `group_vars/all.yml` file.
|
||||
|
||||
If you enable external access to Cloud Commander (note that this is not recommended) then ensure you configure authorisation
|
||||
within the application (F10 from the main menu).
|
|
@ -38,7 +38,7 @@ configuration directory read/write.
|
|||
Movie and TV show files are almost alway very large and pre-compressed. If you
|
||||
are using a specialized filesystem such as ZFS for bulk storage, you'll want to
|
||||
set the parameters accordingly. The [ZFS configuration
|
||||
documentation](../zfs/zfc_configuration.md) has an example of this.
|
||||
documentation](../zfs/zfs_configuration.md) has an example of this.
|
||||
|
||||
|
||||
## Naming movies and TV shows
|
||||
|
|
12
docs/applications/homeassistant.md
Normal file
12
docs/applications/homeassistant.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Home Assistant
|
||||
|
||||
Homepage: [https://www.home-assistant.io/](https://www.home-assistant.io/)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Set `homeassistant_enabled: true` in your `group_vars/all.yml` file.
|
||||
|
||||
If you want to access Home Assistant externally, don't forget to set `homeassistant_available_externally: "true"` in your `group_vars/all.yml` file.
|
||||
|
||||
The Home Assistant web interface can be found at http://ansible_nas_host_or_ip:8123.
|
11
docs/applications/homebridge.md
Normal file
11
docs/applications/homebridge.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Homebridge
|
||||
|
||||
Homepage: [https://github.com/nfarina/homebridge](https://github.com/nfarina/homebridge)
|
||||
|
||||
Homebridge is a lightweight NodeJS server you can run on your home network that emulates the iOS HomeKit API. It supports Plugins, which are community-contributed modules that provide a basic bridge from HomeKit to various 3rd-party APIs provided by manufacturers of "smart home" devices.
|
||||
|
||||
## Usage
|
||||
|
||||
Set `homebridge_enabled: true` in your `group_vars/all.yml` file.
|
||||
|
||||
The Homebridge web interface can be found at http://ansible_nas_host_or_ip:8087. The default username and password is 'admin' - change this after your first login!
|
71
docs/applications/jellyfin.md
Normal file
71
docs/applications/jellyfin.md
Normal file
|
@ -0,0 +1,71 @@
|
|||
# Jellyfin
|
||||
|
||||
Homepage: [https://jellyfin.github.io/](https://jellyfin.github.io/)
|
||||
|
||||
Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it. We welcome anyone who is interested in joining us in our quest!
|
||||
|
||||
Note that [Plex](https://www.plex.tv/), also included in Ansible-NAS, has a very
|
||||
similar functionality.
|
||||
|
||||
## Usage
|
||||
|
||||
Set `jellyfin_enabled: true` in your `group_vars/all.yml` file. There are further
|
||||
parameters you can edit such as `movies_root` and `tv_root` lower down.
|
||||
|
||||
## Specific Configuration
|
||||
|
||||
The jellyfin web interface can be found at port 8896 (http) or 8928 (https, if
|
||||
configured) of your NAS.
|
||||
|
||||
By default, Ansible-NAS gives jellyfin read/write access to the folders where your
|
||||
movies and TV shows are stored. To change this to read-only, edit the following
|
||||
lines in `all.yml`:
|
||||
|
||||
```
|
||||
jellyfin_movies_permissions: "rw"
|
||||
jellyfin_tv_permissions: "rw"
|
||||
```
|
||||
|
||||
so that they end in `ro` instead of `rw`. Note that jellyfin will not be able to
|
||||
delete files then, which might be exactly what you want. However, you will not
|
||||
have the option to store cover art in the related folders. Always leave the
|
||||
configuration directory read/write.
|
||||
|
||||
## File system considerations
|
||||
|
||||
Movie and TV show files are almost alway very large and pre-compressed. If you
|
||||
are using a specialized filesystem such as ZFS for bulk storage, you'll want to
|
||||
set the parameters accordingly. The [ZFS configuration
|
||||
documentation](../zfs/zfc_configuration.md) has an example of this.
|
||||
|
||||
|
||||
## Naming movies and TV shows
|
||||
|
||||
jellyfin is very fussy about how movies and TV shows must be named to enable
|
||||
automatic downloads of cover art and metadata. In short, movie files should
|
||||
follow how movies are listed in the [IMDb](https://www.imdb.com/), including the
|
||||
year of publication:
|
||||
|
||||
```
|
||||
movies/Bride of Frankenstein (1935).mp4
|
||||
```
|
||||
|
||||
Note the spaces. You should probably remove colons and other special characters.
|
||||
|
||||
TV shows require a folder structure with the name of the series - again if
|
||||
possible with the year of publication - followed by sub-folders for the
|
||||
individual seasons. For example, the first episode of the first season of
|
||||
the original "Doctor Who" could be stored as:
|
||||
|
||||
```
|
||||
tv/Doctor Who (1963)/Season 1/Doctor Who - s01e01.mp4
|
||||
```
|
||||
|
||||
The [TVDB](https://www.thetvdb.com/) is one source for the exact names of TV
|
||||
shows.
|
||||
|
||||
Unfortunately, there are number of special cases, especially related to split
|
||||
movies and older series. See the [movie
|
||||
naming](https://github.com/MediaBrowser/Wiki/wiki/Movie%20naming) and [TV
|
||||
naming](https://github.com/MediaBrowser/Wiki/wiki/TV-naming) guides for further
|
||||
information.
|
23
docs/applications/joomla.md
Normal file
23
docs/applications/joomla.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Joomla CMS
|
||||
|
||||
Homepage: [https://www.joomla.org/](https://www.joomla.org/)
|
||||
|
||||
Joomla! is an award-winning content management system (CMS), which enables you to build web sites and powerful online applications.
|
||||
|
||||
## Usage
|
||||
|
||||
Set `joomla_enabled: true` in your `group_vars/all.yml` file.
|
||||
|
||||
If you want to access Joomla externally, set `joomla_available_externally: "true"` in your `group_vars/all.yml` file.
|
||||
|
||||
The Joomla web interface can be found at http://ansible_nas_host_or_ip:8181.
|
||||
|
||||
## Specific Configuration
|
||||
|
||||
- Set `joomla_database_password` in your `all.yml` before installing Joomla.
|
||||
|
||||
- On first run you'll need to enter database details:
|
||||
- Host: `mysql`
|
||||
- Database: `joomla`
|
||||
- Username: `root`
|
||||
- Password: whatever you set for `joomla_database_password`.
|
15
docs/applications/openhab.md
Normal file
15
docs/applications/openhab.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
# openHAB
|
||||
|
||||
Homepage: [https://www.openhab.org/](https://www.openhab.org/)
|
||||
|
||||
OpenHab is a vendor and technology agnostic open source automation software for your home.
|
||||
It allows you to connect many different IoT-Devices (which in this case means "Intranet of Things") using custom bindings made by the community.
|
||||
|
||||
## Usage
|
||||
|
||||
Set `openhab_enabled: true` in your `group_vars/all.yml` file.
|
||||
|
||||
## Specific Configuration
|
||||
|
||||
The openHAB Webinterface is available at port 7777 (HTTP) and 7778 (HTTPS).
|
||||
Visit the webinterface and follow the setup instructions found in the [openHAB Documentation](https://www.openhab.org/docs/tutorial/1sttimesetup.html)
|
|
@ -1,14 +1,20 @@
|
|||
# Time Machine
|
||||
|
||||
Apple docs: [https://support.apple.com/en-us/HT201250](https://support.apple.com/en-us/HT201250)
|
||||
Docker image: [https://github.com/mbentley/docker-timemachine](https://github.com/mbentley/docker-timemachine)
|
||||
Docker image: [https://github.com/awlx/samba-timemachine](https://github.com/awlx/samba-timemachine)
|
||||
|
||||
Time Machine is an application that allows you to backup files from your Mac.
|
||||
|
||||
Older versions of Time Machine relied on AFP (netatalk) shares. Apple has deprecated Time Machine over AFP in favor of SMB (Samba), and current versions of Ansible-NAS use a Samba-based Time Machine share. If you are upgrading from an older version of Ansible-NAS, you will need to re-select your Time Machine back up disk by opening Time Machine Preferences and Selecting your backup disk via the "Select Disk..." option. Your Mac will find the old backups on the share and use them.
|
||||
|
||||
## Usage
|
||||
|
||||
Set `timemachine_enabled: true` in your `group_vars/all.yml` file.
|
||||
|
||||
Enabling Time Machine will result in the installation of Avahi on the NAS system (if it is not already installed) and a Time Machine service configuration file for Avahi will be added to the system (at `/etc/avahi/services/timemachine.service`) to allow for Time Machine discovery by Macs on the local network. Avahi runs on the system, rather than in a container, as the same Avahi instance can be used to announce any number of services.
|
||||
|
||||
The Samba server included in the Time Machine docker container logs to `STDOUT` and is compatible with [Docker's built-in logging infrastructure.](https://docs.docker.com/config/containers/logging/)
|
||||
|
||||
## Specific Configuration
|
||||
|
||||
<dl>
|
||||
|
@ -17,8 +23,11 @@ Set `timemachine_enabled: true` in your `group_vars/all.yml` file.
|
|||
<dt><strong>timemachine_volume_size_limit</strong></dt>
|
||||
<dd>The maximum amount of space Time Machine can use for the backups in units of MiB. Set it to 0 for no limit.</dd>
|
||||
<dt><strong>timemachine_share_name</strong></dt>
|
||||
<dd>The name of the share as it will appear in the Time Machine application. Default is 'TimeMachine'</dd>
|
||||
<dd>The name of the share as it will appear in the Time Machine application. Default is 'Data'</dd>
|
||||
<dt><strong>timemachine_password</strong></dt>
|
||||
<dd>The password used to access the share. Default is 'timemachine'</dd>
|
||||
<dt><strong>timemachine_log_level</strong></dt>
|
||||
<dd>The verbosity of the logs. 'Error' is the default.</dd>
|
||||
<dl>
|
||||
|
||||
## Upgrading from AFP to SMB-based Time Machine
|
||||
|
||||
Older versions of Time Machine included in Ansible-NAS relied on AFP (netatalk) shares. Apple has deprecated Time Machine over AFP in favor of SMB (Samba), and current versions of Ansible-NAS use a Samba-based Time Machine share. If you are upgrading from an older version of Ansible-NAS with the AFP-based Time Machine, you will need to re-select your Time Machine back up disk by opening Time Machine Preferences and Selecting your backup disk via the "Select Disk..." option. Your Mac will find the old backups on the share and use them.
|
|
@ -4,9 +4,13 @@ By default, applications can be found on the ports listed below.
|
|||
|
||||
| Application | Port | Notes |
|
||||
|-----------------|--------|-----------|
|
||||
| Couchpotato | 5050 | |
|
||||
| Airsonic | 4040 | |
|
||||
| Bazarr | 6767 | |
|
||||
| Bitwarden "hub" | 3012 | Web Not. |
|
||||
| Bitwarden | 19080 | HTTP |
|
||||
| Calibre | 8084 | HTTP |
|
||||
| Cloud Commander | 7373 | |
|
||||
| Couchpotato | 5050 | |
|
||||
| Duplicati | 8200 | |
|
||||
| Emby | 8096 | HTTP |
|
||||
| Emby | 8920 | HTTPS |
|
||||
|
@ -18,7 +22,11 @@ By default, applications can be found on the ports listed below.
|
|||
| Grafana | 3000 | |
|
||||
| Guacamole | 8090 | |
|
||||
| Heimdall | 10080 | |
|
||||
| Home Assistant | 8123 | |
|
||||
| Homebridge | 8087 | |
|
||||
| Jackett | 9117 | |
|
||||
| Jellyfin | 8896 | HTTP |
|
||||
| Jellyfin | 8928 | HTTPS |
|
||||
| MiniDLNA | 8201 | |
|
||||
| Miniflux | 8070 | |
|
||||
| Mosquitto | 1883 | MQTT |
|
||||
|
@ -27,6 +35,8 @@ By default, applications can be found on the ports listed below.
|
|||
| Netdata | 19999 | |
|
||||
| Nextcloud | 8080 | |
|
||||
| NZBGet | 6789 | |
|
||||
| openHAB | 7777 | HTTP |
|
||||
| openHAB | 7778 | HTTPS |
|
||||
| Plex | 32400 | |
|
||||
| Portainer | 9000 | |
|
||||
| pyload | 8000 | |
|
||||
|
@ -35,6 +45,7 @@ By default, applications can be found on the ports listed below.
|
|||
| Sonarr | 8989 | |
|
||||
| Tautulli | 8181 | |
|
||||
| The Lounge | 9000 | |
|
||||
| Time Machine | 10445 | SMB |
|
||||
| Traefik | 8083 | |
|
||||
| Transmission | 9091 | with VPN |
|
||||
| Transmission | 9092 | |
|
||||
|
|
|
@ -10,7 +10,7 @@ The [homeserver Reddit](https://www.reddit.com/r/HomeServer/) has lots of good i
|
|||
|
||||
2. How many applications do you intend to run in parallel? How much memory do these applications require?
|
||||
|
||||
3. Are you going to run the [ZFS](zfs/zfs_overview/) file system? (you should!)
|
||||
3. Are you going to run the [ZFS](zfs/zfs_overview.md) file system? (you should!)
|
||||
|
||||
4. What are you intending to store on your Ansible-NAS? Is it data you can download again, or is it important to you that you don't lose it? Do you need mirrored disks?
|
||||
|
||||
|
|
|
@ -102,24 +102,26 @@ Our new pool is named `tank` and is mirrored. To see information about it, use
|
|||
`ashift`), use `sudo zpool destroy tank` and start over _now_ before it's too
|
||||
late.
|
||||
|
||||
### Pool default parameters
|
||||
### Pool and filesystem properties
|
||||
|
||||
Setting pool-wide default parameters makes life easier when we create our
|
||||
filesystems. To see them all, you can use the command `zfs get all tank`. Most
|
||||
are perfectly sensible, some you'll [want to
|
||||
change](https://jrs-s.net/2018/08/17/zfs-tuning-cheat-sheet/):
|
||||
Pools have properties that apply either to the pool itself or to filesystems
|
||||
created in the pool. You can use the command `zpool get all tank` to see the
|
||||
pool properties and `zfs get all tank` to see the filesystem properties. Most
|
||||
default values are perfecly sensible, some you'll [want to
|
||||
change](https://jrs-s.net/2018/08/17/zfs-tuning-cheat-sheet/). Setting
|
||||
defaults makes life easier when we create our filesystems.
|
||||
|
||||
```
|
||||
sudo zpool set autoexpand=on tank
|
||||
sudo zfs set atime=off tank
|
||||
sudo zfs set compression=lz4 tank
|
||||
sudo zfs set autoexpand=on tank
|
||||
```
|
||||
|
||||
The `atime` parameter means that your system updates a time stamp every time a
|
||||
file is accessed, which uses a lot of resources. Usually, you don't care.
|
||||
`autoexpand=on` lets the pool grow when you add larger hard drives. `atime=off`
|
||||
means that your system won't update a time stamp every time a file is accessed,
|
||||
something which would use a lot of resources. Usually, you don't care.
|
||||
Compression is a no-brainer on modern CPUs and should be on by default (we will
|
||||
discuss exceptions for compressed media files later). The `autoexpand` lets the
|
||||
pool grow when you add larger hard drives.
|
||||
discuss exceptions for compressed media files later).
|
||||
|
||||
## Creating filesystems
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# External Access
|
||||
# Traefik will allow access to certain applications externally. To enable this you'll either; a domain name that points to your
|
||||
# home static IP address, the cloudflare with the cloudflare_ddns dynamic DNS container enabled, or use a dynamic DNS provider like no-ip.
|
||||
# You'll also need to map ports 80 and 443 from your router to your ansible-nas server, then enable the per-app "availble_externally"
|
||||
# You'll also need to map ports 80 and 443 from your router to your ansible-nas server, then enable the per-app "available_externally"
|
||||
# settings.
|
||||
traefik_enabled: false
|
||||
|
||||
|
@ -36,6 +36,9 @@ tautulli_enabled: false
|
|||
# Emby
|
||||
emby_enabled: false
|
||||
|
||||
# Jellyfin
|
||||
jellyfin_enabled: false
|
||||
|
||||
# minidlna
|
||||
minidlna_enabled: false
|
||||
|
||||
|
@ -46,6 +49,7 @@ couchpotato_enabled: false
|
|||
radarr_enabled: false
|
||||
get_iplayer_enabled: false
|
||||
jackett_enabled: false
|
||||
bazarr_enabled: false
|
||||
|
||||
# Music
|
||||
airsonic_enabled: false
|
||||
|
@ -63,6 +67,7 @@ guacamole_enabled: false
|
|||
netdata_enabled: false
|
||||
watchtower_enabled: false
|
||||
cloudflare_ddns_enabled: false
|
||||
cloudcmd_enabled: false
|
||||
|
||||
# Backup & Restore
|
||||
duplicati_enabled: false
|
||||
|
@ -83,8 +88,17 @@ firefly_enabled: false
|
|||
# Wallabag
|
||||
wallabag_enabled: false
|
||||
|
||||
# MQTT
|
||||
# Home Automation
|
||||
homeassistant_enabled: false
|
||||
mosquitto_enabled: false
|
||||
homebridge_enabled: false
|
||||
openhab_enabled: false
|
||||
|
||||
# Calibre
|
||||
calibre_enabled: false
|
||||
|
||||
# Joomla
|
||||
joomla_enabled: false
|
||||
|
||||
###
|
||||
### General
|
||||
|
@ -102,10 +116,10 @@ keep_packages_updated: false
|
|||
# Will be added to the docker group to give user command line access to docker
|
||||
ansible_nas_user: david
|
||||
|
||||
# Your email and domain, used for LetsEncrypt SSL certs
|
||||
# Your email and domain, used for Let's Encrypt SSL certs
|
||||
ansible_nas_email: me@example.com
|
||||
|
||||
# Applications will have subdomain SSL certificates created, eg ansible-nas.<your-domain>, nextcloud.<your-domain>
|
||||
# Applications will have subdomain SSL certificates created, e.g. ansible-nas.<your-domain>, nextcloud.<your-domain>
|
||||
ansible_nas_domain: example.com
|
||||
|
||||
###
|
||||
|
@ -146,6 +160,12 @@ music_root: "{{ samba_shares_root }}/music"
|
|||
# Where podcasts are stored
|
||||
podcasts_root: "{{ samba_shares_root }}/podcasts"
|
||||
|
||||
# Where your books are stored
|
||||
books_root: "{{ samba_shares_root }}/books"
|
||||
|
||||
# Where photos are stored
|
||||
photos_root: "{{ samba_shares_root }}/photos"
|
||||
|
||||
# The description that'll appear next to your Ansible-NAS box when browsing your network
|
||||
samba_server_string: Ansible NAS
|
||||
|
||||
|
@ -215,10 +235,18 @@ samba_shares:
|
|||
browsable: yes
|
||||
path: "{{ samba_shares_root }}/photos"
|
||||
|
||||
- name: books
|
||||
comment: 'Books'
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
browsable: yes
|
||||
path: "{{ samba_shares_root }}/books"
|
||||
|
||||
###
|
||||
### NFS
|
||||
###
|
||||
# Data you want published over NFS. More info on the nfs config format can be found at
|
||||
# Data you want published over NFS. More info on the NFS config format can be found at
|
||||
# https://help.ubuntu.com/community/SettingUpNFSHowTo#Shares
|
||||
# WARNING: Weird things might happen if you share the same data over Samba and NFS and allow writes on both!
|
||||
|
||||
|
@ -260,6 +288,7 @@ ansible_nas_extra_packages:
|
|||
- bonnie++
|
||||
- unzip
|
||||
- lm-sensors
|
||||
- ctop
|
||||
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
|
||||
|
@ -268,6 +297,8 @@ ansible_python_interpreter: /usr/bin/python3
|
|||
###
|
||||
# Seems to break browsing of the \\server-name shares root when enabled
|
||||
samba_mitigate_cve_2017_7494: false
|
||||
# Enable apple exentensions for compatibility with apple clients
|
||||
samba_apple_extensions: yes
|
||||
|
||||
# The account used when Samba shares are accessed. Shouldn't need to change this unless you want to
|
||||
# mess with Samba user permissions.
|
||||
|
@ -276,13 +307,13 @@ samba_guest_account: ansible-nas
|
|||
# How Samba behaves when an unknown user connects, see Samba docs for more info
|
||||
samba_map_to_guest: Bad Password
|
||||
|
||||
# The Netbios hostname used by Samba on your network
|
||||
# The NetBIOS hostname used by Samba on your network
|
||||
samba_netbios_name: "{{ ansible_nas_hostname }}"
|
||||
|
||||
###
|
||||
### Traefik
|
||||
###
|
||||
traefik_docker_image: traefik:latest
|
||||
traefik_docker_image: traefik:v1.7
|
||||
traefik_data_directory: "{{ docker_home }}/traefik"
|
||||
traefik_debug: "false"
|
||||
|
||||
|
@ -305,6 +336,13 @@ transmission_user_id: 0
|
|||
transmission_group_id: 0
|
||||
transmission_local_network: "192.168.1.0/24"
|
||||
|
||||
###
|
||||
### Joomla
|
||||
###
|
||||
joomla_data_directory: "{{ docker_home }}/joomla"
|
||||
joomla_available_externally: "false"
|
||||
joomla_database_password: top_secret
|
||||
|
||||
###
|
||||
### pyLoad
|
||||
###
|
||||
|
@ -314,6 +352,7 @@ pyload_download_directory: "{{ downloads_root }}"
|
|||
pyload_user_id: 0
|
||||
pyload_group_id: 0
|
||||
|
||||
|
||||
###
|
||||
### Plex
|
||||
###
|
||||
|
@ -325,9 +364,21 @@ plex_movies_directory: "{{ movies_root }}"
|
|||
plex_movies_permissions: "rw"
|
||||
plex_tv_directory: "{{ tv_root }}"
|
||||
plex_tv_permissions: "rw"
|
||||
plex_photos_directory: "{{ photos_root }}"
|
||||
plex_photos_permissions: "rw"
|
||||
plex_music_directory: "{{ music_root }}"
|
||||
plex_music_permissions: "rw"
|
||||
plex_user_id: 0
|
||||
plex_group_id: 0
|
||||
|
||||
###
|
||||
### Homebridge
|
||||
###
|
||||
homebridge_available_externally: "false"
|
||||
homebridge_config_directory: "{{ docker_home }}/homebridge/config"
|
||||
homebridge_user_id: "0"
|
||||
homebridge_group_id: "0"
|
||||
|
||||
###
|
||||
### Emby
|
||||
###
|
||||
|
@ -379,6 +430,16 @@ radarr_data_directory: "{{ docker_home }}/radarr"
|
|||
radarr_user_id: 0
|
||||
radarr_group_id: 0
|
||||
|
||||
###
|
||||
### Bazarr
|
||||
###
|
||||
bazarr_available_externally: "false"
|
||||
bazarr_data_directory: "{{ docker_home }}/bazarr/config"
|
||||
bazarr_tv_directory: "{{ tv_root }}"
|
||||
bazarr_movies_directory: "{{ movies_root }}"
|
||||
bazarr_user_id: "0"
|
||||
bazarr_group_id: "0"
|
||||
|
||||
|
||||
###
|
||||
### Couchpotato
|
||||
|
@ -482,6 +543,15 @@ miniflux_admin_password: supersecure
|
|||
airsonic_available_externally: "false"
|
||||
airsonic_data_directory: "{{ docker_home }}/airsonic"
|
||||
|
||||
###
|
||||
### CloudCmd
|
||||
###
|
||||
cloudcmd_available_externally: "false"
|
||||
cloudcmd_data_directory: "{{ docker_home }}/cloudcmd/config"
|
||||
cloudcmd_browse_directory: "/"
|
||||
cloudcmd_user_id: "0"
|
||||
cloudcmd_group_id: "0"
|
||||
|
||||
###
|
||||
### Watchtower
|
||||
###
|
||||
|
@ -504,10 +574,11 @@ watchtower_command: "--schedule '{{ watchtower_cron_schedule }}' --debug"
|
|||
### Time Machine
|
||||
###
|
||||
timemachine_data_directory: "{{ docker_home }}/timemachine"
|
||||
timemachine_volume_size_limit: 0
|
||||
timemachine_volume_size_limit: "0"
|
||||
timemachine_password: timemachine
|
||||
timemachine_share_name: TimeMachine
|
||||
timemachine_share_name: Data
|
||||
timemachine_log_level: error
|
||||
timemachine_port: "10445"
|
||||
|
||||
###
|
||||
### minidlna
|
||||
|
@ -577,7 +648,45 @@ nzbget_group_id: 0
|
|||
wallabag_available_externally: "false"
|
||||
wallabag_data_directory: "{{ docker_home }}/wallabag"
|
||||
|
||||
###
|
||||
### Mosquitto
|
||||
###
|
||||
mosquitto_available_externally: "false"
|
||||
mosquitto_data_directory: "{{ docker_home }}/mosquitto"
|
||||
|
||||
###
|
||||
### Calibre
|
||||
###
|
||||
calibre_available_externally: "false"
|
||||
calibre_data_directory: "{{ docker_home }}/calibre"
|
||||
calibre_user_id: "0"
|
||||
calibre_group_id: "0"
|
||||
# To disable ebook conversion set calibre_ebook_conversion to "". To enable it set it to "linuxserver/calibre-web:calibre"
|
||||
calibre_ebook_conversion: "linuxserver/calibre-web:calibre"
|
||||
|
||||
###
|
||||
### Home Assistant
|
||||
###
|
||||
homeassistant_available_externally: "false"
|
||||
homeassistant_data_directory: "{{ docker_home }}/homeassistant"
|
||||
|
||||
###
|
||||
### openHAB
|
||||
###
|
||||
openhab_available_externally: "false"
|
||||
openhab_docker_image: openhab/openhab:latest
|
||||
openhab_data_directory: "{{ docker_home }}/openhab"
|
||||
|
||||
###
|
||||
### Jellyfin
|
||||
###
|
||||
# If you're paranoid, set permissions to "ro" so jellyfin won't ever be able to
|
||||
# delete your files
|
||||
jellyfin_available_externally: "false"
|
||||
jellyfin_config_directory: "{{ docker_home }}/jellyfin/config"
|
||||
jellyfin_movies_directory: "{{ movies_root }}"
|
||||
jellyfin_movies_permissions: "rw"
|
||||
jellyfin_tv_directory: "{{ tv_root }}"
|
||||
jellyfin_tv_permissions: "rw"
|
||||
jellyfin_user_id: "0"
|
||||
jellyfin_group_id: "0"
|
||||
|
|
32
nas.yml
32
nas.yml
|
@ -156,6 +156,10 @@
|
|||
when: (jackett_enabled | default(False))
|
||||
tags: jackett
|
||||
|
||||
- import_tasks: tasks/joomla.yml
|
||||
when: (joomla_enabled | default(False))
|
||||
tags: joomla
|
||||
|
||||
- import_tasks: tasks/bitwarden.yml
|
||||
when: (bitwarden_enabled | default(False))
|
||||
tags: bitwarden
|
||||
|
@ -171,3 +175,31 @@
|
|||
- import_tasks: tasks/mosquitto.yml
|
||||
when: (mosquitto_enabled | default(False))
|
||||
tags: mosquitto
|
||||
|
||||
- import_tasks: tasks/homebridge.yml
|
||||
when: (homebridge_enabled | default(False))
|
||||
tags: homebridge
|
||||
|
||||
- import_tasks: tasks/calibre.yml
|
||||
when: (calibre_enabled | default(False))
|
||||
tags: calibre
|
||||
|
||||
- import_tasks: tasks/homeassistant.yml
|
||||
when: (homeassistant_enabled | default(False))
|
||||
tags: homeassistant
|
||||
|
||||
- import_tasks: tasks/bazarr.yml
|
||||
when: (bazarr_enabled | default(False))
|
||||
tags: bazarr
|
||||
|
||||
- import_tasks: tasks/openhab.yml
|
||||
when: (openhab_enabled | default(False))
|
||||
tags: openhab
|
||||
|
||||
- import_tasks: tasks/jellyfin.yml
|
||||
when: (jellyfin_enabled | default(False))
|
||||
tags: jellyfin
|
||||
|
||||
- import_tasks: tasks/cloudcmd.yml
|
||||
when: (cloudcmd_enabled | default(False))
|
||||
tags: cloudcmd
|
||||
|
|
30
tasks/bazarr.yml
Normal file
30
tasks/bazarr.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
- name: Create Bazarr Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ bazarr_data_directory }}"
|
||||
|
||||
- name: Bazarr
|
||||
docker_container:
|
||||
name: bazarr
|
||||
image: linuxserver/bazarr
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ bazarr_tv_directory }}:/tv:rw"
|
||||
- "{{ bazarr_movies_directory }}:/movies:rw"
|
||||
- "{{ bazarr_data_directory }}:/config:rw"
|
||||
ports:
|
||||
- "6767:6767"
|
||||
env:
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
PUID: "{{ bazarr_user_id }}"
|
||||
PGID: "{{ bazarr_group_id }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
labels:
|
||||
traefik.backend: "bazarr"
|
||||
traefik.frontend.rule: "Host:bazarr.{{ ansible_nas_domain }}"
|
||||
traefik.enable: "{{ bazarr_available_externally }}"
|
||||
traefik.port: "6767"
|
|
@ -21,7 +21,6 @@
|
|||
LOG_FILE: "/data/bitwarden.log"
|
||||
WEBSOCKET_ENABLED: "true"
|
||||
labels:
|
||||
traefik.backend: "bitwarden"
|
||||
traefik.web.frontend.rule: "Host:bitwarden.{{ ansible_nas_domain }}"
|
||||
traefik.enable: "{{ bitwarden_available_externally }}"
|
||||
traefik.web.port: "80"
|
||||
|
@ -38,4 +37,4 @@
|
|||
pull: true
|
||||
restart_policy: unless-stopped
|
||||
volumes_from: bitwarden
|
||||
memory: 1g
|
||||
memory: 1g
|
||||
|
|
29
tasks/calibre.yml
Executable file
29
tasks/calibre.yml
Executable file
|
@ -0,0 +1,29 @@
|
|||
- name: Create Calibre Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ calibre_data_directory }}/config"
|
||||
|
||||
- name: Calibre Docker Container
|
||||
docker_container:
|
||||
name: calibre
|
||||
image: linuxserver/calibre-web:latest
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ calibre_data_directory }}/config:/config"
|
||||
- "{{ books_root }}:/books"
|
||||
env:
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
PUID: "{{ calibre_user_id }}"
|
||||
PGID: "{{ calibre_group_id }}"
|
||||
DOCKER_MODS: "{{ calibre_ebook_conversion }}"
|
||||
ports:
|
||||
- "8084:8083"
|
||||
restart_policy: unless-stopped
|
||||
labels:
|
||||
traefik.backend: "calibre"
|
||||
traefik.frontend.rule: "Host:calibre.{{ ansible_nas_domain }}"
|
||||
traefik.enable: "{{ calibre_available_externally }}"
|
||||
traefik.port: "8083"
|
||||
memory: 1g
|
29
tasks/cloudcmd.yml
Normal file
29
tasks/cloudcmd.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
- name: Create CloudCmd Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ cloudcmd_data_directory }}"
|
||||
|
||||
- name: CloudCmd
|
||||
docker_container:
|
||||
name: cloudcmd
|
||||
image: coderaiser/cloudcmd
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ cloudcmd_data_directory }}:/config:rw"
|
||||
- "{{ cloudcmd_browse_directory }}:/mnt/fs"
|
||||
ports:
|
||||
- "7373:8000"
|
||||
env:
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
PUID: "{{ cloudcmd_user_id }}"
|
||||
PGID: "{{ cloudcmd_group_id }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
labels:
|
||||
traefik.backend: "cloudcmd"
|
||||
traefik.frontend.rule: "Host:cloudcmd.{{ ansible_nas_domain }}"
|
||||
traefik.enable: "{{ cloudcmd_available_externally }}"
|
||||
traefik.port: "8000"
|
|
@ -22,7 +22,7 @@
|
|||
- name: add user account to docker group
|
||||
user:
|
||||
name: "{{ ansible_nas_user }}"
|
||||
group: docker
|
||||
groups: docker
|
||||
append: yes
|
||||
|
||||
- name: update docker home from install default
|
||||
|
|
|
@ -40,12 +40,12 @@
|
|||
ports:
|
||||
- "8066:80"
|
||||
env:
|
||||
FF_APP_ENV: "local"
|
||||
FF_APP_KEY: "S0m3R@nd0mString0f32Ch@rsEx@ct1y"
|
||||
FF_DB_HOST: "db"
|
||||
FF_DB_NAME: "firefly"
|
||||
FF_DB_USER: "firefly"
|
||||
FF_DB_PASSWORD: "firefly"
|
||||
APP_ENV: "local"
|
||||
APP_KEY: "S0m3R@nd0mString0f32Ch@rsEx@ct1y"
|
||||
DB_HOST: "db"
|
||||
DB_DATABASE: "firefly"
|
||||
DB_USERNAME: "firefly"
|
||||
DB_PASSWORD: "firefly"
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
- name: "Permission share directories"
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
owner: ansible-nas
|
||||
group: ansible-nas
|
||||
mode: "u=rwX,g=rwX,o=rX"
|
||||
|
|
|
@ -54,17 +54,17 @@
|
|||
- "3001:3000"
|
||||
- "222:22"
|
||||
env:
|
||||
DB_TYPE: mysql
|
||||
DB_HOST: db:3306
|
||||
DB_NAME: gitea
|
||||
DB_USER: gitea
|
||||
DB_PASSWD: gitea
|
||||
RUN_MODE: prod
|
||||
DB_TYPE: "mysql"
|
||||
DB_HOST: "db:3306"
|
||||
DB_NAME: "gitea"
|
||||
DB_USER: "gitea"
|
||||
DB_PASSWD: "gitea"
|
||||
RUN_MODE: "prod"
|
||||
SSH_DOMAIN: "{{ ansible_nas_hostname }}"
|
||||
SSH_PORT: 222
|
||||
SSH_PORT: "222"
|
||||
ROOT_URL: "http://{{ ansible_nas_hostname }}:3001/"
|
||||
USER_UID: 1309
|
||||
USER_GID: 1309
|
||||
USER_UID: "1309"
|
||||
USER_GID: "1309"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
labels:
|
||||
|
|
26
tasks/homeassistant.yml
Normal file
26
tasks/homeassistant.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
- name: Create Home Assistant Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ homeassistant_data_directory }}/config"
|
||||
|
||||
- name: Home Assistant Docker Container
|
||||
docker_container:
|
||||
name: homeassistant
|
||||
image: homeassistant/home-assistant
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ homeassistant_data_directory }}/config:/config:rw"
|
||||
ports:
|
||||
- "8123:8123"
|
||||
restart_policy: unless-stopped
|
||||
env:
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
labels:
|
||||
traefik.backend: "homeassistant"
|
||||
traefik.frontend.rule: "Host:homeassistant.{{ ansible_nas_domain }}"
|
||||
traefik.enable: "{{ homeassistant_available_externally }}"
|
||||
traefik.port: "8123"
|
||||
traefik.frontend.headers.SSLRedirect: "true"
|
||||
memory: 1g
|
29
tasks/homebridge.yml
Normal file
29
tasks/homebridge.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
- name: Create Homebridge Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ homebridge_config_directory }}"
|
||||
|
||||
- name: Homebridge Docker Container
|
||||
docker_container:
|
||||
name: homebridge
|
||||
image: oznu/homebridge
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ homebridge_config_directory }}:/homebridge"
|
||||
network_mode: host
|
||||
env:
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
PGID: "{{ homebridge_group_id }}"
|
||||
PUID: "{{ homebridge_user_id }}"
|
||||
HOMEBRIDGE_CONFIG_UI: "1"
|
||||
HOMEBRIDGE_CONFIG_UI_PORT: "8087"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
labels:
|
||||
traefik.backend: "homebridge"
|
||||
traefik.frontend.rule: "Host:homebridge.{{ ansible_nas_domain }}"
|
||||
traefik.enable: "{{ homebridge_available_externally }}"
|
||||
traefik.port: "8087"
|
30
tasks/jellyfin.yml
Normal file
30
tasks/jellyfin.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
- name: Create Jellyfin Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ jellyfin_config_directory }}"
|
||||
|
||||
- name: Jellyfin Docker Container
|
||||
docker_container:
|
||||
name: jellyfin
|
||||
image: linuxserver/jellyfin
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ jellyfin_config_directory }}:/config:rw"
|
||||
- "{{ jellyfin_movies_directory }}:/movies:{{ jellyfin_movies_permissions }}"
|
||||
- "{{ jellyfin_tv_directory }}:/tv:{{ jellyfin_tv_permissions }}"
|
||||
ports:
|
||||
- "8896:8096" # HTTP port
|
||||
- "8928:8920" # HTTPS port
|
||||
env:
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
PUID: "{{ jellyfin_user_id }}"
|
||||
PGID: "{{ jellyfin_group_id }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
labels:
|
||||
traefik.backend: "jellyfin"
|
||||
traefik.frontend.rule: "Host:jellyfin.{{ ansible_nas_domain }}"
|
||||
traefik.enable: "{{ jellyfin_available_externally }}"
|
||||
traefik.port: "8096"
|
45
tasks/joomla.yml
Normal file
45
tasks/joomla.yml
Normal file
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
- name: Create Joomla Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ joomla_data_directory }}"
|
||||
- "{{ joomla_data_directory }}/db"
|
||||
|
||||
- name: MySQL Docker Container for Joomla
|
||||
docker_container:
|
||||
name: joomla_mysql
|
||||
image: mysql:5.7
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ joomla_data_directory }}/db:/var/lib/mysql"
|
||||
env:
|
||||
MYSQL_DATABASE: "joomla"
|
||||
MYSQL_USER: "joomla"
|
||||
MYSQL_ROOT_PASSWORD: "{{ joomla_database_password }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
|
||||
- name: Joomla Docker Container
|
||||
docker_container:
|
||||
name: joomla
|
||||
image: joomla
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ joomla_data_directory }}:/var/www/html:rw"
|
||||
ports:
|
||||
- "8181:80"
|
||||
links:
|
||||
- "joomla_mysql:mysql"
|
||||
env:
|
||||
JOOMLA_DB_HOST: "mysql"
|
||||
JOOMLA_DB_USER: "root"
|
||||
JOOMLA_DB_PASSWORD: "{{ joomla_database_password }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
labels:
|
||||
traefik.backend: "joomla"
|
||||
traefik.frontend.rule: "Host: joomla.{{ ansible_nas_domain }}"
|
||||
traefik.enable: "{{ joomla_available_externally }}"
|
||||
traefik.port: "80"
|
51
tasks/openhab.yml
Normal file
51
tasks/openhab.yml
Normal file
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
- name: Create openHAB group
|
||||
group:
|
||||
name: openhab
|
||||
gid: 9001
|
||||
state: present
|
||||
|
||||
- name: Create openHAB user
|
||||
user:
|
||||
name: openhab
|
||||
uid: 9001
|
||||
state: present
|
||||
system: yes
|
||||
update_password: on_create
|
||||
create_home: no
|
||||
group: openhab
|
||||
|
||||
- name: Create openHAB Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: openhab
|
||||
group: openhab
|
||||
with_items:
|
||||
- "{{ openhab_data_directory }}"
|
||||
- "{{ openhab_data_directory }}/conf"
|
||||
- "{{ openhab_data_directory }}/userdata"
|
||||
- "{{ openhab_data_directory }}/addons"
|
||||
|
||||
- name: Create openHAB container
|
||||
docker_container:
|
||||
name: openHAB
|
||||
image: "{{ openhab_docker_image }}"
|
||||
pull: true
|
||||
network_mode: "host"
|
||||
volumes:
|
||||
- "{{ openhab_data_directory }}/conf:/openhab/conf:rw"
|
||||
- "{{ openhab_data_directory }}/userdata:/openhab/userdata:rw"
|
||||
- "{{ openhab_data_directory }}/addons:/openhab/addons:rw"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
env:
|
||||
OPENHAB_HTTP_PORT: "7777"
|
||||
OPENHAB_HTTPS_PORT: "7778"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
labels:
|
||||
traefik.backend: "openhab"
|
||||
traefik.frontend.rule: "Host:openhab.{{ ansible_nas_domain }}"
|
||||
traefik.enable: "{{ openhab_available_externally }}"
|
||||
traefik.port: "80"
|
|
@ -15,6 +15,8 @@
|
|||
- "{{ plex_config_directory }}:/config:rw"
|
||||
- "{{ plex_movies_directory }}:/movies:{{ plex_movies_permissions }}"
|
||||
- "{{ plex_tv_directory }}:/tv:{{ plex_tv_permissions }}"
|
||||
- "{{ plex_photos_directory }}:/photos:{{ plex_photos_permissions }}"
|
||||
- "{{ plex_music_directory }}:/music:{{ plex_music_permissions }}"
|
||||
network_mode: "host"
|
||||
env:
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
|
|
|
@ -7,19 +7,35 @@
|
|||
- name: Time Machine Docker Container
|
||||
docker_container:
|
||||
name: timemachine
|
||||
image: mbentley/timemachine:latest
|
||||
image: awlnx/samba-timemachine:latest
|
||||
pull: true
|
||||
ports:
|
||||
- "548:548"
|
||||
- "{{ timemachine_port }}:445"
|
||||
env:
|
||||
VOLUME_SIZE_LIMIT: "{{ timemachine_volume_size_limit }}"
|
||||
PASSWORD: "{{ timemachine_password }}"
|
||||
SHARE_NAME: "{{ timemachine_share_name }}"
|
||||
LOG_LEVEL: "{{ timemachine_log_level }}"
|
||||
TMSIZE: "{{ timemachine_volume_size_limit }}"
|
||||
PASS: "{{ timemachine_password }}"
|
||||
SHARENAME: "{{ timemachine_share_name }}"
|
||||
volumes:
|
||||
- "{{ timemachine_data_directory }}/data:/opt/timemachine"
|
||||
- "{{ timemachine_data_directory }}/logs:/var/log/supervisor"
|
||||
- "/var/run/dbus:/var/run/dbus"
|
||||
network_mode: host
|
||||
- "{{ timemachine_data_directory }}/data:/backups"
|
||||
ulimits:
|
||||
- "nofile:1048576:1048576"
|
||||
network_mode: bridge
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
|
||||
- name: Install avahi
|
||||
apt:
|
||||
name: "avahi-daemon"
|
||||
state: present
|
||||
register: result
|
||||
until: result is succeeded
|
||||
|
||||
- name: Setup timemachine service for avahi
|
||||
template:
|
||||
src: timemachine/timemachine.service
|
||||
dest: "/etc/avahi/services/timemachine.service"
|
||||
|
||||
- name: Reload avahi configuration
|
||||
service:
|
||||
name: avahi-daemon
|
||||
state: reloaded
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
name: letsencrypt-nginx-proxy-companion
|
||||
state: absent
|
||||
|
||||
- name: Create Trafik Directories
|
||||
- name: Create Traefik Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
|
@ -26,10 +26,7 @@
|
|||
name: traefik
|
||||
image: "{{ traefik_docker_image }}"
|
||||
pull: true
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "8083:8083"
|
||||
network_mode: host
|
||||
volumes:
|
||||
- "{{ traefik_data_directory }}/traefik.toml:/etc/traefik/traefik.toml:ro"
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
|
|
|
@ -11,4 +11,5 @@
|
|||
system: yes
|
||||
update_password: on_create
|
||||
create_home: no
|
||||
group: ansible-nas
|
||||
group: ansible-nas
|
||||
shell: /usr/sbin/nologin
|
||||
|
|
19
templates/timemachine/timemachine.service
Normal file
19
templates/timemachine/timemachine.service
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" standalone='no'?>
|
||||
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
||||
<service-group>
|
||||
<name replace-wildcards="yes">Time Capsule on %h</name>
|
||||
<service>
|
||||
<type>_adisk._tcp</type>
|
||||
<txt-record>sys=waMa=0,adVF=0x100</txt-record>
|
||||
<txt-record>dk0=adVN={{ timemachine_share_name }},adVF=0x82</txt-record>
|
||||
</service>
|
||||
<service>
|
||||
<type>_smb._tcp</type>
|
||||
<port>{{ timemachine_port }}</port>
|
||||
</service>
|
||||
<service>
|
||||
<type>_device-info._tcp</type>
|
||||
<port>0</port>
|
||||
<txt-record>model=TimeCapsule6</txt-record>
|
||||
</service>
|
||||
</service-group>
|
|
@ -180,7 +180,10 @@ onDemand = false # create certificate when container is created
|
|||
|
||||
# we request a certificate for everything, because why not.
|
||||
sans = ["airsonic.{{ ansible_nas_domain }}",
|
||||
"bazarr.{{ ansible_nas_domain }}",
|
||||
"bitwarden.{{ ansible_nas_domain }}",
|
||||
"calibre.{{ ansible_nas_domain }}",
|
||||
"cloudcmd.{{ ansible_nas_domain }}",
|
||||
"couchpotato.{{ ansible_nas_domain }}",
|
||||
"duplicati.{{ ansible_nas_domain }}",
|
||||
"emby.{{ ansible_nas_domain }}",
|
||||
|
@ -190,11 +193,15 @@ onDemand = false # create certificate when container is created
|
|||
"grafana.{{ ansible_nas_domain }}",
|
||||
"guacamole.{{ ansible_nas_domain }}",
|
||||
"heimdall.{{ ansible_nas_domain }}",
|
||||
"homeassistant.{{ ansible_nas_domain }}",
|
||||
"jackett.{{ ansible_nas_domain }}",
|
||||
"jellyfin.{{ ansible_nas_domain }}",
|
||||
"joomla.{{ ansible_nas_domain }}",
|
||||
"miniflux.{{ ansible_nas_domain }}",
|
||||
"netdata.{{ ansible_nas_domain }}",
|
||||
"nextcloud.{{ ansible_nas_domain }}",
|
||||
"nzbget.{{ ansible_nas_domain }}",
|
||||
"openhab.{{ ansible_nas_domain }}",
|
||||
"plex.{{ ansible_nas_domain }}",
|
||||
"portainer.{{ ansible_nas_domain }}",
|
||||
"pyload.{{ ansible_nas_domain }}",
|
||||
|
|
Loading…
Reference in a new issue