ansible-nas/roles/virtual_desktop/tasks/main.yml
2022-08-20 19:14:23 +01:00

30 lines
910 B
YAML

---
- name: Create Virtual Desktop Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ virtual_desktop_data_directory }}"
- "{{ virtual_desktop_data_directory }}/home"
- name: Create users file
template:
src: "users.txt.j2"
dest: "{{ virtual_desktop_data_directory }}/users.txt"
- name: Virtual Desktop Container
docker_container:
name: virtual_desktop
image: "{{ virtual_desktop_docker_image }}"
pull: true
volumes:
- "{{ 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:
- "{{ virtual_desktop_rdp_port }}:3389"
privileged: true
restart_policy: unless-stopped
memory: "{{ virtual_desktop_memory }}"