---
# dwm.yml tasks
- name: dwm - apt dependenices
  apt:
    name: "{{ item }}"
    state: latest
  become: yes
  tags: [dwm, apt]
  with_items:
   - xinit
   - build-essential
   - libx11-dev
   - libxft-dev
   - libxinerama-dev
   - sharutils
   - suckless-tools      
  
- name: dwm - git clone
  git:
    repo: git@github.com:bryfry/dwm.git
    dest: "{{ dwm_dir }}"
  ignore_errors: yes
  tags: dwm

- name: dwm - compile
  command: "{{ item }}"
  args: 
    chdir: "{{ dwm_dir }}"
  tags: dwm
  with_items:
  - make clean
  - make 
  
- name: dwm - install
  command: make install
  args: 
    chdir: "{{ dwm_dir }}"
  tags: dwm
  become: true
