---
# slock.yml tasks
- name: slock - apt dependenices
  apt:
    name: "{{ item }}"
    state: latest
  become: yes
  tags: [slock, apt]
  with_items:
   - build-essential
   - libxrandr-dev

- name: slock - git clone
  git:
    repo: git@github.com:bryfry/slock.git
    dest: "{{ slock_dir }}"
  tags: slock

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