fix: execute separate shell scripts to start and stop renovate
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Markus Pesch 2023-09-22 20:21:13 +02:00
parent e241c4a0bf
commit f2abf22b80
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
4 changed files with 30 additions and 4 deletions

View File

@ -20,6 +20,17 @@
- srv/docker/renovate/docker-compose.yml
- srv/docker/renovate/config.json
- name: Create start and stop scripts
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "/{{ item }}"
owner: root
group: docker
mode: "0770"
with_items:
- usr/local/bin/start-renovate.sh
- usr/local/bin/stop-renovate.sh
- name: Create systemd unit files
ansible.builtin.template:
src: "{{ item }}.j2"

View File

@ -12,7 +12,5 @@ OnFailure=status-email@%n.service
[Service]
Type=simple
ExecStart={{ renovate_docker_compose_bin }} up
ExecStop={{ renovate_docker_compose_bin }} down --volumes
ExecPostStop=/bin/rm --recursive --force {{ renovate_cache_dir }}
WorkingDirectory={{ renovate_dir }}
ExecStart=/usr/local/bin/start-renovate.sh
ExecStop=/usr/local/bin/stop-renovate.sh

View File

@ -0,0 +1,7 @@
#!/bin/bash
#
# {{ ansible_managed }}
#
{{ renovate_docker_compose_bin }} --project-directory {{ renovate_dir }} up

View File

@ -0,0 +1,10 @@
#!/bin/bash
#
# {{ ansible_managed }}
#
set -e
{{ renovate_docker_compose_bin }} --project-directory {{ renovate_dir }} down
rm --force --recursive {{ renovate_cache_dir }}