From d016920740f363a1c748df8e59b98d4e9d2c62a0 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 12 Jul 2022 09:54:11 +0200 Subject: [PATCH] fix(Playbook):fixed check for Bielefeld APT-Service --- .../ancon/playbooks/generic_playbook.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/VirtualMachineService/ancon/playbooks/generic_playbook.yml b/VirtualMachineService/ancon/playbooks/generic_playbook.yml index 0263e184..3e2ad0c7 100644 --- a/VirtualMachineService/ancon/playbooks/generic_playbook.yml +++ b/VirtualMachineService/ancon/playbooks/generic_playbook.yml @@ -4,6 +4,7 @@ gather_facts: yes vars_files: pre_tasks: + - name: PRE_TASK Wait for cloud-init / user-data to finish ansible.builtin.command: cloud-init status --wait changed_when: false @@ -11,16 +12,12 @@ - name: Populate service facts ansible.builtin.service_facts: - - name: Set if APT-Mirror Service Exists - set_fact: - bielefeld_mirror_service_exist: "'de.NBI_Bielefeld_environment' in services" - - name: Wait till Apt_Mirror de.NBI Bielefeld Service is done ansible.builtin.service_facts: until: services['de.NBI_Bielefeld_environment.service'].state == 'stopped' - retries: 25 + retries: 35 delay: 10 - when: bielefeld_mirror_service_exist + when: services['de.NBI_Bielefeld_environment.service'] is defined - name: PRE_TASK Disable unattended upgrades lineinfile: