prometheus/rpi-client/tasks/main.yaml
changeset 6 3b1f18f6a5a4
child 8 20975062661d
equal deleted inserted replaced
5:4f014cdac0b1 6:3b1f18f6a5a4
       
     1 ---
       
     2 
       
     3 - name: add prometheus user to video group for rpi GPU stats
       
     4   become: yes
       
     5   user: name="prometheus" groups="video" append="yes"
       
     6 
       
     7 - name: install prometheus rpi exporter
       
     8   unarchive:
       
     9     src: "https://github.com/lukasmalkmus/rpi_exporter/releases/download/v{{prometheus_client_rpi_exporter_version}}/rpi_exporter-{{prometheus_client_rpi_exporter_version}}.linux-{{prometheus_client_arch}}.tar.gz"
       
    10     remote_src: yes
       
    11     dest: "/tmp/"
       
    12 
       
    13 - name: install systemd service for rpi-exporter
       
    14   become: yes
       
    15   copy:
       
    16     src: "/tmp/{{prometheus_client_rpi_dest}}/rpi_exporter.service"
       
    17     remote_src: yes
       
    18     dest: "/lib/systemd/system/rpi_exporter.service"
       
    19 
       
    20 - name: install rpi-exporter binary
       
    21   become: yes
       
    22   copy:
       
    23     src: "/tmp/{{prometheus_client_rpi_dest}}/rpi_exporter"
       
    24     remote_src: yes
       
    25     dest: "/usr/local/bin/rpi_exporter"
       
    26     mode: "0755"
       
    27 
       
    28 - name: ensure systemd service is started
       
    29   become: yes
       
    30   systemd: name="rpi_exporter.service" enabled="yes" state="started"