2021-12-06 11:29:17 +01:00
|
|
|
---
|
|
|
|
# tasks file for ansible-renovate-role
|
|
|
|
|
|
|
|
- name: Ensure pip is present
|
2023-06-12 17:16:38 +02:00
|
|
|
ansible.builtin.apt:
|
|
|
|
name: "{{ __docker_requirements }}"
|
2021-12-06 11:29:17 +01:00
|
|
|
state: present
|
|
|
|
|
2021-12-06 16:11:12 +01:00
|
|
|
- name: Install webhook
|
2023-06-12 17:16:38 +02:00
|
|
|
ansible.builtin.package:
|
2021-12-06 16:11:12 +01:00
|
|
|
name: webhook
|
|
|
|
state: present
|
|
|
|
|
2022-03-04 14:44:55 +01:00
|
|
|
- name: "Pull renovate image"
|
2023-06-12 17:16:38 +02:00
|
|
|
community.docker.docker_image:
|
2021-12-06 11:29:17 +01:00
|
|
|
source: pull
|
2022-03-04 14:44:55 +01:00
|
|
|
name: "{{ renovate_image_name }}"
|
|
|
|
tag: "{{ renovate_image_tag }}"
|
|
|
|
state: "present"
|
2021-12-06 11:29:17 +01:00
|
|
|
force_source: true
|
|
|
|
|
|
|
|
- name: Add config file
|
2023-06-12 17:16:38 +02:00
|
|
|
ansible.builtin.template:
|
|
|
|
src: renovate-config.js.
|
2021-12-06 11:29:17 +01:00
|
|
|
dest: /etc/renovate/config.js
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: u=rw,g=r,o=r
|
|
|
|
|
|
|
|
- name: Add exec script
|
2023-06-12 17:16:38 +02:00
|
|
|
ansible.builtin.template:
|
2021-12-06 11:29:17 +01:00
|
|
|
src: renovate.j2
|
|
|
|
dest: /etc/renovate/renovate
|
|
|
|
owner: root
|
|
|
|
group: root
|
2021-12-06 12:41:42 +01:00
|
|
|
mode: u=rwx,g=rx,o=rx
|
|
|
|
|
|
|
|
- name: Add cron
|
2023-06-12 17:16:38 +02:00
|
|
|
ansible.builtin.cron:
|
2021-12-06 12:41:42 +01:00
|
|
|
name: Run renovate
|
|
|
|
minute: "0"
|
2022-01-19 11:23:28 +01:00
|
|
|
hour: "3"
|
2021-12-06 12:46:08 +01:00
|
|
|
job: "/etc/renovate/renovate"
|
2021-12-06 12:47:19 +01:00
|
|
|
cron_file: renovate
|
2021-12-06 16:11:12 +01:00
|
|
|
user: root
|
2022-01-30 15:22:16 +01:00
|
|
|
notify: Reload cron
|
2021-12-06 16:11:12 +01:00
|
|
|
|
|
|
|
- name: add webhook conf
|
2023-06-12 17:16:38 +02:00
|
|
|
ansible.builtin.template:
|
2021-12-06 16:11:12 +01:00
|
|
|
src: webhook.conf.j2
|
|
|
|
dest: /etc/webhook.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: u=rw,g=r,o=r
|
2022-03-04 14:44:55 +01:00
|
|
|
notify: Restart webhook
|