---
# sourcecodepro.yml tasks
- name: source code pro - fonts dependencies
  apt: 
    name: fontconfig 
    state: latest
  become: yes
  tags: [font, apt]

- name: source code pro - fonts dir 
  file: 
    path: "{{ item }}"
    state: directory
  tags: font
  with_items:
  - "{{ fonts_dir }}"
 
- name: source code pro - fetch
  unarchive:
    src: "{{ scp_url }}" 
    dest: /tmp 
    copy: no
  tags: font

- name: source code pro - place in fonts folder
  copy:
    src: /tmp/{{ scp_dir }}/OTF/
    dest: "{{ fonts_dir }}" 
    remote_src: no
  tags: font

- name: source code pro - font cache update
  command: fc-cache -f -v
  tags: font
