From f0ca47b4fd015878f7e6e6cb13767f957822e8e0 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Tue, 30 May 2017 16:37:07 -0400 Subject: [PATCH] root folder re-creation on project sync --- awx/main/tasks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 0cb7c5a9c6..adcc71683f 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1445,6 +1445,9 @@ class RunProjectUpdate(BaseTask): raise def pre_run_hook(self, instance, **kwargs): + # re-create root project folder if a natural disaster has destroyed it + if not os.path.exists(settings.PROJECTS_ROOT): + os.mkdir(settings.PROJECTS_ROOT) if instance.launch_type == 'sync': self.acquire_lock(instance)