ansible-nas/roles/virtual_desktop/tasks/main.yml
HitLuca 59e47c4ebf 🏗️ 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
2022-07-27 10:41:17 +02:00

30 lines
936 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: "templates/virtual_desktop/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 }}"