feat: add system maintenance automation

This commit is contained in:
2025-11-01 19:56:42 +01:00
parent b76064d94a
commit 2d99a23286
14 changed files with 209 additions and 15 deletions

View File

@@ -3,3 +3,5 @@ registry_stack_path: "{{ stacks_base_path }}/registry"
registry_wait_timeout: "{{ wait_timeout | default(60) }}"
registry_wait_interval: 5
registry_vault_file: "{{ role_path }}/../../secrets/production.vault.yml"
registry_healthcheck_enabled: true
registry_healthcheck_url: "http://127.0.0.1:5000/v2/_catalog"

View File

@@ -93,7 +93,7 @@
- name: Verify Registry is accessible
uri:
url: "http://127.0.0.1:5000/v2/_catalog"
url: "{{ registry_healthcheck_url }}"
user: "{{ registry_username }}"
password: "{{ registry_password }}"
status_code: 200
@@ -102,14 +102,18 @@
ignore_errors: yes
changed_when: false
no_log: true
when: not ansible_check_mode
when:
- not ansible_check_mode
- registry_healthcheck_enabled | bool
- name: Display Registry status
debug:
msg: "Registry accessibility: {{ 'SUCCESS' if registry_check.status == 200 else 'FAILED - may need manual check' }}"
when: not ansible_check_mode
when:
- not ansible_check_mode
- registry_healthcheck_enabled | bool
- name: Record registry deployment facts
set_fact:
registry_stack_changed: "{{ registry_compose_result.changed | default(false) }}"
registry_access_status: "{{ registry_check.status | default('unknown') }}"
registry_access_status: "{{ registry_check.status | default('disabled' if not registry_healthcheck_enabled else 'unknown') }}"