---
- name: Install LibreOffice
  pacman:
    name: libreoffice-fresh
    state: present

- name: Jail LibreOffice
  file:
    src: /usr/bin/firejail
    dest: /usr/local/bin/libreoffice
    state: link
  tags:
    - firejail

- name: Verify LibreOffice firejail local profile exists
  copy:
    content: ""
    dest: /etc/firejail/libreoffice.local
    force: false
  tags:
    - firejail

- name: Restrict LibreOffice network access
  lineinfile:
    dest: /etc/firejail/libreoffice.local
    regexp: "^net"
    line: "net none"
  tags:
    - firejail

- name: Restrict LibreOffice access to /etc
  lineinfile:
    dest: /etc/firejail/libreoffice.local
    regexp: "^private-etc"
    line: "private-etc firejail,libreoffice,fonts,passwd"
  tags:
    - firejail

- name: Install enscript
  pacman:
    name: enscript
    state: present

- name: Install Simple Scan
  pacman:
    name: simple-scan
    state: present

- name: Install pandoc
  pacman:
    name: pandoc-cli
    state: present

- name: Install texlive-basic
  pacman:
    name: texlive-basic
    state: present

- name: Install texlive-latexextra
  pacman:
    name: texlive-latexextra
    state: present

- name: Install texlive-binextra
  pacman:
    name: texlive-binextra
    state: present

- name: Install qalculate
  pacman:
    name: qalculate-gtk
    state: present

- name: Install GNU Plot
  pacman:
    name: gnuplot
    state: present

- name: Install xsv
  kewlfft.aur.aur:
    name: xsv
  become: yes
  become_user: "{{ aur.user }}"
  tags:
    - aur

- name: Install epy
  kewlfft.aur.aur:
    name: epy-git
  become: yes
  become_user: "{{ aur.user }}"
  tags:
    - aur

- name: Install csvkit
  pacman:
    name: csvkit
    state: present
