ansible-nas/roles/virtual_desktop/tasks/main.yml

31 lines
936 B
YAML
Raw Normal View History

2020-01-25 12:17:08 +00:00
---
- name: Create Virtual Desktop Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ virtual_desktop_data_directory }}"
- "{{ virtual_desktop_data_directory }}/home"
2020-01-25 12:17:08 +00:00
- name: Create users file
template:
src: "templates/virtual_desktop/users.txt.j2"
dest: "{{ virtual_desktop_data_directory }}/users.txt"
2020-01-25 12:17:08 +00:00
- name: Virtual Desktop Container
docker_container:
name: virtual_desktop
image: "{{ virtual_desktop_docker_image }}"
2020-01-25 12:17:08 +00:00
pull: true
volumes:
- "{{ virtual_desktop_data_directory }}/users.txt:/root/createusers.txt:ro"
- "{{ virtual_desktop_data_directory }}/home:/home:rw"
2020-01-25 12:17:08 +00:00
- "{{ samba_shares_root }}:/samba:rw"
- "{{ docker_home }}:/docker:rw"
- "/etc/timezone:/etc/timezone:ro"
ports:
- "{{ virtual_desktop_rdp_port }}:3389"
2020-01-25 12:17:08 +00:00
privileged: true
restart_policy: unless-stopped
memory: "{{ virtual_desktop_memory }}"