fix: execute separate shell scripts to start and stop renovate
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e241c4a0bf
commit
f2abf22b80
@ -20,6 +20,17 @@
|
|||||||
- srv/docker/renovate/docker-compose.yml
|
- srv/docker/renovate/docker-compose.yml
|
||||||
- srv/docker/renovate/config.json
|
- 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
|
- name: Create systemd unit files
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item }}.j2"
|
src: "{{ item }}.j2"
|
||||||
|
@ -12,7 +12,5 @@ OnFailure=status-email@%n.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart={{ renovate_docker_compose_bin }} up
|
ExecStart=/usr/local/bin/start-renovate.sh
|
||||||
ExecStop={{ renovate_docker_compose_bin }} down --volumes
|
ExecStop=/usr/local/bin/stop-renovate.sh
|
||||||
ExecPostStop=/bin/rm --recursive --force {{ renovate_cache_dir }}
|
|
||||||
WorkingDirectory={{ renovate_dir }}
|
|
||||||
|
7
templates/usr/local/bin/start-renovate.sh.j2
Normal file
7
templates/usr/local/bin/start-renovate.sh.j2
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
#
|
||||||
|
|
||||||
|
{{ renovate_docker_compose_bin }} --project-directory {{ renovate_dir }} up
|
10
templates/usr/local/bin/stop-renovate.sh.j2
Normal file
10
templates/usr/local/bin/stop-renovate.sh.j2
Normal 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 }}
|
Loading…
Reference in New Issue
Block a user