Skip to content
Snippets Groups Projects
Commit cbf792fa authored by Jörg Sachse's avatar Jörg Sachse
Browse files

refactor: move METS subapp cleanup to cleanup taskfile

parent 261cf533
No related branches found
No related tags found
1 merge request!1ND-1759
...@@ -10,5 +10,44 @@ ...@@ -10,5 +10,44 @@
'libarchive-zip-perl', 'libarchive-zip-perl',
] ]
state: absent state: absent
tags: [apt, subapp]
- name: SubApp-Migration bereinigen
block:
- name: find service unit file
find:
path: "/etc/systemd/user/"
pattern: "subapp_bagit.service"
register: res_service
- name: Unit stoppen
systemd:
name: "{{ item }}"
state: stopped
enabled: false
loop:
- "subapp_bagit.service"
- "subapp.service"
when: res_service.matched > 0
- name: Unitfile & .gsa-Config entfernen
file:
path: "{{ item }}"
state: absent
loop:
- "/etc/systemd/user/subapp_bagit.service"
- "{{ gsa_vars.files.gsa.path }}"
- "/home/{{ vault_subapp_user }}/.gsa"
- name: Listfiles finden
find:
path: "/home/{{ vault_subapp_user }}/.subapp/"
patterns: "usa_{{ item }}_file.yam*"
register: listfiles
loop:
- "bookmark"
- "dependency"
- "isarchived"
- "mdupdate"
- name: Listfiles entfernen
file:
path: "{{ item.path }}"
state: absent
loop: listfiles.files
...@@ -54,34 +54,6 @@ ...@@ -54,34 +54,6 @@
- "subapp.service" - "subapp.service"
tags: [systemd, subapp] tags: [systemd, subapp]
- name: bereinigen
block:
- name: find service unit file
find:
path: "/etc/systemd/user/"
pattern: "subapp_bagit.service"
register: res_service
- debug:
msg: "{{ res_service }}"
- name: Unit stoppen
systemd:
name: "{{ item }}"
state: stopped
enabled: false
loop:
- "subapp_bagit.service"
- "subapp.service"
when: res_service.matched > 0
- name: Unitfile & .gsa-Config entfernen
file:
path: "{{ item }}"
state: absent
loop:
- "/etc/systemd/user/subapp_bagit.service"
- "{{ gsa_vars.files.gsa.path }}"
- "/home/{{ vault_subapp_user }}/.gsa"
tags: [subapp]
- name: Systemd-Unitfiles installieren - name: Systemd-Unitfiles installieren
copy: copy:
src: "etc/systemd/user/{{ item }}" src: "etc/systemd/user/{{ item }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment