forked from HPC/HPCplaybooks
Added nsswitch so that /etc/hosts file will work.
This commit is contained in:
parent
3bd13d018a
commit
7fc312e523
@ -30,8 +30,13 @@
|
|||||||
- alerting.rules
|
- alerting.rules
|
||||||
- targets.json
|
- targets.json
|
||||||
|
|
||||||
tags:
|
- name: Install nsswitch see https://github.com/jumanjiman/docker-ssllabs-scan/blob/6d9f48c9ac4f1df3eebef3ab28e2dd44a9ba4998/scanner/etc/nsswitch.conf
|
||||||
- service-files
|
copy:
|
||||||
|
src: templates/etc/nsswitch.conf
|
||||||
|
dest: /srv/prometheus/etc/nsswitch.conf
|
||||||
|
mode: 644
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
- name: Install service files.
|
- name: Install service files.
|
||||||
template:
|
template:
|
||||||
|
3
roles/prom_server/templates/etc/nsswitch.conf
Normal file
3
roles/prom_server/templates/etc/nsswitch.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
|
||||||
|
# https://golang.org/pkg/net/
|
||||||
|
hosts: files dns
|
@ -11,6 +11,7 @@ ExecStartPre=-/usr/bin/docker rm %n
|
|||||||
ExecStart=/usr/bin/docker run --name %n \
|
ExecStart=/usr/bin/docker run --name %n \
|
||||||
--network host \
|
--network host \
|
||||||
-v /srv/prometheus/prometheus:/prometheus \
|
-v /srv/prometheus/prometheus:/prometheus \
|
||||||
|
-v /srv/prometheus/etc/nsswitch.conf/etc/nsswitch.conf \
|
||||||
-v /srv/prometheus/etc/prometheus:/etc/prometheus \
|
-v /srv/prometheus/etc/prometheus:/etc/prometheus \
|
||||||
prom/prometheus:v2.6.0 \
|
prom/prometheus:v2.6.0 \
|
||||||
--storage.tsdb.retention 365d --config.file=/etc/prometheus/prometheus.yml \
|
--storage.tsdb.retention 365d --config.file=/etc/prometheus/prometheus.yml \
|
||||||
|
Loading…
Reference in New Issue
Block a user