mirror of
https://github.com/davestephens/ansible-nas
synced 2024-11-15 08:27:19 +00:00
commit
d5801fa043
6 changed files with 89 additions and 7 deletions
15
README.md
15
README.md
|
@ -6,7 +6,7 @@ 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
|
||||
Ansible config and a bunch of Docker containers.
|
||||
|
||||
## What This Sets Up
|
||||
## What Ansible-NAS Can Set Up
|
||||
|
||||
* An awesome dashboard to your home server (Heimdall)
|
||||
* Any number of Samba shares or NFS exports for you to store your stuff
|
||||
|
@ -23,15 +23,17 @@ Ansible config and a bunch of Docker containers.
|
|||
* SSL secured external access to applications via Traefik
|
||||
* 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
|
||||
|
||||
### Docker Containers Used
|
||||
|
||||
* [Airsonic](https://airsonic.github.io/) - catalog and stream music
|
||||
* [Bitwarden_rs](https://github.com/dani-garcia/bitwarden_rs) - Self-Hosting port of password manager
|
||||
* [Cloudflare DDNS](https://hub.docker.com/r/joshuaavalon/cloudflare-ddns/) - automatically update Cloudflare with your dynamic IP address
|
||||
* [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
|
||||
* [Emby](https://emby.media/) - Media streaming and management
|
||||
* [Firefly III](https://firefly-iii.org/) - Free and open source personal finance manager
|
||||
* [get_iplayer](https://github.com/get-iplayer/get_iplayer) - download programmes from BBC iplayer
|
||||
* [Gitea](https://gitea.io/en-us/) - Self-hosted Github clone
|
||||
* [Glances](https://nicolargo.github.io/glances/) - for seeing the state of your system via a web browser
|
||||
|
@ -71,10 +73,9 @@ others could benefit, add it and raise a PR!
|
|||
|
||||
## What This Doesn't Do
|
||||
|
||||
Ansible NAS doesn't set up your disk partitions, primarily because getting it
|
||||
wrong can be incredibly destructive. That aside, configuring partitions is
|
||||
usually a one-time (or very infrequent) event, so there's not much to be gained
|
||||
by automating it.
|
||||
Ansible NAS doesn't set up your disk partitions, primarily because getting it wrong can be incredibly destructive.
|
||||
That aside, configuring partitions is usually a one-time (or very infrequent) event, so there's not much to be
|
||||
gained by automating it. Check out the [docs](https://davestephens.github.io/ansible-nas) for recommended setups.
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
@ -134,7 +135,7 @@ Contributions are welcome, please feel free to raise a PR!
|
|||
`tests/test-vagrant.sh` script to spin up a test VM. Note that Ansible-NAS
|
||||
requires Vagrant version 2.2.2 or later, so for stock Ubuntu 18.04.2, you will
|
||||
have to download and install the newest version from
|
||||
https://www.vagrantup.com/downloads.html .
|
||||
https://www.vagrantup.com/downloads.html.
|
||||
* Run `ansible-lint` against the playbook before committing. (There is a VSCode
|
||||
task set up to run the right command for you)
|
||||
* Please know that your efforts are appreciated, thanks! :+1:
|
||||
|
|
11
docs/applications/firefly.md
Normal file
11
docs/applications/firefly.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Firefly III
|
||||
|
||||
Homepage: [https://firefly-iii.org/](https://firefly-iii.org/)
|
||||
|
||||
Firefly III is a self-hosted financial manager. It can help you keep track of expenses, income, budgets and everything in between. It supports credit cards, shared household accounts and savings accounts. It’s pretty fancy. You should use it to save and organise money.
|
||||
|
||||
## Usage
|
||||
|
||||
Set `firefly_enabled: true` in your `group_vars/all.yml` file.
|
||||
|
||||
The very basic MiniDLNA web interface can be found at http://ansible_nas_host_or_ip:8066.
|
|
@ -10,6 +10,7 @@ By default, applications can be found on the ports listed below.
|
|||
| Duplicati | 8200 | |
|
||||
| Emby | 8096 | HTTP |
|
||||
| Emby | 8920 | HTTPS |
|
||||
| Firefly III | 8066 | |
|
||||
| get_iplayer | 8182 | |
|
||||
| Gitea | 3001 | Web |
|
||||
| Gitea | 222 | SSH |
|
||||
|
|
|
@ -64,6 +64,9 @@ thelounge_enabled: false
|
|||
# Password Management
|
||||
bitwarden_enabled: false
|
||||
|
||||
# Finance
|
||||
firefly_enabled: false
|
||||
|
||||
###
|
||||
### General
|
||||
###
|
||||
|
@ -525,3 +528,9 @@ bitwarden_admin_token: qwertyuiop1234567890poiuytrewq0987654321
|
|||
# Once you have created your user, set to "false" and run one more time.
|
||||
# Target just Bitwarden by running: ansible-playbook -i inventory nas.yml -b -K -t bitwarden
|
||||
bitwarden_allow_signups: false
|
||||
|
||||
###
|
||||
### Firefly
|
||||
###
|
||||
firefly_available_externally: "false"
|
||||
firefly_data_directory: "{{ docker_home }}/firefly"
|
4
nas.yml
4
nas.yml
|
@ -48,6 +48,10 @@
|
|||
when: (plex_enabled | default(False))
|
||||
tags: plex
|
||||
|
||||
- import_tasks: tasks/firefly.yml
|
||||
when: (firefly_enabled | default(False))
|
||||
tags: firefly
|
||||
|
||||
- import_tasks: tasks/emby.yml
|
||||
when: (emby_enabled | default(False))
|
||||
tags: emby
|
||||
|
|
56
tasks/firefly.yml
Normal file
56
tasks/firefly.yml
Normal file
|
@ -0,0 +1,56 @@
|
|||
- name: Create Firefly III Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ firefly_data_directory }}/postgresql"
|
||||
- "{{ firefly_data_directory }}/mysql"
|
||||
- "{{ firefly_data_directory }}/upload"
|
||||
- "{{ firefly_data_directory }}/export"
|
||||
|
||||
- name: Create MySQL container for Firefly
|
||||
docker_container:
|
||||
name: firefly-mysql
|
||||
image: mysql:5.7
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ firefly_data_directory }}/mysql:/var/lib/mysql:rw"
|
||||
env:
|
||||
MYSQL_DATABASE: firefly
|
||||
MYSQL_USER: firefly
|
||||
MYSQL_PASSWORD: firefly
|
||||
MYSQL_ROOT_PASSWORD: firefly
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
|
||||
- name: Wait for MySQL to init
|
||||
pause:
|
||||
seconds: 30
|
||||
|
||||
- name: Create Firefly III container
|
||||
docker_container:
|
||||
name: firefly
|
||||
image: jc5x/firefly-iii:latest
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ firefly_data_directory }}/export:/var/www/firefly-iii/storage/export:rw"
|
||||
- "{{ firefly_data_directory }}/upload:/var/www/firefly-iii/storage/upload:rw"
|
||||
links:
|
||||
- firefly-mysql:db
|
||||
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"
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
labels:
|
||||
traefik.backend: "firefly"
|
||||
traefik.frontend.rule: "Host:firefly.{{ ansible_nas_domain }}"
|
||||
traefik.enable: "{{ firefly_available_externally }}"
|
||||
traefik.port: "8080"
|
Loading…
Reference in a new issue