Fix SSH client configuration for gitea connection
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
[defaults]
|
||||
inventory = inventory.ini
|
||||
host_key_checking = False
|
||||
forks = 8
|
||||
timeout = 30
|
||||
gathering = smart
|
||||
fact_caching = memory
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# 服务器节点 (7个服务器节点)
|
||||
# ⚠️ 警告:能力越大,责任越大!服务器节点操作需极其谨慎!
|
||||
# ⚠️ 任何对服务器节点的操作都可能影响整个集群的稳定性!
|
||||
semaphore ansible_host=semaphore.tailnet-68f9.ts.net ansible_user=root ansible_password=3131 ansible_become_password=3131
|
||||
semaphore ansible_host=127.0.0.1 ansible_user=root ansible_password=3131 ansible_become_password=3131 ansible_ssh_common_args="-o PreferredAuthentications=password -o PubkeyAuthentication=no"
|
||||
ash1d ansible_host=ash1d.tailnet-68f9.ts.net ansible_user=ben ansible_password=3131 ansible_become_password=3131
|
||||
ash2e ansible_host=ash2e.tailnet-68f9.ts.net ansible_user=ben ansible_password=3131 ansible_become_password=3131
|
||||
ch2 ansible_host=ch2.tailnet-68f9.ts.net ansible_user=ben ansible_password=3131 ansible_become_password=3131
|
||||
@@ -31,3 +31,7 @@ mount_point=/mnt/fnsync
|
||||
|
||||
# Ansible配置
|
||||
ansible_ssh_common_args='-o StrictHostKeyChecking=no'
|
||||
gitea ansible_host=gitea ansible_user=ben ansible_password=3131 ansible_become_password=3131
|
||||
|
||||
[gitea]
|
||||
gitea ansible_host=gitea ansible_user=ben ansible_password=3131 ansible_become_password=3131
|
||||
|
||||
@@ -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