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

chore: cleanup old log locations

parent 7849709e
Branches
No related tags found
1 merge request!2merge feat_ND-2363_ND-2323 into master
......@@ -16,9 +16,6 @@
- "{{ paths.log_disapp.mountpoint }}"
- "{{ paths.log_subapp.mountpoint }}"
- "{{ paths.log_subapp_ws.mountpoint }}"
# - "/var/log/rosetta/{{ ansible_hostname }}/disapp/"
# - "/var/log/rosetta/{{ ansible_hostname }}/subapp/"
# - "/var/log/rosetta/{{ ansible_hostname }}/legacy/"
register: stat_result
- name: if dir doesn't exist, create it with correct permissions
ansible.builtin.file:
......@@ -30,23 +27,17 @@
loop: "{{ stat_result.results }}"
when: not item.stat.exists
# - name: Mounts für SubApp-Shares & Logs LEGACY
# ansible.posix.mount:
# path: "{{ item.path }}"
# src: "{{ item.src | default(omit) }}"
# state: "{{ item.state | default('mounted') }}"
# fstype: nfs
# opts: "{{ item.opts | default( nfs_opts.v3 ) }}"
# loop:
# # LEGACY -> remove
# # we remove this mount in favor of separate mounts for logging ingests and access (but we can only do this once the rollout has happened and the sub-/dissapp are logging to their new locations, because otherwise the "Device is busy", so think of this as preparation)
# #- path: "/var/log/subapp/{{ ansible_hostname }}"
# # state: unmounted
# # ... and replace it with a temporary mount that we can use to access old logs until they've been migrated to their new log directories.
# - path: "/var/log/rosetta/{{ ansible_hostname }}/"
# src: "{{ nfs_mounts_subapp.hosts[ansible_hostname]['log_disapp']['nfs_share'] }}{{ ansible_hostname }}"
# opts: "{{ nfs_mounts_subapp.hosts[ansible_hostname]['log_disapp']['nfs_opts'] }}"
# tags: [notest]
- name: Mounts für SubApp-Shares & Logs LEGACY
ansible.posix.mount:
path: "{{ item.path }}"
state: "absent"
loop:
# LEGACY -> remove
# we remove this mount in favor of separate mounts for logging ingests and access (but we can only do this once the rollout has happened and the sub-/dissapp are logging to their new locations, because otherwise the "Device is busy", so think of this as preparation)
- path: "/var/log/subapp/{{ ansible_hostname }}"
- path: "/var/log/subapp_ws/"
tags: [notest]
ignore_errors: true
- name: Mounts für SubApp-Shares & Logs NEW
ansible.posix.mount:
......
......@@ -176,8 +176,12 @@
- "/home/{{ vault_subapp_user }}/.subapp/lockdir"
- "/home/{{ vault_disapp_user }}/.disapp/lockdir"
# Softlinks für SubApp-Konfigurationen und nach /var/log setzen
- name: Softlinks für SubApp-Konfigurationen und nach /var/log setzen
- name: Symlinks zu alten Loglocations bereinigen
ansible.builtin.file:
path: "/home/{{ vault_subapp_user }}/.subapp/{{ ansible_hostname }}"
state: absent
- name: Symlinks für SubApp-Konfigurationen und nach /var/log setzen
ansible.builtin.file:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
......@@ -191,7 +195,7 @@
dest: "/home/{{ vault_disapp_user }}/.disapp.cfg"
owner: "{{ vault_disapp_user }}"
group: "{{ vault_disapp_group }}"
- src: "/var/log/disapp/"
- src: "{{ paths.log_disapp.mountpoint }}"
dest: "/home/{{ vault_disapp_user }}/.disapp/disapp_logs"
owner: "{{ vault_disapp_user }}"
group: "{{ vault_disapp_group }}"
......@@ -200,12 +204,12 @@
dest: "/home/{{ vault_subapp_user }}/.subapp.cfg"
owner: "{{ vault_subapp_user }}"
group: "{{ vault_subapp_group }}"
- src: "/var/log/subapp/"
- src: "{{ paths.log_subapp.mountpoint }}"
dest: "/home/{{ vault_subapp_user }}/.subapp/subapp_logs"
owner: "{{ vault_subapp_user }}"
group: "{{ vault_subapp_group }}"
# Webservice
- src: "/var/log/subapp_ws/"
- src: "{{ paths.log_subapp_ws.mountpoint }}"
dest: "/home/{{ vault_subapp_user }}/.subapp/subapp_ws_logs"
owner: "{{ vault_subapp_user }}"
group: "{{ vault_subapp_group }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment