--- ## TODO: pin version - name: install apt packages apt: name: prom-exporter-ssl state: present - name: create config directory file: path: /etc/prometheus/exporter/ssl state: directory - name: generate configuration template: src: config.yml.j2 dest: /etc/prometheus/exporter/ssl/config.yml notify: restart prometheus-ssl-exporter - name: generate systemd service unit template: src: service.j2 dest: /etc/systemd/system/prometheus-ssl-exporter.service notify: restart prometheus-ssl-exporter - name: make sure prometheus-ssl-exporter is enabled and started systemd: name: prometheus-ssl-exporter.service daemon_reload: yes state: started enabled: yes - name: register exporter copy: content: | location = /ssl { proxy_pass http://127.0.0.1:9219/metrics; } location = /ssl/probe { proxy_pass http://127.0.0.1:9219/probe; } dest: /etc/prometheus/exporter/ssl.locations notify: reload nginx