ansible-nas/tasks/virtual_desktop.yml
2020-01-25 12:17:08 +00:00

30 lines
817 B
YAML

---
- 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