From 703563c59cf1a4c8ebb561d0222fe9b7f597b349 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 25 May 2022 13:58:02 +0200 Subject: [PATCH] Run content restore only on first host Currently we're trying to restore content for each host independently This is not needed as we already storing content on shared FS, that's been mounted. We don't implement variable since that's only for migration purposes. Change-Id: I0795fa1936aaeb9b9005a35685d85b6a4a619835 --- tasks/repo_pre_install.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/repo_pre_install.yml b/tasks/repo_pre_install.yml index c646d83..ab555a3 100644 --- a/tasks/repo_pre_install.yml +++ b/tasks/repo_pre_install.yml @@ -86,6 +86,7 @@ when: - _repo_folder_stat.stat.exists - _repo_folder_mountpoint.rc != 0 + - ('repo_all' in group_names and inventory_hostname == (groups['repo_all'] | intersect(ansible_play_hosts)) | first) | bool # NOTE(jrosser) remove this task in release after Z - name: Fix permissions on restored repo content @@ -94,6 +95,8 @@ owner: "{{ repo_service_user_name }}" group: "{{ repo_service_group_name }}" recurse: yes + when: + - ('repo_all' in group_names and inventory_hostname == (groups['repo_all'] | intersect(ansible_play_hosts)) | first) | bool - name: File and directory setup (non-root user) file: