---
# tasks file for ubuntu-desktop
- name: install apt requirements
  apt: pkg=aptitude

- name: upgrade the system
  apt: update_cache=yes upgrade=safe cache_valid_time=3600

- name: install Ubuntu Desktop packages
  apt: name={{ item }} install_recommends=no state=latest
  with_items:
    - ubuntu-desktop
    - gnome-session-flashback   # Ubuntu Classic without effects
    - gnome-terminal
    - indicator-session        # add the session applet to the top panel
    - unity-lens-applications  # fix empty dash
    - ttf-ubuntu-font-family   # fix letters overlapping in the terminal

- name: update XDG directory configuration for user account
  command: xdg-user-dirs-update
  become: yes
  become_user: "{{ desktop_user }}"

- name: set default session and enable autologin
  template: dest=/etc/lightdm/lightdm.conf src=lightdm.conf.j2
  notify: restart lightdm

- name: disable desktop lock-screen
  gsetting: user={{ desktop_user }}
            key=org.gnome.desktop.screensaver.ubuntu-lock-on-suspend
            value=false

---
# tasks file for ubuntu-desktop
- name: install apt requirements
  apt: pkg=aptitude

- name: upgrade the system
  apt: update_cache=yes upgrade=safe cache_valid_time=3600

- name: install Ubuntu Desktop packages
  apt: name={{ item }} install_recommends=no state=latest
  with_items:
    - ubuntu-desktop
    - gnome-session-flashback   # Ubuntu Classic without effects
    - gnome-terminal
    - indicator-session        # add the session applet to the top panel
    - unity-lens-applications  # fix empty dash
    - ttf-ubuntu-font-family   # fix letters overlapping in the terminal

- name: update XDG directory configuration for user account
  command: xdg-user-dirs-update
  become: yes
  become_user: "{{ desktop_user }}"

- name: set default session and enable autologin
  template: dest=/etc/lightdm/lightdm.conf src=lightdm.conf.j2
  notify: restart lightdm

- name: disable screen backout
  gsetting: user={{ desktop_user }}
            key=org.gnome.desktop.session.idle-delay
            value=0

- name: disable the screen lock
  gsetting: user={{ desktop_user }}
            key=org.gnome.desktop.screensaver.lock-enabled
            value=false

Fix disable the screen lock
Fix disable the screen lock
