feat: add system maintenance automation
This commit is contained in:
@@ -25,6 +25,11 @@
|
||||
docker_registry_username: "{{ docker_registry_username | default(vault_docker_registry_username | default(docker_registry_username_default)) }}"
|
||||
docker_registry_password: "{{ docker_registry_password | default(vault_docker_registry_password | default(docker_registry_password_default)) }}"
|
||||
|
||||
- name: Ensure system packages are up to date
|
||||
include_role:
|
||||
name: system
|
||||
when: system_update_packages | bool
|
||||
|
||||
- name: Verify Docker is running
|
||||
systemd:
|
||||
name: docker
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
msg: "Deployment stacks directory not found at {{ stacks_base_path }}"
|
||||
when: not stacks_dir.stat.exists
|
||||
|
||||
- name: Ensure system packages are up to date
|
||||
include_role:
|
||||
name: system
|
||||
when: system_update_packages | bool
|
||||
|
||||
# Create external networks required by all stacks
|
||||
- name: Create traefik-public network
|
||||
community.docker.docker_network:
|
||||
|
||||
11
deployment/ansible/playbooks/system-maintenance.yml
Normal file
11
deployment/ansible/playbooks/system-maintenance.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Apply system maintenance on production hosts
|
||||
hosts: production
|
||||
gather_facts: yes
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
- name: Run system maintenance role
|
||||
include_role:
|
||||
name: system
|
||||
when: system_update_packages | bool
|
||||
Reference in New Issue
Block a user