---
  - name: Install desktop packages
    apt:
      pkg:
        - lubuntu-desktop
        - xorg
        - tigervnc-standalone-server
        - firefox
        - baobab
        - file-roller
        - galculator
        - hardinfo
        - hexchat
        - imagemagick
        - lxappearance
        - synaptic
        - transmission-gtk
        - xrdp
        - xorgxrdp
      state: latest
      update_cache: yes

  - name: Set default target to graphical
    command: systemctl set-default graphical.target

  - name: Start lightdm
    service: name=lightdm state=started enabled=yes

  - name: root .xsession file
    template: src=xsession dest=/root/.xsession owner=root

  - name: dylan .xsession file
    template: src=xsession dest=/home/dylan/.xsession owner=dylan

  - name: Set new_cursors value to false
    command: sed -e 's/^new_cursors=true/new_cursors=false/g' -i /etc/xrdp/xrdp.ini

  - name: Start xrdp
    service: name=xrdp state=started enabled=yes

---
  - name: Install desktop packages
    apt:
      pkg:
        - lubuntu-desktop
        - xorg
        - tigervnc-standalone-server
        - firefox
        - baobab
        - file-roller
        - galculator
        - hardinfo
        - hexchat
        - imagemagick
        - lxappearance
        - synaptic
        - transmission-gtk
        - xrdp
        - xorgxrdp
      state: latest
      update_cache: yes

  - name: Set default target to graphical
    command: systemctl set-default graphical.target

  - name: root .xsession file
    template: src=xsession dest=/root/.xsession owner=root

  - name: dylan .xsession file
    template: src=xsession dest=/home/dylan/.xsession owner=dylan

  - name: Set new_cursors value to false
    command: sed -e 's/^new_cursors=true/new_cursors=false/g' -i /etc/xrdp/xrdp.ini

  - name: Start xrdp
    service: name=xrdp state=started enabled=yes

Remove command to start lightdm
Remove command to start lightdm