prometheus/client/tasks/main.yaml
changeset 5 4f014cdac0b1
parent 2 2556522a2a45
child 6 3b1f18f6a5a4
equal deleted inserted replaced
4:46fe3aa0080c 5:4f014cdac0b1
     1 ---
     1 ---
     2 
     2 
     3 - name: install prometheus node exporter
     3 - name: install prometheus node exporter
     4   apt: name="prometheus-node-exportery"
     4   become: yes
       
     5   apt: name="{{prometheus_client_apt_packages}}"
       
     6 
       
     7 - name: add prometheus user to video group for GPU stats
       
     8   become: yes
       
     9   user: name="prometheus" groups="video" append="yes"
       
    10 
       
    11 - name: install prometheus rpi exporter
       
    12   unarchive:
       
    13     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"
       
    14     remote_src: yes
       
    15     dest: "/tmp/"
       
    16 
       
    17 - name: install systemd service for rpi exporter
       
    18   become: yes
       
    19   copy:
       
    20     src: "/tmp/{{prometheus_client_rpi_dest}}/rpi_exporter.service"
       
    21     remote_src: yes
       
    22     dest: "/lib/systemd/system/rpi_exporter.service"
       
    23 
       
    24 - name: install rpi exporter binary
       
    25   become: yes
       
    26   copy:
       
    27     src: "/tmp/{{prometheus_client_rpi_dest}}/rpi_exporter"
       
    28     remote_src: yes
       
    29     dest: "/usr/local/bin/rpi_exporter"
       
    30     mode: "0755"
       
    31 
       
    32 - name: ensure systemd services are started
       
    33   become: yes
       
    34   systemd: name="rpi_exporter.service" enabled="yes" state="started"