feat: add system maintenance automation
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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') }}"
|
||||
|
||||
Reference in New Issue
Block a user