This commit is contained in:
SebClem 2023-06-12 17:16:38 +02:00
parent 5c90adffee
commit 764b7d4ca5
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
3 changed files with 12 additions and 18 deletions

View File

@ -5,5 +5,6 @@
"*.yml": "ansible"
},
"ansible.ansible.useFullyQualifiedCollectionNames": true,
"editor.formatOnSave": true
"editor.formatOnSave": true,
"ansible.python.interpreterPath": "/root/.virtualenvs/ansible/bin/python"
}

View File

@ -2,23 +2,17 @@
# tasks file for ansible-renovate-role
- name: Ensure pip is present
package:
name: python3-pip
ansible.builtin.apt:
name: "{{ __docker_requirements }}"
state: present
- name: Install webhook
package:
ansible.builtin.package:
name: webhook
state: present
- name: Install requirements
pip:
name: "{{ item.name }}"
executable: "{{ item.exec }}"
loop: "{{ __docker_requirements }}"
- name: "Pull renovate image"
docker_image:
community.docker.docker_image:
source: pull
name: "{{ renovate_image_name }}"
tag: "{{ renovate_image_tag }}"
@ -26,15 +20,15 @@
force_source: true
- name: Add config file
template:
src: renovate-config.js.j2
ansible.builtin.template:
src: renovate-config.js.
dest: /etc/renovate/config.js
owner: root
group: root
mode: u=rw,g=r,o=r
- name: Add exec script
template:
ansible.builtin.template:
src: renovate.j2
dest: /etc/renovate/renovate
owner: root
@ -42,7 +36,7 @@
mode: u=rwx,g=rx,o=rx
- name: Add cron
cron:
ansible.builtin.cron:
name: Run renovate
minute: "0"
hour: "3"
@ -52,7 +46,7 @@
notify: Reload cron
- name: add webhook conf
template:
ansible.builtin.template:
src: webhook.conf.j2
dest: /etc/webhook.conf
owner: root

View File

@ -1,5 +1,4 @@
---
# vars file for ansible-renovate-role
__docker_requirements:
- name: docker
exec: pip3
- python3-docker