Added nsswitch so that /etc/hosts file will work.
This commit is contained in:
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 \
|
||||
--network host \
|
||||
-v /srv/prometheus/prometheus:/prometheus \
|
||||
-v /srv/prometheus/etc/nsswitch.conf/etc/nsswitch.conf \
|
||||
-v /srv/prometheus/etc/prometheus:/etc/prometheus \
|
||||
prom/prometheus:v2.6.0 \
|
||||
--storage.tsdb.retention 365d --config.file=/etc/prometheus/prometheus.yml \
|
||||
|
Reference in New Issue
Block a user