From 0e17023ba36a70a6f35ca19ce012f7976739d990 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Tue, 20 Apr 2021 10:18:23 -0400 Subject: [PATCH] Inventory directory already pre-created --- awx/main/tasks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 122cf88ec8..fb4f7ef7e5 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1035,7 +1035,6 @@ class BaseTask(object): self.host_map = {hostname: hv.pop('remote_tower_id', '') for hostname, hv in script_data.get('_meta', {}).get('hostvars', {}).items()} json_data = json.dumps(script_data) path = os.path.join(private_data_dir, 'inventory') - os.makedirs(path, mode=0o700) fn = os.path.join(path, 'hosts') with open(fn, 'w') as f: os.chmod(fn, stat.S_IRUSR | stat.S_IXUSR | stat.S_IWUSR)