---
# lastpass.yml tasks
- name: lastpass - apt dependencies
  apt: 
    name: "{{ item }}"
    state: latest
  become: yes
  tags: [lastpass, apt]
  with_items:
  - openssl
  - libcurl4-openssl-dev
  - libxml2
  - libssl-dev
  - libxml2-dev
  - libxml2
  - pinentry-curses
  - xclip
  - asciidoc

- name: lastpass - git clone
  git:
    repo: https://github.com/lastpass/lastpass-cli.git
    dest: "{{ lastpass_dir }}"
  tags: lastpass

- name: lastpass - compile
  command: "{{ item }}"
  args: 
    chdir: "{{ lastpass_dir }}"
  tags: lastpass
  with_items:
  - make clean
  - make 

- name: lastpass - install
  command: "{{ item }}"
  args: 
    chdir: "{{ lastpass_dir }}"
  become: true
  tags: lastpass
  with_items:
  - make install
  - make install-doc
