Fix SSH client configuration for gitea connection
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Thorough cleanup of Nomad configuration backup files
|
||||
hosts: nomad_nodes
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Remove all backup files with various patterns
|
||||
shell: |
|
||||
find /etc/nomad.d/ -name "nomad.hcl.*" -not -name "nomad.hcl" -delete
|
||||
find /etc/nomad.d/ -name "*.bak" -delete
|
||||
find /etc/nomad.d/ -name "*.backup*" -delete
|
||||
find /etc/nomad.d/ -name "*.~" -delete
|
||||
find /etc/nomad.d/ -name "*.broken" -delete
|
||||
ignore_errors: yes
|
||||
|
||||
- name: List remaining files in /etc/nomad.d/
|
||||
command: ls -la /etc/nomad.d/
|
||||
register: remaining_files
|
||||
changed_when: false
|
||||
|
||||
- name: Display remaining files
|
||||
debug:
|
||||
var: remaining_files.stdout_lines
|
||||
25
deployment/ansible/playbooks/cleanup-nomad-backups.yml
Normal file
25
deployment/ansible/playbooks/cleanup-nomad-backups.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: Cleanup Nomad configuration backup files
|
||||
hosts: nomad_nodes
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Remove backup files from /etc/nomad.d/
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- "/etc/nomad.d/*.bak"
|
||||
- "/etc/nomad.d/*.backup"
|
||||
- "/etc/nomad.d/*.~"
|
||||
- "/etc/nomad.d/*.broken"
|
||||
- "/etc/nomad.d/nomad.hcl.*"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: List remaining files in /etc/nomad.d/
|
||||
command: ls -la /etc/nomad.d/
|
||||
register: remaining_files
|
||||
changed_when: false
|
||||
|
||||
- name: Display remaining files
|
||||
debug:
|
||||
var: remaining_files.stdout_lines
|
||||
Reference in New Issue
Block a user