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

View File

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