You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

69 lines
1.3KB

  1. ---
  2. - name: vnc directory
  3. file:
  4. path: ~/.vnc
  5. state: directory
  6. mode: 0700
  7. - name: vnc config
  8. template:
  9. src: vnc/config.j2
  10. dest: ~/.vnc/config
  11. mode: 0644
  12. - name: vnc env
  13. template:
  14. src: vnc/vncserver.env.j2
  15. dest: ~/.vnc/vncserver.env
  16. mode: 0644
  17. - name: vnc server config
  18. template:
  19. src: vnc/vnc.conf.j2
  20. dest: ~/.vnc/vnc.conf
  21. mode: 0644
  22. - name: vnc passwd
  23. copy:
  24. content: "{{ lookup('pipe','pwgen 24 1' )}}"
  25. dest: ~/.vnc/passwd
  26. mode: 0600
  27. force: no
  28. - name: fetch vnc passwd
  29. fetch:
  30. src: ~/.vnc/passwd
  31. dest: ~/.vnc/passwd.{{inventory_hostname}}
  32. flat: yes
  33. - name: copy vnc passwd files
  34. copy:
  35. src: ~/.vnc/passwd.{{item}}
  36. dest: ~/.vnc/passwd.{{item}}
  37. with_items: "{{ home_access_to_hosts }}"
  38. - name: default vnc client options
  39. template:
  40. src: vnc/default.tigervnc.j2
  41. dest: ~/.vnc/default.tigervnc
  42. mode: 0755
  43. - name: vncserver user service
  44. template:
  45. src: vnc/vncserver.service.j2
  46. dest: ~/.config/systemd/user/vncserver@.service
  47. notify: systemd daemon-reload
  48. - name: Xvnc-session script
  49. template:
  50. src: vnc/Xvnc-session.j2
  51. dest: ~/.vnc/Xvnc-session
  52. mode: 0755
  53. - name: vnc xsession script
  54. template:
  55. src: vnc/xsession.j2
  56. dest: ~/.vnc/xsession
  57. mode: 0755