ansible-renovate-role/tasks/main.yml
2022-01-30 15:22:16 +01:00

61 lines
1.1 KiB
YAML

---
# tasks file for ansible-renovate-role
- name: Ensure pip is present
package:
name: python3-pip
state: present
- name: Install webhook
package:
name: webhook
state: present
- name: Install requirements
pip:
name: '{{ item.name }}'
executable: '{{ item.exec }}'
loop: '{{ __docker_requirements }}'
- name: 'Pull renovate image'
docker_image:
source: pull
name: '{{ renovate_image_name }}'
tag: '{{ renovate_image_tag }}'
state: 'present'
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
mode: u=rwx,g=rx,o=rx
- name: Add cron
cron:
name: Run renovate
minute: "0"
hour: "3"
job: "/etc/renovate/renovate"
cron_file: renovate
user: root
notify: Reload cron
- name: add webhook conf
template:
src: webhook.conf.j2
dest: /etc/webhook.conf
owner: root
group: root
mode: u=rw,g=r,o=r
notify: Restart webhook