From e2663c6a132c2af2879c64d03eae26eb94b4a65c Mon Sep 17 00:00:00 2001 From: Chris Smart Date: Tue, 19 Jul 2016 11:05:32 +1000 Subject: [PATCH] Support other architectures in apt sources.list The install-apt task of the bootstrap-host role obtains the apt repository URL by performing an awk regex to match on "/ubuntu/". Other architectures however, such as ppc64le, contain "/ubuntu-ports/" in the URL which causes the regex to fail. This patch modifies the awk regex to match any characters which exist after "/ubuntu" and before the trailing "/". Change-Id: I5417498dc89407edd642fd8f8fdce9745acb1759 --- tests/roles/bootstrap-host/tasks/install-apt.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/roles/bootstrap-host/tasks/install-apt.yml b/tests/roles/bootstrap-host/tasks/install-apt.yml index d682e8982a..8e49a847c8 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: 'awk "/^deb .*ubuntu\/? {{ ansible_distribution_release }} main/ {print \$2; exit}" /etc/apt/sources.list' + shell: 'awk "/^deb .*ubuntu.*\/? {{ ansible_distribution_release }} main/ {print \$2; exit}" /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: 'awk "/^deb .*ubuntu\/? {{ ansible_distribution_release }}-security main/ {print \$2; exit}" /etc/apt/sources.list' + shell: 'awk "/^deb .*ubuntu.*\/? {{ ansible_distribution_release }}-security main/ {print \$2; exit}" /etc/apt/sources.list' register: ubuntu_security_repo when: - bootstrap_host_ubuntu_security_repo is not defined