Add a system to deploy ipsilon patches

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2024-08-20 14:23:52 +02:00
parent 04f26a1221
commit 622cefeca1
No known key found for this signature in database
GPG key ID: 31584CFEB9BF64AD
3 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,2 @@
ipsilon_patches:
- 409

View file

@ -84,6 +84,8 @@
tags:
- ipsilon
- include_tasks: patches.yml
- name: Destroy admin ticket
command: kdestroy -A
tags:

View file

@ -0,0 +1,24 @@
- name: install patch and filterdiff
dnf:
name:
- patch
- patchutils
- name: prepare the patches directory
file:
path: /opt/ipsilon-patches
state: dir
- name: download patches
ansible.builtin.get_url:
url: https://pagure.io/ipsilon/pull-request/{{item}}.patch
dest: /opt/ipsilon-patches/{{item}}.patch
loop: "{{ ipsilon_patches }}"
- name: apply patches
ansible.builtin.shell:
chdir: "{{ ansible_facts['python3']['sitelib'] }}"
cmd: filterdiff --include '?/ipsilon/' /opt/ipsilon-patches/{{item}}.patch | patch -p1 --forward --batch
loop: "{{ ipsilon_patches }}"
notify:
- restart apache