ansible/roles/snmp_exporter/tasks/docker.yml

16 lines
407 B
YAML
Raw Normal View History

- name: Create snmp-exporter container
docker_container:
image: prom/snmp-exporter
name: "{{ snmp_exporter_host }}"
restart_policy: unless-stopped
networks:
- name: compose_net
env:
PUID: "{{ puid }}"
PGID: "{{ pgid}}"
TZ: "{{ timezone }}"
volumes:
- "{{ snmp_exporter_config }}:/etc/snmp_exporter/"
ports:
- "{{ snmp_exporter_port }}:9116"