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.

74 line
1.6KB

  1. ---
  2. - name: assert valid state
  3. assert:
  4. that: display_manager_state in _display_manager_valid_states
  5. msg: "'display_manager_state' must be one of: {{_display_manager_valid_states | join(', ') }}"
  6. - name: make sure no other display managers are installed
  7. apt:
  8. pkg: "{{ item }}"
  9. state: absent
  10. with_items:
  11. - slim
  12. - gdm3
  13. - kdm
  14. - sddm
  15. - name: install packages
  16. apt:
  17. pkg: "{{ item }}"
  18. state: installed
  19. with_items:
  20. - xserver-xorg
  21. - xserver-xorg-video-all
  22. - xserver-xorg-input-all
  23. - x11-xserver-utils
  24. - lightdm
  25. - lightdm-gtk-greeter
  26. - onboard
  27. notify: restart lightdm
  28. - import_tasks: maintenance.yml
  29. when: display_manager_state == 'maintenance'
  30. - name: lightdm configuration
  31. template:
  32. src: lightdm.conf.j2
  33. dest: /etc/lightdm/lightdm.conf
  34. notify: restart lightdm
  35. - name: lightdm gtk-greeter configuration
  36. template:
  37. src: lightdm-gtk-greeter.conf.j2
  38. dest: /etc/lightdm/lightdm-gtk-greeter.conf
  39. notify: restart lightdm
  40. - name: lightdm display setup script
  41. template:
  42. src: display-setup.sh.j2
  43. dest: /etc/lightdm/display-setup.sh
  44. mode: u=rwx,g=rx,o=rx
  45. when: display_setup_commands is defined
  46. notify: restart lightdm
  47. - name: background image directory
  48. file:
  49. path: /usr/share/lightdm/background
  50. state: directory
  51. - name: background image
  52. copy:
  53. src: "{{display_manager_background_image}}"
  54. dest: "{{ display_manager_background_image_path }}"
  55. - name: lightdm started
  56. service:
  57. name: lightdm
  58. state: started
  59. enabled: yes
  60. - meta: flush_handlers
  61. - import_tasks: cleanup-litter.yaml