diff --git a/README.md b/README.md index e96863f..f85e8a6 100644 --- a/README.md +++ b/README.md @@ -369,44 +369,44 @@ app_extra_templates: The role is organized into logical task files for selective execution: ``` -├── setup.yaml # Validation, directories, and templates -├── restore.yaml # Backup restoration logic -├── deploy.yaml # Docker Compose deployment and startup -├── health_check.yaml # Health monitoring and verification -├── backup.yaml # Backup creation and management -├── update.yaml # Container update and image pulling -└── manage_compose.yaml # Docker Compose lifecycle management +├── setup.yml # Validation, directories, and templates +├── restore.yml # Backup restoration logic +├── deploy.yml # Docker Compose deployment and startup +├── health_check.yml # Health monitoring and verification +├── backup.yml # Backup creation and management +├── update.yml # Container update and image pulling +└── manage_compose.yml # Docker Compose lifecycle management ``` ### Task Execution Flow -1. **Setup** (`setup.yaml`) - [setup, deploy] +1. **Setup** (`setup.yml`) - [setup, deploy] - Docker/Compose validation - Variable validation and security checks - Directory creation - Additional template deployment -2. **Restore** (`restore.yaml`) - [restore, never] +2. **Restore** (`restore.yml`) - [restore, never] - Backup file selection and validation - Service stopping - Archive extraction - Service restart -3. **Deploy** (`deploy.yaml`) - [deploy] +3. **Deploy** (`deploy.yml`) - [deploy] - Docker Compose file creation - Container startup and management -4. **Health Check** (`health_check.yaml`) - [deploy, healthcheck] +4. **Health Check** (`health_check.yml`) - [deploy, healthcheck] - Service health verification - Endpoint monitoring -5. **Backup** (`backup.yaml`) - [backup, never] +5. **Backup** (`backup.yml`) - [backup, never] - Service stopping (optional) - Archive creation - Backup copying and cleanup - Service restart -6. **Update** (`update.yaml`) - [update, never] +6. **Update** (`update.yml`) - [update, never] - Service stopping - Image pulling - Container recreation diff --git a/defaults/main.yaml b/defaults/main.yml similarity index 100% rename from defaults/main.yaml rename to defaults/main.yml diff --git a/tasks/backup.yaml b/tasks/backup.yml similarity index 100% rename from tasks/backup.yaml rename to tasks/backup.yml diff --git a/tasks/deploy.yaml b/tasks/deploy.yml similarity index 96% rename from tasks/deploy.yaml rename to tasks/deploy.yml index 45cf045..af83f70 100644 --- a/tasks/deploy.yaml +++ b/tasks/deploy.yml @@ -34,6 +34,6 @@ when: _compose_type == 'content' register: compose_file - - ansible.builtin.include_tasks: manage_compose.yaml + - ansible.builtin.include_tasks: manage_compose.yml when: app_compose_start | default(true) tags: [deploy] \ No newline at end of file diff --git a/tasks/health_check.yaml b/tasks/health_check.yml similarity index 100% rename from tasks/health_check.yaml rename to tasks/health_check.yml diff --git a/tasks/main.yaml b/tasks/main.yaml deleted file mode 100644 index 3ba0cb5..0000000 --- a/tasks/main.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- - -- ansible.builtin.include_tasks: setup.yaml - tags: [setup, deploy] -- ansible.builtin.include_tasks: restore.yaml - tags: [restore, never] -- ansible.builtin.include_tasks: deploy.yaml - tags: [deploy] -- ansible.builtin.include_tasks: health_check.yaml - tags: [deploy, healthcheck] -- ansible.builtin.include_tasks: backup.yaml - tags: [backup, never] -- ansible.builtin.include_tasks: update.yaml - tags: [update, never] diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..48f237b --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,14 @@ +--- + +- ansible.builtin.include_tasks: setup.yml + tags: [setup, deploy] +- ansible.builtin.include_tasks: restore.yml + tags: [restore, never] +- ansible.builtin.include_tasks: deploy.yml + tags: [deploy] +- ansible.builtin.include_tasks: health_check.yml + tags: [deploy, healthcheck] +- ansible.builtin.include_tasks: backup.yml + tags: [backup, never] +- ansible.builtin.include_tasks: update.yml + tags: [update, never] diff --git a/tasks/manage_compose.yaml b/tasks/manage_compose.yml similarity index 100% rename from tasks/manage_compose.yaml rename to tasks/manage_compose.yml diff --git a/tasks/restore.yaml b/tasks/restore.yml similarity index 100% rename from tasks/restore.yaml rename to tasks/restore.yml diff --git a/tasks/setup.yaml b/tasks/setup.yml similarity index 100% rename from tasks/setup.yaml rename to tasks/setup.yml diff --git a/tasks/update.yaml b/tasks/update.yml similarity index 93% rename from tasks/update.yaml rename to tasks/update.yml index 6e31fb2..8598a8e 100644 --- a/tasks/update.yaml +++ b/tasks/update.yml @@ -19,7 +19,7 @@ register: update_restart - name: Verify application health after update - ansible.builtin.include_tasks: health_check.yaml + ansible.builtin.include_tasks: health_check.yml when: app_health_check | default(true) rescue: