Add virtual desktop support

This commit is contained in:
David Stephens 2020-01-25 12:17:08 +00:00
parent 151200e3ed
commit cc78a2cebc
7 changed files with 85 additions and 3 deletions

View file

@ -78,6 +78,7 @@ Ansible config and a bunch of Docker containers.
* [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)
* [Ubooquity](http://vaemendis.net/ubooquity/) - Book and comic server
* [Virtual Desktop](https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom) - A virtual desktop running on your NAS.
* [Wallabag](https://wallabag.org/) - Save and classify articles. Read them later.
* [Watchtower](https://github.com/v2tec/watchtower) - Monitor your Docker containers and update them if a new version is available
* [ZNC](https://wiki.znc.in/ZNC) - IRC bouncer to stay connected to favourite IRC networks and channels

View file

@ -1,4 +1,4 @@
# Jellyfin
# Guacamole
Homepage: [hhttps://guacamole.apache.org/](https://guacamole.apache.org/)
@ -10,4 +10,8 @@ Set `guacamole_enabled: true` in your `inventories/<your_inventory>/nas.yml` fil
## Specific Configuration
The default username and password is `guacadmin`. Change it!
The default username and password is `guacadmin`. Change it!
## What to connect to?
You can run a virtual desktop from your Ansible-NAS box, check out the [docs](virtual_desktop).

View file

@ -0,0 +1,30 @@
# Virtual Desktop
It's possible to run a cut down desktop within a Docker container. We use [RattyDAVE's custom Ubuntu Mate image](https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom).
## Usage
Set `virtual_desktop_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
## Specific Configuration
By default `{{ ansible_nas_user }}` will be granted access with a password of `topsecret` with sudo rights. To change or add additional users override `vd_users` in your `nas.yml`:
```
vd_users:
- username: "{{ ansible_nas_user }}"
password: "topsecret"
sudo: "Y"
- username: "larrylaffer"
password: "kensentme"
sudo: "Y"
```
## Mounts
`{{ samba_shares_root }}` is mounted to `/samba`.
`{{ docker_home }}` is mounted to `/docker`.
## Remote Access
It's possible to access your virtual desktop through a web browser! Check out [Guacamole](guacamole).

View file

@ -56,6 +56,7 @@ netdata_enabled: false
watchtower_enabled: false
cloudflare_ddns_enabled: false
cloudcmd_enabled: false
virtual_desktop_enabled: false
# Backup & Restore
duplicati_enabled: false
@ -793,4 +794,15 @@ ubooquity_port_admin: "2203"
###
serposcope_data_directory: "{{ docker_home }}/serposcope"
serposcope_port: 7134
serposcope_available_externally: "false"
serposcope_available_externally: "false"
###
### Virtual Desktop
###
vd_data_directory: "{{ docker_home }}/virtual_desktop"
vd_docker_image: "rattydave/docker-ubuntu-xrdp-mate-custom:19.10-tools"
vd_users:
- username: "{{ ansible_nas_user }}"
password: "topsecret"
sudo: "Y"
vd_rdp_port: 3389

View file

@ -219,3 +219,7 @@
- import_tasks: tasks/serposcope.yml
when: (serposcope_enabled | default(False))
tags: serposcope
- import_tasks: tasks/virtual_desktop.yml
when: (virtual_desktop_enabled | default(False))
tags: virtual_desktop

30
tasks/virtual_desktop.yml Normal file
View file

@ -0,0 +1,30 @@
---
- name: Create Virtual Desktop Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ vd_data_directory }}"
- "{{ vd_data_directory }}/home"
- name: Create users file
template:
src: "templates/virtual_desktop/users.txt.j2"
dest: "{{ vd_data_directory }}/users.txt"
- name: Virtual Desktop Container
docker_container:
name: virtual_desktop
image: "{{ vd_docker_image }}"
pull: true
volumes:
- "{{ vd_data_directory }}/users.txt:/root/createusers.txt:ro"
- "{{ vd_data_directory }}/home:/home:rw"
- "{{ samba_shares_root }}:/samba:rw"
- "{{ docker_home }}:/docker:rw"
- "/etc/timezone:/etc/timezone:ro"
ports:
- "{{ vd_rdp_port }}:3389"
privileged: true
restart_policy: unless-stopped
memory: 2g

View file

@ -0,0 +1 @@
{% for user in vd_users %}{{ user.username }}:{{ user.password }}:{{ user.sudo }}{% endfor %}