diff --git a/roles/web-app-mig/tasks/01_core.yml b/roles/web-app-mig/tasks/01_core.yml index 7207103e..b72b8e97 100644 --- a/roles/web-app-mig/tasks/01_core.yml +++ b/roles/web-app-mig/tasks/01_core.yml @@ -10,8 +10,10 @@ docker_compose_flush_handlers: true docker_pull_git_repository: true -- name: Build data (single async task) - include_tasks: 02_build_data.yml +- include_tasks: 02_cleanup.yml + when: MODE_CLEANUP | bool + +- include_tasks: 03_build_data.yml when: MIG_BUILD_DATA | bool - include_tasks: utils/run_once.yml diff --git a/roles/web-app-mig/tasks/02_cleanup.yml b/roles/web-app-mig/tasks/02_cleanup.yml new file mode 100644 index 00000000..6d6d348b --- /dev/null +++ b/roles/web-app-mig/tasks/02_cleanup.yml @@ -0,0 +1,5 @@ +- name: "Cleanup MIG roles directory (remove all contents safely)" + file: + path: "{{ MIG_ROLES_DIRECTORY }}" + state: directory + mode: "0755" \ No newline at end of file diff --git a/roles/web-app-mig/tasks/02_build_data.yml b/roles/web-app-mig/tasks/03_build_data.yml similarity index 100% rename from roles/web-app-mig/tasks/02_build_data.yml rename to roles/web-app-mig/tasks/03_build_data.yml