Initial project commit

This commit is contained in:
2024-12-16 19:59:57 -05:00
commit fa1b5cce00
3409 changed files with 460909 additions and 0 deletions

View File

@ -0,0 +1,2 @@
---
rear_unmount_nfs_path: /var/tmp/nfs_mnt

View File

@ -0,0 +1,25 @@
---
- name: Try to unmount the filesystem
block:
- name: Unmount filesystem
ansible.posix.mount:
path: "{{ rear_unmount_nfs_path }}"
state: unmounted
delay: 3
retries: 3
rescue:
- name: "Rescue: Lazy unmount the NFS share"
ansible.builtin.command:
cmd: "umount -l {{ rear_unmount_nfs_path }}"
- name: Log unmount rescue to syslogger
community.general.syslogger:
msg: "{{ lookup('template', 'syslog.j2') | replace('\n', ' ') }}"
ident: ansbl_rear_unmount_rescue
vars:
actor: "rear_unmount_rescue"
title: >
ReaR Unmount Rescue
summary: "Unable to unmount the filesystem {{ rear_unmount_nfs_path }} using POSIX module. Rescued via lazy unmount."
severity: "high"
flags: ["inhibitor"]

View File

@ -0,0 +1,17 @@
actor="{{ actor | default(item.actor) }}"
title="{{ title | default(item.title) }}"
{% if (item.actor is defined) and item.actor in remeditated_inhibitors %}
flags="{{ item.flags + ['remediated_in_automation'] }}"
{% else %}
flags="{{ flags | default(item.flags) }}"
{% endif %}
summary="{{ summary | default(item.summary) }}"
severity="{{ severity | default(item.severity) }}"
{% if item.detail.remediations is defined %}
remediation="{{
item.detail.remediations | selectattr('type', 'equalto', 'hint') |
map(attribute='context') | join(', ') }}"
{% else %}
remediation="{{ remediation | default('') }}"
{% endif %}
ansible_tower_job_id="{{ tower_job_id | default(None) }}"