---
- name: Install RedShift and dependencies
  pacman:
    name:
      - librsvg
      - python-gobject
      - python-xdg
      - redshift
    state: present

- name: Jail RedShift
  file:
    src: /usr/bin/firejail
    dest: /usr/local/bin/redshift
    state: link
  tags:
    - firejail

- name: Jail RedShift GTK
  file:
    src: /usr/bin/firejail
    dest: /usr/local/bin/redshift-gtk
    state: link
  tags:
    - firejail

- name: Push RedShift GTK firejail profile
  copy:
    src: firejail/redshift-gtk.profile
    dest: /usr/local/etc/firejail/redshift-gtk.profile
  notify:
    - activate firejail profiles
  tags:
    - firejail
