---
- name: Install RQ Exporter Python Package
  become: yes
  become_user: jingrow
  pip:
    name: rq-exporter
    virtualenv: /home/jingrow/jingrow-bench/env
    virtualenv_python: /home/jingrow/jingrow-bench/env/bin/python

- name: Create RQ Exporter Systemd Service File
  template:
    src: rq-exporter.service
    dest: /etc/systemd/system/rq-exporter.service
    owner: root
    group: root
    mode: 0644

- name: Start RQ Exporter Service
  systemd:
    daemon_reload: true
    name: rq-exporter
    enabled: yes
    state: started
