diff --git a/README.md b/README.md index 8b705b2b..41e1b56e 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/applications/guacamole.md b/docs/applications/guacamole.md index 9e15ad13..79d74185 100644 --- a/docs/applications/guacamole.md +++ b/docs/applications/guacamole.md @@ -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//nas.yml` fil ## Specific Configuration -The default username and password is `guacadmin`. Change it! \ No newline at end of file +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). \ No newline at end of file diff --git a/docs/applications/virtual_desktop.md b/docs/applications/virtual_desktop.md new file mode 100644 index 00000000..e3ae18ef --- /dev/null +++ b/docs/applications/virtual_desktop.md @@ -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//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). \ No newline at end of file diff --git a/group_vars/all.yml b/group_vars/all.yml index b3bbfaa0..6bbe13d2 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -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" \ No newline at end of file +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 \ No newline at end of file diff --git a/nas.yml b/nas.yml index 487e2940..f74093df 100644 --- a/nas.yml +++ b/nas.yml @@ -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 diff --git a/tasks/virtual_desktop.yml b/tasks/virtual_desktop.yml new file mode 100644 index 00000000..90da6605 --- /dev/null +++ b/tasks/virtual_desktop.yml @@ -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 diff --git a/templates/virtual_desktop/users.txt.j2 b/templates/virtual_desktop/users.txt.j2 new file mode 100644 index 00000000..759d451d --- /dev/null +++ b/templates/virtual_desktop/users.txt.j2 @@ -0,0 +1 @@ +{% for user in vd_users %}{{ user.username }}:{{ user.password }}:{{ user.sudo }}{% endfor %}