Add a system to deploy ipsilon patches
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
04f26a1221
commit
622cefeca1
3 changed files with 28 additions and 0 deletions
2
roles/ipsilon/defaults/main.yml
Normal file
2
roles/ipsilon/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
ipsilon_patches:
|
||||
- 409
|
|
@ -84,6 +84,8 @@
|
|||
tags:
|
||||
- ipsilon
|
||||
|
||||
- include_tasks: patches.yml
|
||||
|
||||
- name: Destroy admin ticket
|
||||
command: kdestroy -A
|
||||
tags:
|
||||
|
|
24
roles/ipsilon/tasks/patches.yml
Normal file
24
roles/ipsilon/tasks/patches.yml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue