blob: c69c6e05f285b5b017b62f8c084539f02e2e37b9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
---
- name: check if prometheus apt component of spreadspace repo is enabled
assert:
msg: "please enable the 'prometheus' component of spreadspace repo using 'spreadspace_apt_repo_components'"
that:
- spreadspace_apt_repo_components is defined
- "'prometheus' in spreadspace_apt_repo_components"
- name: add user for prometheus-exporter
user:
name: prometheus-exporter
system: yes
home: /nonexistent
create_home: no
- name: create base directory for exporter configs
file:
path: /etc/prometheus/exporter
state: directory
- name: create TLS certificate and key
import_tasks: tls.yml
- name: configure nginx vhost
import_role:
name: nginx/vhost
vars:
nginx_vhost:
name: prometheus-exporter
content: "{{ lookup('template', 'nginx-vhost.j2') }}"
|