diff --git a/defaults/main.yml b/defaults/main.yml index 311515d..5eb25d4 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,6 @@ --- docker_compose_directory: "/opt/docker-compose" +docker_compose_bin: "docker compose" prometheus_docker_network: prometheus diff --git a/templates/systemd/docker-compose.service.j2 b/templates/systemd/docker-compose.service.j2 index dea48d9..6775e81 100644 --- a/templates/systemd/docker-compose.service.j2 +++ b/templates/systemd/docker-compose.service.j2 @@ -7,8 +7,8 @@ After=docker.service Type=oneshot RemainAfterExit=true WorkingDirectory=/opt/docker-compose/{{ exporter }} -ExecStart=/usr/bin/docker-compose up -d -ExecStop=/usr/bin/docker-compose down +ExecStart=/usr/bin/{{ docker_compose_bin }} up -d +ExecStop=/usr/bin/{{ docker_compose_bin }} down [Install] WantedBy=multi-user.target