mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-26 02:05:05 +00:00
🏗️ converted remaining tasks to proper roles, moving vars definitions into proper role subfolder.
🐛 added missing entries in nas.yml (?!?) ♻️ reordered entries in nas.yml in alphabetical order. Renamed vd variables to virtual_desktop for ease of understanding
This commit is contained in:
parent
5b9fa8bd9c
commit
59e47c4ebf
23 changed files with 298 additions and 225 deletions
|
@ -18,31 +18,9 @@
|
|||
|
||||
# System Management
|
||||
stats_enabled: false
|
||||
guacamole_enabled: false
|
||||
virtual_desktop_enabled: false
|
||||
krusader_enabled: false
|
||||
|
||||
# Backup & Restore
|
||||
timemachine_enabled: false
|
||||
|
||||
# IRC
|
||||
thelounge_enabled: false
|
||||
|
||||
# Wallabag
|
||||
wallabag_enabled: false
|
||||
|
||||
# Home Automation
|
||||
mosquitto_enabled: false
|
||||
openhab_enabled: false
|
||||
|
||||
# Books
|
||||
calibre_enabled: false
|
||||
|
||||
# Ubooquity
|
||||
ubooquity_enabled: false
|
||||
|
||||
# Joomla
|
||||
joomla_enabled: false
|
||||
|
||||
###
|
||||
### General
|
||||
|
@ -106,7 +84,7 @@ samba_server_string: Ansible NAS
|
|||
# Shares you want published over Samba.
|
||||
samba_shares:
|
||||
- name: downloads
|
||||
comment: 'Stuff downloaded'
|
||||
comment: "Stuff downloaded"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -114,7 +92,7 @@ samba_shares:
|
|||
path: "{{ downloads_root }}"
|
||||
|
||||
- name: movies
|
||||
comment: 'Movies'
|
||||
comment: "Movies"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -122,7 +100,7 @@ samba_shares:
|
|||
path: "{{ movies_root }}"
|
||||
|
||||
- name: tv
|
||||
comment: 'TV Episodes'
|
||||
comment: "TV Episodes"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -130,7 +108,7 @@ samba_shares:
|
|||
path: "{{ tv_root }}"
|
||||
|
||||
- name: music
|
||||
comment: 'Music'
|
||||
comment: "Music"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -138,7 +116,7 @@ samba_shares:
|
|||
path: "{{ music_root }}"
|
||||
|
||||
- name: podcasts
|
||||
comment: 'Podcasts'
|
||||
comment: "Podcasts"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -146,7 +124,7 @@ samba_shares:
|
|||
path: "{{ podcasts_root }}"
|
||||
|
||||
- name: dump
|
||||
comment: 'File dump'
|
||||
comment: "File dump"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -154,7 +132,7 @@ samba_shares:
|
|||
path: "{{ samba_shares_root }}/dump"
|
||||
|
||||
- name: games
|
||||
comment: 'Games'
|
||||
comment: "Games"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -162,7 +140,7 @@ samba_shares:
|
|||
path: "{{ samba_shares_root }}/games"
|
||||
|
||||
- name: photos
|
||||
comment: 'Pictures'
|
||||
comment: "Pictures"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -170,7 +148,7 @@ samba_shares:
|
|||
path: "{{ photos_root }}"
|
||||
|
||||
- name: books
|
||||
comment: 'Books'
|
||||
comment: "Books"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -178,7 +156,7 @@ samba_shares:
|
|||
path: "{{ books_root }}"
|
||||
|
||||
- name: audiobooks
|
||||
comment: 'Audiobooks'
|
||||
comment: "Audiobooks"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -186,7 +164,7 @@ samba_shares:
|
|||
path: "{{ audiobooks_root }}"
|
||||
|
||||
- name: comics
|
||||
comment: 'Comics'
|
||||
comment: "Comics"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -194,7 +172,7 @@ samba_shares:
|
|||
path: "{{ comics_root }}"
|
||||
|
||||
- name: documents
|
||||
comment: 'Documents'
|
||||
comment: "Documents"
|
||||
guest_ok: yes
|
||||
public: yes
|
||||
writable: yes
|
||||
|
@ -232,102 +210,7 @@ samba_map_to_guest: Bad Password
|
|||
# The NetBIOS hostname used by Samba on your network
|
||||
samba_netbios_name: "{{ ansible_nas_hostname }}"
|
||||
|
||||
###
|
||||
### Joomla
|
||||
###
|
||||
joomla_data_directory: "{{ docker_home }}/joomla"
|
||||
joomla_available_externally: "false"
|
||||
joomla_database_password: top_secret
|
||||
joomla_port: "8181"
|
||||
|
||||
###
|
||||
### OpenVPN
|
||||
###
|
||||
openvpn_config_directory: "{{ docker_home }}/openvpn"
|
||||
|
||||
###
|
||||
### Guacamole
|
||||
###
|
||||
guacamole_available_externally: "false"
|
||||
guacamole_data_directory: "{{ docker_home }}/guacamole"
|
||||
guacamole_port: "8090"
|
||||
|
||||
###
|
||||
### Krusader
|
||||
###
|
||||
krusader_available_externally: "false"
|
||||
krusader_config_directory: "{{ docker_home }}/krusader/config"
|
||||
krusader_browse_directory: "/"
|
||||
krusader_user_id: "0"
|
||||
krusader_group_id: "0"
|
||||
krusader_secure_connection: "0"
|
||||
krusader_vnc_password: "topsecret"
|
||||
krusader_port_http: "5800"
|
||||
krusader_port_vnc: "5900"
|
||||
|
||||
###
|
||||
### Time Machine
|
||||
###
|
||||
timemachine_data_directory: "{{ docker_home }}/timemachine"
|
||||
timemachine_volume_size_limit: "0"
|
||||
timemachine_password: timemachine
|
||||
timemachine_share_name: Data
|
||||
timemachine_log_level: error
|
||||
timemachine_port: "10445"
|
||||
|
||||
###
|
||||
### The Lounge
|
||||
###
|
||||
thelounge_available_externally: "false"
|
||||
thelounge_data_directory: "{{ docker_home }}/thelounge"
|
||||
thelounge_port_one: "113"
|
||||
thelounge_port_two: "9002"
|
||||
|
||||
###
|
||||
### Wallabag
|
||||
###
|
||||
wallabag_available_externally: "false"
|
||||
wallabag_data_directory: "{{ docker_home }}/wallabag"
|
||||
wallabag_port: "7780"
|
||||
|
||||
###
|
||||
### Calibre-web
|
||||
###
|
||||
calibre_available_externally: "false"
|
||||
calibre_data_directory: "{{ docker_home }}/calibre"
|
||||
calibre_user_id: "0"
|
||||
calibre_group_id: "0"
|
||||
calibre_books_root: "{{ books_root }}"
|
||||
calibre_port: "8084"
|
||||
# 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"
|
||||
|
||||
###
|
||||
### openHAB
|
||||
###
|
||||
openhab_available_externally: "false"
|
||||
openhab_docker_image: openhab/openhab:latest
|
||||
openhab_data_directory: "{{ docker_home }}/openhab"
|
||||
openhab_port_http: "7777"
|
||||
openhab_port_https: "7778"
|
||||
|
||||
###
|
||||
### Ubooquity
|
||||
###
|
||||
ubooquity_available_externally: "false"
|
||||
ubooquity_data_directory: "{{ docker_home }}/ubooquity"
|
||||
ubooquity_user_id: "0"
|
||||
ubooquity_group_id: "0"
|
||||
ubooquity_port_webui: "2202"
|
||||
ubooquity_port_admin: "2203"
|
||||
|
||||
###
|
||||
### Virtual Desktop
|
||||
###
|
||||
vd_data_directory: "{{ docker_home }}/virtual_desktop"
|
||||
vd_docker_image: "rattydave/docker-ubuntu-xrdp-mate-custom:20.04-tools"
|
||||
vd_users:
|
||||
- username: "{{ ansible_nas_user }}"
|
||||
password: "topsecret"
|
||||
sudo: "Y"
|
||||
vd_rdp_port: 3389
|
||||
|
|
148
nas.yml
148
nas.yml
|
@ -60,6 +60,11 @@
|
|||
- booksonic
|
||||
when: (booksonic_enabled | default(False))
|
||||
|
||||
- role: calibre
|
||||
tags:
|
||||
- calibre
|
||||
when: (calibre_enabled | default(False))
|
||||
|
||||
- role: cloudcmd
|
||||
tags:
|
||||
- cloudcmd
|
||||
|
@ -145,6 +150,11 @@
|
|||
- gotify
|
||||
when: (gotify_enabled | default(False))
|
||||
|
||||
- role: guacamole
|
||||
tags:
|
||||
- guacamole
|
||||
when: (guacamole_enabled | default(False))
|
||||
|
||||
- role: healthchecks.io
|
||||
tags:
|
||||
- healthchecks.io
|
||||
|
@ -160,11 +170,36 @@
|
|||
- homeassistant
|
||||
when: (homeassistant_enabled | default(False))
|
||||
|
||||
- role: homebridge
|
||||
tags:
|
||||
- homebridge
|
||||
when: (homebridge_enabled | default(False))
|
||||
|
||||
- role: jackett
|
||||
tags:
|
||||
- jackett
|
||||
when: (jackett_enabled | default(False))
|
||||
|
||||
- role: jellyfin
|
||||
tags:
|
||||
- jellyfin
|
||||
when: (jellyfin_enabled | default(False))
|
||||
|
||||
- role: joomla
|
||||
tags:
|
||||
- joomla
|
||||
when: (joomla_enabled | default(False))
|
||||
|
||||
- role: komga
|
||||
tags:
|
||||
- komga
|
||||
when: (komga_enabled | default(False))
|
||||
|
||||
- role: krusader
|
||||
tags:
|
||||
- krusader
|
||||
when: (krusader_enabled | default(False))
|
||||
|
||||
- role: lidarr
|
||||
tags:
|
||||
- lidarr
|
||||
|
@ -240,6 +275,16 @@
|
|||
- octoprint
|
||||
when: (octoprint_enabled | default(False))
|
||||
|
||||
- role: ombi
|
||||
tags:
|
||||
- ombi
|
||||
when: (ombi_enabled | default(False))
|
||||
|
||||
- role: openhab
|
||||
tags:
|
||||
- openhab
|
||||
when: (openhab_enabled | default(False))
|
||||
|
||||
- role: organizr
|
||||
tags:
|
||||
- organizr
|
||||
|
@ -260,6 +305,11 @@
|
|||
- piwigo
|
||||
when: (piwigo_enabled | default(False))
|
||||
|
||||
- role: plex
|
||||
tags:
|
||||
- plex
|
||||
when: (plex_enabled | default(False))
|
||||
|
||||
- role: portainer
|
||||
tags:
|
||||
- portainer
|
||||
|
@ -275,16 +325,6 @@
|
|||
- pyload
|
||||
when: (pyload_enabled | default(False))
|
||||
|
||||
- role: ombi
|
||||
tags:
|
||||
- ombi
|
||||
when: (ombi_enabled | default(False))
|
||||
|
||||
- role: plex
|
||||
tags:
|
||||
- plex
|
||||
when: (plex_enabled | default(False))
|
||||
|
||||
- role: pytivo
|
||||
tags:
|
||||
- pytivo
|
||||
|
@ -295,11 +335,6 @@
|
|||
- radarr
|
||||
when: (radarr_enabled | default(False))
|
||||
|
||||
- role: sabnzbd
|
||||
tags:
|
||||
- sabnzbd
|
||||
when: (sabnzbd_enabled | default(False))
|
||||
|
||||
- role: route53_ddns
|
||||
tags:
|
||||
- route53_ddns
|
||||
|
@ -310,6 +345,11 @@
|
|||
- rssbridge
|
||||
when: (rssbridge_enabled | default(False))
|
||||
|
||||
- role: sabnzbd
|
||||
tags:
|
||||
- sabnzbd
|
||||
when: (sabnzbd_enabled | default(False))
|
||||
|
||||
- role: sickchill
|
||||
tags:
|
||||
- sickchill
|
||||
|
@ -335,11 +375,26 @@
|
|||
- tautulli
|
||||
when: (tautulli_enabled | default(False))
|
||||
|
||||
- role: thelounge
|
||||
tags:
|
||||
- thelounge
|
||||
when: (thelounge_enabled | default(False))
|
||||
|
||||
- role: tiddlywiki
|
||||
tags:
|
||||
- tiddlywiki
|
||||
when: (tiddlywiki_enabled | default(False))
|
||||
|
||||
- role: timemachine
|
||||
tags:
|
||||
- timemachine
|
||||
when: (timemachine_enabled | default(False))
|
||||
|
||||
- role: traefik
|
||||
tags:
|
||||
- traefik
|
||||
when: (traefik_enabled | default(False))
|
||||
|
||||
- role: transmission
|
||||
tags:
|
||||
- transmission
|
||||
|
@ -350,68 +405,37 @@
|
|||
- transmission_with_openvpn
|
||||
when: (transmission_with_openvpn_enabled | default(False))
|
||||
|
||||
- role: ubooquity
|
||||
tags:
|
||||
- ubooquity
|
||||
when: (ubooquity_enabled | default(False))
|
||||
|
||||
- role: utorrent
|
||||
tags:
|
||||
- utorrent
|
||||
when: (utorrent_enabled | default(False))
|
||||
|
||||
- role: traefik
|
||||
- role: virtual_desktop
|
||||
tags:
|
||||
- traefik
|
||||
when: (traefik_enabled | default(False))
|
||||
- virtual_desktop
|
||||
when: (virtual_desktop_enabled | default(False))
|
||||
|
||||
- role: youtubedlmaterial
|
||||
- role: wallabag
|
||||
tags:
|
||||
- youtubedlmaterial
|
||||
when: (youtubedlmaterial_enabled | default(False))
|
||||
- wallabag
|
||||
when: (wallabag_enabled | default(False))
|
||||
|
||||
- role: watchtower
|
||||
tags:
|
||||
- watchtower
|
||||
when: (watchtower_enabled | default(False))
|
||||
|
||||
- role: youtubedlmaterial
|
||||
tags:
|
||||
- youtubedlmaterial
|
||||
when: (youtubedlmaterial_enabled | default(False))
|
||||
|
||||
- role: znc
|
||||
tags:
|
||||
- znc
|
||||
when: (znc_enabled | default(False))
|
||||
|
||||
tasks:
|
||||
- import_tasks: tasks/thelounge.yml
|
||||
when: (thelounge_enabled | default(False))
|
||||
tags: thelounge
|
||||
|
||||
- import_tasks: tasks/timemachine.yml
|
||||
when: (timemachine_enabled | default(False))
|
||||
tags: timemachine
|
||||
|
||||
- import_tasks: tasks/guacamole.yml
|
||||
when: (guacamole_enabled | default(False))
|
||||
tags: guacamole
|
||||
|
||||
- import_tasks: tasks/joomla.yml
|
||||
when: (joomla_enabled | default(False))
|
||||
tags: joomla
|
||||
|
||||
- import_tasks: tasks/wallabag.yml
|
||||
when: (wallabag_enabled | default(False))
|
||||
tags: wallabag
|
||||
|
||||
- import_tasks: tasks/calibre.yml
|
||||
when: (calibre_enabled | default(False))
|
||||
tags: calibre
|
||||
|
||||
- import_tasks: tasks/openhab.yml
|
||||
when: (openhab_enabled | default(False))
|
||||
tags: openhab
|
||||
|
||||
- import_tasks: tasks/krusader.yml
|
||||
when: (krusader_enabled | default(False))
|
||||
tags: krusader
|
||||
|
||||
- import_tasks: tasks/ubooquity.yml
|
||||
when: (ubooquity_enabled | default(False))
|
||||
tags: ubooquity
|
||||
|
||||
- import_tasks: tasks/virtual_desktop.yml
|
||||
when: (virtual_desktop_enabled | default(False))
|
||||
tags: virtual_desktop
|
||||
|
|
21
roles/calibre/defaults/main.yml
Normal file
21
roles/calibre/defaults/main.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
calibre_enabled: false
|
||||
calibre_available_externally: false
|
||||
|
||||
# uid / gid
|
||||
calibre_user_id: "0"
|
||||
calibre_group_id: "0"
|
||||
|
||||
# directories
|
||||
calibre_data_directory: "{{ docker_home }}/calibre"
|
||||
calibre_books_root: "{{ books_root }}"
|
||||
|
||||
# other
|
||||
calibre_ebook_conversion: "linuxserver/calibre-web:calibre"
|
||||
|
||||
# network
|
||||
calibre_port: "8084"
|
||||
calibre_hostname: "calibre"
|
||||
|
||||
# specs
|
||||
calibre_memory: 1g
|
|
@ -22,7 +22,7 @@
|
|||
ports:
|
||||
- "{{ calibre_port }}:8083"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
memory: "{{ calibre_memory }}"
|
||||
labels:
|
||||
traefik.enable: "{{ calibre_available_externally }}"
|
||||
traefik.http.routers.calibre.rule: "Host(`calibre.{{ ansible_nas_domain }}`)"
|
13
roles/guacamole/defaults/main.yml
Normal file
13
roles/guacamole/defaults/main.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
guacamole_enabled: false
|
||||
guacamole_available_externally: false
|
||||
|
||||
# directories
|
||||
guacamole_data_directory: "{{ docker_home }}/guacamole"
|
||||
|
||||
# network
|
||||
guacamole_port: "8090"
|
||||
guacamole_hostname: "guacamole"
|
||||
|
||||
# specs
|
||||
guacamole_memory: 1g
|
|
@ -25,9 +25,6 @@
|
|||
with_items:
|
||||
- "{{ guacamole_data_directory }}/mysql"
|
||||
|
||||
# docker run -v /home/david/.guac:/config:rw -p 8080:8080 oznu/guacamole
|
||||
|
||||
|
||||
- name: Guacamole Container
|
||||
docker_container:
|
||||
name: guacamole
|
||||
|
@ -38,10 +35,10 @@
|
|||
ports:
|
||||
- "{{ guacamole_port }}:8080"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
memory: "{{ guacamole_memory }}"
|
||||
labels:
|
||||
traefik.enable: "{{ guacamole_available_externally }}"
|
||||
traefik.http.routers.guacamole.rule: "Host(`guacamole.{{ ansible_nas_domain }}`)"
|
||||
traefik.enable: "{{ guacamole_available_externally | string }}"
|
||||
traefik.http.routers.guacamole.rule: "Host(`{{ guacamole_hostname }}.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.guacamole.tls.certresolver: "letsencrypt"
|
||||
traefik.http.routers.guacamole.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.guacamole.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
15
roles/joomla/defaults/main.yml
Normal file
15
roles/joomla/defaults/main.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
joomla_enabled: false
|
||||
joomla_available_externally: false
|
||||
|
||||
joomla_database_password: top_secret
|
||||
|
||||
# directories
|
||||
joomla_data_directory: "{{ docker_home }}/joomla"
|
||||
|
||||
# network
|
||||
joomla_port: "8181"
|
||||
joomla_hostname: "joomla"
|
||||
|
||||
# specs
|
||||
joomla_memory: 1g
|
|
@ -37,10 +37,10 @@
|
|||
JOOMLA_DB_USER: "root"
|
||||
JOOMLA_DB_PASSWORD: "{{ joomla_database_password }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
memory: "{{ joomla_memory }}"
|
||||
labels:
|
||||
traefik.enable: "{{ joomla_available_externally }}"
|
||||
traefik.http.routers.joomla.rule: "Host(`joomla.{{ ansible_nas_domain }}`)"
|
||||
traefik.enable: "{{ joomla_available_externally | string }}"
|
||||
traefik.http.routers.joomla.rule: "Host(`{{ joomla_hostname}}.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.joomla.tls.certresolver: "letsencrypt"
|
||||
traefik.http.routers.joomla.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.joomla.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
22
roles/krusader/defaults/main.yml
Normal file
22
roles/krusader/defaults/main.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
krusader_enabled: false
|
||||
krusader_available_externally: false
|
||||
|
||||
krusader_secure_connection: "0"
|
||||
krusader_vnc_password: "topsecret"
|
||||
|
||||
# uid / gid
|
||||
krusader_user_id: "0"
|
||||
krusader_group_id: "0"
|
||||
|
||||
# directories
|
||||
krusader_config_directory: "{{ docker_home }}/krusader/config"
|
||||
krusader_browse_directory: "/"
|
||||
|
||||
# network
|
||||
krusader_port_http: "5800"
|
||||
krusader_port_vnc: "5900"
|
||||
krusader_hostname: "krusader"
|
||||
|
||||
# specs
|
||||
krusader_memory: 1g
|
|
@ -24,10 +24,10 @@
|
|||
TZ: "{{ ansible_nas_timezone }}"
|
||||
VNC_PASSWORD: "{{ krusader_vnc_password }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
memory: "{{ krusader_memory }}"
|
||||
labels:
|
||||
traefik.enable: "{{ krusader_available_externally }}"
|
||||
traefik.http.routers.krusader.rule: "Host(`krusader.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.krusader.rule: "Host(`{{ krusader_hostname }}.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.krusader.tls.certresolver: "letsencrypt"
|
||||
traefik.http.routers.krusader.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.krusader.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
14
roles/openhab/defaults/main.yml
Normal file
14
roles/openhab/defaults/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
openhab_enabled: false
|
||||
openhab_available_externally: false
|
||||
|
||||
# directories
|
||||
openhab_data_directory: "{{ docker_home }}/openhab"
|
||||
|
||||
# network
|
||||
openhab_port_http: "7777"
|
||||
openhab_port_https: "7778"
|
||||
openhab_hostname: "openhab"
|
||||
|
||||
# specs
|
||||
openhab_memory: 1g
|
|
@ -30,7 +30,7 @@
|
|||
- name: Create openHAB container
|
||||
docker_container:
|
||||
name: openHAB
|
||||
image: "{{ openhab_docker_image }}"
|
||||
image: openhab/openhab
|
||||
pull: true
|
||||
network_mode: "host"
|
||||
volumes:
|
||||
|
@ -43,10 +43,10 @@
|
|||
OPENHAB_HTTP_PORT: "{{ openhab_port_http }}"
|
||||
OPENHAB_HTTPS_PORT: "{{ openhab_port_https }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
memory: "{{ openhab_memory }}"
|
||||
labels:
|
||||
traefik.enable: "{{ openhab_available_externally }}"
|
||||
traefik.http.routers.openhab.rule: "Host(`openhab.{{ ansible_nas_domain }}`)"
|
||||
traefik.enable: "{{ openhab_available_externally | string}}"
|
||||
traefik.http.routers.openhab.rule: "Host(`{{ openhab_hostname }}.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.openhab.tls.certresolver: "letsencrypt"
|
||||
traefik.http.routers.openhab.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.openhab.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
14
roles/thelounge/defaults/main.yml
Normal file
14
roles/thelounge/defaults/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
thelounge_enabled: false
|
||||
thelounge_available_externally: false
|
||||
|
||||
# Directories
|
||||
thelounge_data_directory: "{{ docker_home }}/thelounge"
|
||||
|
||||
# Networking
|
||||
thelounge_port_one: "113"
|
||||
thelounge_port_two: "9002"
|
||||
thelounge_hostname: thelounge
|
||||
|
||||
# Container
|
||||
thelounge_memory: 1g
|
|
@ -25,10 +25,10 @@
|
|||
- "{{ thelounge_data_directory }}:/var/opt/thelounge"
|
||||
- "/var/run/dbus:/var/run/dbus"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
memory: "{{ thelounge_memory }}"
|
||||
labels:
|
||||
traefik.enable: "{{ thelounge_available_externally }}"
|
||||
traefik.http.routers.thelounge.rule: "Host(`thelounge.{{ ansible_nas_domain }}`)"
|
||||
traefik.enable: "{{ thelounge_available_externally | string }}"
|
||||
traefik.http.routers.thelounge.rule: "Host(`{{ thelounge_hostname }}.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.thelounge.tls.certresolver: "letsencrypt"
|
||||
traefik.http.routers.thelounge.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.thelounge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
16
roles/timemachine/defaults/main.yml
Normal file
16
roles/timemachine/defaults/main.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
timemachine_enabled: false
|
||||
|
||||
timemachine_volume_size_limit: "0"
|
||||
timemachine_password: timemachine
|
||||
timemachine_share_name: Data
|
||||
timemachine_log_level: error
|
||||
|
||||
# Directories
|
||||
timemachine_data_directory: "{{ docker_home }}/timemachine"
|
||||
|
||||
# Networking
|
||||
timemachine_port: "10445"
|
||||
|
||||
# Container
|
||||
timemachine_memory: 1g
|
|
@ -21,7 +21,7 @@
|
|||
- "nofile:1048576:1048576"
|
||||
network_mode: bridge
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
memory: "{{ timemachine_memory }}"
|
||||
|
||||
- name: Install avahi
|
||||
apt:
|
18
roles/ubooquity/defaults/main.yml
Normal file
18
roles/ubooquity/defaults/main.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
ubooquity_enabled: false
|
||||
ubooquity_available_externally: false
|
||||
|
||||
# uid / gid
|
||||
ubooquity_user_id: "0"
|
||||
ubooquity_group_id: "0"
|
||||
|
||||
# Directories
|
||||
ubooquity_data_directory: "{{ docker_home }}/ubooquity"
|
||||
|
||||
# Networking
|
||||
ubooquity_port_webui: "2202"
|
||||
ubooquity_port_admin: "2203"
|
||||
ubooquity_hostname: ubooquity
|
||||
|
||||
# Container
|
||||
ubooquity_memory: 1g
|
|
@ -25,9 +25,10 @@
|
|||
- "{{ ubooquity_port_webui }}:2202"
|
||||
- "{{ ubooquity_port_admin }}:2203"
|
||||
restart_policy: unless-stopped
|
||||
memory: "{{ ubooquity_memory }}"
|
||||
labels:
|
||||
traefik.enable: "{{ ubooquity_available_externally }}"
|
||||
traefik.http.routers.ubooquity.rule: "Host(`ubooquity.{{ ansible_nas_domain }}`)"
|
||||
traefik.enable: "{{ ubooquity_available_externally | string }}"
|
||||
traefik.http.routers.ubooquity.rule: "Host(`{{ ubooquity }}.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.ubooquity.tls.certresolver: "letsencrypt"
|
||||
traefik.http.routers.ubooquity.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.ubooquity.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
22
roles/virtual_desktop/defaults/main.yml
Normal file
22
roles/virtual_desktop/defaults/main.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
virtual_desktop_enabled: false
|
||||
|
||||
virtual_desktop_docker_image: "rattydave/docker-ubuntu-xrdp-mate-custom:20.04-tools"
|
||||
|
||||
virtual_desktop_users:
|
||||
- username: "{{ ansible_nas_user }}"
|
||||
password: "topsecret"
|
||||
sudo: "Y"
|
||||
|
||||
# uid / gid
|
||||
virtual_desktop_user_id: "0"
|
||||
virtual_desktop_group_id: "0"
|
||||
|
||||
# Directories
|
||||
virtual_desktop_data_directory: "{{ docker_home }}/virtual_desktop"
|
||||
|
||||
# Networking
|
||||
virtual_desktop_rdp_port: 3389
|
||||
|
||||
# Container
|
||||
virtual_desktop_memory: 2g
|
|
@ -4,27 +4,27 @@
|
|||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ vd_data_directory }}"
|
||||
- "{{ vd_data_directory }}/home"
|
||||
- "{{ virtual_desktop_data_directory }}"
|
||||
- "{{ virtual_desktop_data_directory }}/home"
|
||||
|
||||
- name: Create users file
|
||||
template:
|
||||
src: "templates/virtual_desktop/users.txt.j2"
|
||||
dest: "{{ vd_data_directory }}/users.txt"
|
||||
dest: "{{ virtual_desktop_data_directory }}/users.txt"
|
||||
|
||||
- name: Virtual Desktop Container
|
||||
docker_container:
|
||||
name: virtual_desktop
|
||||
image: "{{ vd_docker_image }}"
|
||||
image: "{{ virtual_desktop_docker_image }}"
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ vd_data_directory }}/users.txt:/root/createusers.txt:ro"
|
||||
- "{{ vd_data_directory }}/home:/home:rw"
|
||||
- "{{ virtual_desktop_data_directory }}/users.txt:/root/createusers.txt:ro"
|
||||
- "{{ virtual_desktop_data_directory }}/home:/home:rw"
|
||||
- "{{ samba_shares_root }}:/samba:rw"
|
||||
- "{{ docker_home }}:/docker:rw"
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
ports:
|
||||
- "{{ vd_rdp_port }}:3389"
|
||||
- "{{ virtual_desktop_rdp_port }}:3389"
|
||||
privileged: true
|
||||
restart_policy: unless-stopped
|
||||
memory: 2g
|
||||
memory: "{{ virtual_desktop_memory }}"
|
13
roles/wallabag/defaults/main.yml
Normal file
13
roles/wallabag/defaults/main.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
wallabag_enabled: false
|
||||
wallabag_available_externally: false
|
||||
|
||||
# Directories
|
||||
wallabag_data_directory: "{{ docker_home }}/wallabag"
|
||||
|
||||
# Networking
|
||||
wallabag_port: "7780"
|
||||
wallabag_hostname: wallabag
|
||||
|
||||
# Container
|
||||
wallabag_memory: 1g
|
|
@ -20,10 +20,10 @@
|
|||
env:
|
||||
SYMFONY__ENV__DOMAIN_NAME: "https://wallabag.{{ ansible_nas_domain }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
memory: "{{ wallabag_memory }}"
|
||||
labels:
|
||||
traefik.enable: "{{ wallabag_available_externally }}"
|
||||
traefik.http.routers.wallabag.rule: "Host(`wallabag.{{ ansible_nas_domain }}`)"
|
||||
traefik.enable: "{{ wallabag_available_externally | string }}"
|
||||
traefik.http.routers.wallabag.rule: "Host(`{{ wallabag_hostname }}.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.wallabag.tls.certresolver: "letsencrypt"
|
||||
traefik.http.routers.wallabag.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.wallabag.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
@ -1 +1 @@
|
|||
{% for user in vd_users %}{{ user.username }}:{{ user.password }}:{{ user.sudo }}{% endfor %}
|
||||
{% for user in virtual_desktop_users %}{{ user.username }}:{{ user.password }}:{{ user.sudo }}{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue