diff --git a/tests/roles/bootstrap-host/tasks/install-apt.yml b/tests/roles/bootstrap-host/tasks/install-apt.yml index 4cc3ecb64d..09cfdb52cf 100644 --- a/tests/roles/bootstrap-host/tasks/install-apt.yml +++ b/tests/roles/bootstrap-host/tasks/install-apt.yml @@ -21,7 +21,7 @@ - apt-install-prerequisites - name: Determine the existing Ubuntu repo configuration - shell: 'grep -oP "^deb \K(\[?.*\]?.*ubuntu\/?)(?= {{ ansible_distribution_release }} main)" /etc/apt/sources.list' + shell: 'grep -oP "^deb \K(\[?.*\]?.*ubuntu\S*\/?)(?= {{ ansible_distribution_release }} main)" /etc/apt/sources.list' register: ubuntu_repo when: - bootstrap_host_ubuntu_repo is not defined @@ -30,7 +30,7 @@ - find-apt-repo - name: Determine the existing Ubuntu Security repo configuration - shell: 'grep -oP "^deb \K(\[?.*\]?.*ubuntu\/?)(?= {{ ansible_distribution_release }}-security main)" /etc/apt/sources.list' + shell: 'grep -oP "^deb \K(\[?.*\]?.*ubuntu\S*\/?)(?= {{ ansible_distribution_release }}-security main)" /etc/apt/sources.list' register: ubuntu_security_repo when: - bootstrap_host_ubuntu_security_repo is not defined