ansible-renovate-role/tasks/main.yml

62 lines
1.1 KiB
YAML
Raw Normal View History

2021-12-06 11:29:17 +01:00
---
# tasks file for ansible-renovate-role
- name: Ensure pip is present
package:
name: python3-pip
state: present
2021-12-06 16:11:12 +01:00
- name: Install webhook
package:
name: webhook
state: present
2021-12-06 11:29:17 +01:00
- name: Install requirements
pip:
2022-03-04 14:44:55 +01:00
name: "{{ item.name }}"
executable: "{{ item.exec }}"
loop: "{{ __docker_requirements }}"
2021-12-06 11:29:17 +01:00
2022-03-04 14:44:55 +01:00
- name: "Pull renovate image"
2021-12-06 11:29:17 +01:00
docker_image:
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
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
template:
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
cron:
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
template:
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