Fix matrix-prometheus-node-exporter failure to start

The quotes around "host" for both `--pid` and `--net` were
causing trouble for me:

> docker: --pid: invalid PID mode.

and:

> docker: Error response from daemon: network "host" not found.

I've also changed the `-v` call to `--mount` for consistency with the
rest of the playbook.
This commit is contained in:
Slavi Pantaleev 2021-01-31 11:41:22 +02:00
parent 9531d13786
commit f0cd294628

View File

@ -27,9 +27,9 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-prometheus-nod
{% for arg in matrix_prometheus_node_exporter_container_extra_arguments %} {% for arg in matrix_prometheus_node_exporter_container_extra_arguments %}
{{ arg }} \ {{ arg }} \
{% endfor %} {% endfor %}
--net="host" \ --net=host \
--pid="host" \ --pid=host \
-v "/:/host:ro,rslave" \ --mount type=bind,src=/,dst=/host,ro,bind-propagation=rslave \
{{ matrix_prometheus_node_exporter_docker_image }} \ {{ matrix_prometheus_node_exporter_docker_image }} \
--path.rootfs=/host --path.rootfs=/host