Configure AIO sources.list with first matched repo

The bootstrap-aio role reconfigures sources.list by greping for a
pattern in the existing sources.list file. From the results of the
grep, register the base and security repos with the first stdout_line
instead of the entirety of stdout to avoid unexpected newlines and
additional repo URLs.

Closes-Bug: 1638878
Change-Id: I64e79701c3ecc62ddec5e7ed86501ca3a94d8f3d
This commit is contained in:
Jimmy McCrory 2016-11-15 09:48:49 -08:00
parent 1dd8884dca
commit f9bd7ab679

View File

@ -40,8 +40,8 @@
- name: Set apt repo facts based on discovered information
set_fact:
bootstrap_host_ubuntu_repo: "{{ ubuntu_repo.stdout }}"
bootstrap_host_ubuntu_security_repo: "{{ ubuntu_security_repo.stdout }}"
bootstrap_host_ubuntu_repo: "{{ ubuntu_repo.stdout_lines[0] }}"
bootstrap_host_ubuntu_security_repo: "{{ ubuntu_security_repo.stdout_lines[0] }}"
when:
- bootstrap_host_ubuntu_repo is not defined
- bootstrap_host_ubuntu_security_repo is not defined