ansible-renovate-role/tasks/main.yml
2023-06-12 18:41:52 +02:00

56 lines
1.1 KiB
YAML

---
# tasks file for ansible-renovate-role
- name: Ensure pip is present
ansible.builtin.apt:
name: "{{ __docker_requirements }}"
state: present
- name: Install webhook
ansible.builtin.package:
name: webhook
state: present
- name: "Pull renovate image"
community.docker.docker_image:
source: pull
name: "{{ renovate_image_name }}"
tag: "{{ renovate_image_tag }}"
state: "present"
force_source: true
- name: Add config file
ansible.builtin.template:
src: renovate-config.js.j2
dest: /etc/renovate/config.js
owner: root
group: root
mode: u=rw,g=r,o=r
- name: Add exec script
ansible.builtin.template:
src: renovate.j2
dest: /etc/renovate/renovate
owner: root
group: root
mode: u=rwx,g=rx,o=rx
- name: Add cron
ansible.builtin.cron:
name: Run renovate
minute: "0"
hour: "3"
job: "/etc/renovate/renovate"
cron_file: renovate
user: root
notify: Reload cron
- name: add webhook conf
ansible.builtin.template:
src: webhook.conf.j2
dest: /etc/webhook.conf
owner: root
group: root
mode: u=rw,g=r,o=r
notify: Restart webhook